From d9eb5865689b05e1002484b6255997b32e106dec Mon Sep 17 00:00:00 2001 From: Travis Watkins Date: Fri, 3 May 2013 06:36:12 -0500 Subject: [PATCH] Correct event handling for dispensing filled buckets. Fixes BUKKIT-4046 We only go through event creation and calling when dispensing filled buckets if the bucket is able to place its liquid. However, the check for this is incorrect so the event is not called when a block liquids can destroy is in front of the dispenser. This commit fixes the check to match the checks vanilla does when actually using the bucket. --- .../java/net/minecraft/server/DispenseBehaviorFilledBucket.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/net/minecraft/server/DispenseBehaviorFilledBucket.java b/src/main/java/net/minecraft/server/DispenseBehaviorFilledBucket.java index daf50a930c..24395c3aa7 100644 --- a/src/main/java/net/minecraft/server/DispenseBehaviorFilledBucket.java +++ b/src/main/java/net/minecraft/server/DispenseBehaviorFilledBucket.java @@ -23,7 +23,7 @@ final class DispenseBehaviorFilledBucket extends DispenseBehaviorItem { int x = i + enumfacing.c(); int y = j + enumfacing.d(); int z = k + enumfacing.e(); - if (world.isEmpty(x, y, z) || world.getMaterial(x, y, z).isBuildable()) { + if (world.isEmpty(x, y, z) || !world.getMaterial(x, y, z).isBuildable()) { org.bukkit.block.Block block = world.getWorld().getBlockAt(i, j, k); CraftItemStack craftItem = CraftItemStack.asCraftMirror(itemstack);