Updated Upstream (Bukkit/CraftBukkit)

Upstream has released updates that appears to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
e28fb3bd SPIGOT-5301: BlockIgniteEvent for campfire + arrow

CraftBukkit Changes:
763e5601 SPIGOT-5294: Cancelled EntityPickupItemEvent and PlayerPickupItemEvent alter on-ground stacks
403ac185 SPIGOT-5301: BlockIgniteEvent for campfire + arrow
This commit is contained in:
Shane Freeder 2019-09-02 17:28:24 +01:00
parent 14e07afd20
commit 439131c704
No known key found for this signature in database
GPG Key ID: A3F61EA5A085289C
5 changed files with 14 additions and 13 deletions

View File

@ -1,11 +1,11 @@
From 7983e759d8066c357793dd5487226a0c5a27b2ca Mon Sep 17 00:00:00 2001
From 9ebb4b20c387475c0154b08cfe1b769899387fee Mon Sep 17 00:00:00 2001
From: BillyGalbreath <Blake.Galbreath@GMail.com>
Date: Sun, 7 May 2017 06:26:09 -0500
Subject: [PATCH] PlayerPickupItemEvent#setFlyAtPlayer
diff --git a/src/main/java/net/minecraft/server/EntityItem.java b/src/main/java/net/minecraft/server/EntityItem.java
index c0b81223f1..1baff88c4a 100644
index 27decbd06..17c291569 100644
--- a/src/main/java/net/minecraft/server/EntityItem.java
+++ b/src/main/java/net/minecraft/server/EntityItem.java
@@ -318,6 +318,7 @@ public class EntityItem extends Entity {
@ -16,12 +16,13 @@ index c0b81223f1..1baff88c4a 100644
if (this.pickupDelay <= 0 && canHold > 0) {
itemstack.setCount(canHold);
@@ -325,7 +326,13 @@ public class EntityItem extends Entity {
@@ -325,8 +326,14 @@ public class EntityItem extends Entity {
PlayerPickupItemEvent playerEvent = new PlayerPickupItemEvent((org.bukkit.entity.Player) entityhuman.getBukkitEntity(), (org.bukkit.entity.Item) this.getBukkitEntity(), remaining);
playerEvent.setCancelled(!entityhuman.canPickUpLoot);
this.world.getServer().getPluginManager().callEvent(playerEvent);
+ flyAtPlayer = playerEvent.getFlyAtPlayer(); // Paper
if (playerEvent.isCancelled()) {
itemstack.setCount(i); // SPIGOT-5294 - restore count
+ // Paper Start
+ if (flyAtPlayer) {
+ entityhuman.receive(this, i);
@ -30,7 +31,7 @@ index c0b81223f1..1baff88c4a 100644
return;
}
@@ -348,7 +355,11 @@ public class EntityItem extends Entity {
@@ -350,7 +357,11 @@ public class EntityItem extends Entity {
// CraftBukkit end
if (this.pickupDelay == 0 && (this.owner == null || 6000 - this.age <= 200 || this.owner.equals(entityhuman.getUniqueID())) && entityhuman.inventory.pickup(itemstack)) {
@ -44,5 +45,5 @@ index c0b81223f1..1baff88c4a 100644
this.die();
itemstack.setCount(i);
--
2.22.0
2.23.0

View File

@ -1,4 +1,4 @@
From 414ebdf970619b7b3b67ae5b72c3feb24bd2e7fa Mon Sep 17 00:00:00 2001
From 248e1e4123112a83ab0016d5cd39bde1bce46469 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Tue, 3 Jul 2018 21:56:23 -0400
Subject: [PATCH] InventoryCloseEvent Reason API
@ -168,10 +168,10 @@ index e610c8aae..ce35e6bbc 100644
// Check if the fromWorld and toWorld are the same.
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
index e58dac2c8..9f39cfa45 100644
index 87de825d5..f6e17986b 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -1263,8 +1263,19 @@ public class CraftEventFactory {
@@ -1266,8 +1266,19 @@ public class CraftEventFactory {
return event;
}

View File

@ -1,4 +1,4 @@
From 047831d4933a3a4c074bca80512ebd023526c742 Mon Sep 17 00:00:00 2001
From ec3a80e16df92c21e4618cbf79b19fe53125a9da Mon Sep 17 00:00:00 2001
From: kickash32 <kickash32@gmail.com>
Date: Mon, 3 Jun 2019 02:02:39 -0400
Subject: [PATCH] Implement alternative item-despawn-rate
@ -80,7 +80,7 @@ index 318a470ee..e7bbeef74 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/EntityItem.java b/src/main/java/net/minecraft/server/EntityItem.java
index 209169895..97e379090 100644
index bc7e706d1..df26cef6a 100644
--- a/src/main/java/net/minecraft/server/EntityItem.java
+++ b/src/main/java/net/minecraft/server/EntityItem.java
@@ -5,6 +5,7 @@ import java.util.List;
@ -109,7 +109,7 @@ index 209169895..97e379090 100644
// CraftBukkit start - fire ItemDespawnEvent
if (org.bukkit.craftbukkit.event.CraftEventFactory.callItemDespawnEvent(this).isCancelled()) {
this.age = 0;
@@ -472,9 +473,16 @@ public class EntityItem extends Entity {
@@ -474,9 +475,16 @@ public class EntityItem extends Entity {
public void u() {
this.p();

@ -1 +1 @@
Subproject commit ff0672ca667beac3622f9efca9a0d701afcc94c7
Subproject commit e28fb3bd669f1647dab40a5ca6820e003a298b75

@ -1 +1 @@
Subproject commit 96bc85f0b45e4f9150903a46e4a062ecc0501cc9
Subproject commit 763e560135a991aaf2c3d33ad58216d09e98f23a