Skip to content
Permalink
Browse files

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
  • Loading branch information...
electronicboy committed Sep 2, 2019
1 parent 14e07af commit 439131c70489aaa182d0ad234d7bf736030db2d8
@@ -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

@@ -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;
}

@@ -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();
Submodule Bukkit updated from ff0672 to e28fb3
Submodule CraftBukkit updated from 96bc85 to 763e56

0 comments on commit 439131c

Please sign in to comment.
You can’t perform that action at this time.