mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-29 12:27:59 +01:00
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.
This commit is contained in:
parent
83b4d889b7
commit
140e68625c
@ -170,7 +170,7 @@
|
||||
+ 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) {
|
||||
@ -234,7 +234,7 @@
|
||||
+ 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());
|
||||
+ }
|
||||
+
|
||||
|
Loading…
Reference in New Issue
Block a user