Updated Upstream (Paper)

Upstream has released updates that appear to apply and compile correctly

Paper Changes:
PaperMC/Paper@a7ae966 readd itemstack data sanitization (#10454)
PaperMC/Paper@ca50b87 Clear firework item properly (#10793)
PaperMC/Paper@9774a52 fix and cleanup loot table patches (#10100)
PaperMC/Paper@ac4ee06 Fix integer overflow for lag compensating eating check (#10797)
PaperMC/Paper@6649a17 Fix BlockStateMeta equals (#10795)
PaperMC/Paper@1b8cdc6 Extend Player Interact cancellation to cover Jigsaw blocks (#10719)
PaperMC/Paper@841ab41 Fix more item desync when an event is cancelled (#10654)
PaperMC/Paper@b0e3ca4 Prevent NPE if hooked entity was cleared (#10712)
PaperMC/Paper@347bbe3 Fix Cancelling BlockPlaceEvent calling onRemove (#10773)
This commit is contained in:
granny
2024-05-26 17:12:40 -07:00
parent 22fc5f9bda
commit 2842b97ddf
38 changed files with 160 additions and 160 deletions

View File

@@ -5,18 +5,18 @@ Subject: [PATCH] Store placer on Block when placed
diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java
index 1b829ad61a25ef1e18adefe291d91fdb7401956d..f93cb39c2664b74066bd9ac352137c11e612e5f9 100644
index d606c15385273796fbbd2b503cda6e262be358b2..4934e912653361dc4af8306d3747850c0c0f4554 100644
--- a/src/main/java/net/minecraft/world/item/ItemStack.java
+++ b/src/main/java/net/minecraft/world/item/ItemStack.java
@@ -475,6 +475,7 @@ public final class ItemStack implements DataComponentHolder {
world.preventPoiUpdated = true; // CraftBukkit - SPIGOT-5710
@@ -476,6 +476,7 @@ public final class ItemStack implements DataComponentHolder {
world.isBlockPlaceCancelled = true; // Paper - prevent calling cleanup logic when undoing a block place upon a cancelled BlockPlaceEvent
for (BlockState blockstate : blocks) {
blockstate.update(true, false);
+ ((CraftBlock) blockstate.getBlock()).getNMS().getBlock().forgetPlacer(); // Purpur
}
world.isBlockPlaceCancelled = false; // Paper - prevent calling cleanup logic when undoing a block place upon a cancelled BlockPlaceEvent
world.preventPoiUpdated = false;
@@ -506,6 +507,7 @@ public final class ItemStack implements DataComponentHolder {
@@ -508,6 +509,7 @@ public final class ItemStack implements DataComponentHolder {
if (!(block.getBlock() instanceof BaseEntityBlock)) { // Containers get placed automatically
block.onPlace(world, newblockposition, oldBlock, true, context); // Paper - pass context
}