aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0677-Fix-cancelled-powdered-snow-bucket-placement.patch
diff options
context:
space:
mode:
authorRiley Park <[email protected]>2024-05-15 17:06:59 -0700
committerGitHub <[email protected]>2024-05-15 17:06:59 -0700
commitf17519338bc589c045e0b32bfc37e048b23544d5 (patch)
treee50182ec698b4a9de8f366f485ee089b1901bbd9 /patches/server/0677-Fix-cancelled-powdered-snow-bucket-placement.patch
parent3fc93581bb876e8149b2ca423375a98f5ca12d27 (diff)
downloadPaper-f17519338bc589c045e0b32bfc37e048b23544d5.tar.gz
Paper-f17519338bc589c045e0b32bfc37e048b23544d5.zip
Expose server build information (#10729)
* Expose server build information * squash patches * final tweaks --------- Co-authored-by: Jake Potrebic <[email protected]> Co-authored-by: masmc05 <[email protected]>
Diffstat (limited to 'patches/server/0677-Fix-cancelled-powdered-snow-bucket-placement.patch')
-rw-r--r--patches/server/0677-Fix-cancelled-powdered-snow-bucket-placement.patch31
1 files changed, 31 insertions, 0 deletions
diff --git a/patches/server/0677-Fix-cancelled-powdered-snow-bucket-placement.patch b/patches/server/0677-Fix-cancelled-powdered-snow-bucket-placement.patch
new file mode 100644
index 0000000000..e46654952c
--- /dev/null
+++ b/patches/server/0677-Fix-cancelled-powdered-snow-bucket-placement.patch
@@ -0,0 +1,31 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Jake Potrebic <[email protected]>
+Date: Fri, 8 Oct 2021 13:12:58 -0700
+Subject: [PATCH] Fix cancelled powdered snow bucket placement
+
+Cancelling the placement of powdered snow from the powdered
+snow bucket didn't revert grass that became snowy because of the
+placement.
+
+diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java
+index 2947a43a1d9e49273ed0242691273e50c657cd05..51a7919b019f2fd5d2e2ab850ed512769b0b1685 100644
+--- a/src/main/java/net/minecraft/world/item/ItemStack.java
++++ b/src/main/java/net/minecraft/world/item/ItemStack.java
+@@ -401,7 +401,7 @@ public final class ItemStack implements DataComponentHolder {
+ int oldCount = this.getCount();
+ ServerLevel world = (ServerLevel) context.getLevel();
+
+- if (!(item instanceof BucketItem || item instanceof SolidBucketItem)) { // if not bucket
++ if (!(item instanceof BucketItem/* || item instanceof SolidBucketItem*/)) { // if not bucket // Paper - Fix cancelled powdered snow bucket placement
+ world.captureBlockStates = true;
+ // special case bonemeal
+ if (item == Items.BONE_MEAL) {
+@@ -461,7 +461,7 @@ public final class ItemStack implements DataComponentHolder {
+ world.capturedBlockStates.clear();
+ if (blocks.size() > 1) {
+ placeEvent = org.bukkit.craftbukkit.event.CraftEventFactory.callBlockMultiPlaceEvent(world, entityhuman, enumhand, blocks, blockposition.getX(), blockposition.getY(), blockposition.getZ());
+- } else if (blocks.size() == 1) {
++ } else if (blocks.size() == 1 && item != Items.POWDER_SNOW_BUCKET) { // Paper - Fix cancelled powdered snow bucket placement
+ placeEvent = org.bukkit.craftbukkit.event.CraftEventFactory.callBlockPlaceEvent(world, entityhuman, enumhand, blocks.get(0), blockposition.getX(), blockposition.getY(), blockposition.getZ());
+ }
+