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.
Dieser Commit ist enthalten in:
Travis Watkins 2013-05-03 06:36:12 -05:00
Ursprung 28fb514a4d
Commit d9eb586568

Datei anzeigen

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