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:
Ursprung
28fb514a4d
Commit
d9eb586568
@ -23,7 +23,7 @@ final class DispenseBehaviorFilledBucket extends DispenseBehaviorItem {
|
|||||||
int x = i + enumfacing.c();
|
int x = i + enumfacing.c();
|
||||||
int y = j + enumfacing.d();
|
int y = j + enumfacing.d();
|
||||||
int z = k + enumfacing.e();
|
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);
|
org.bukkit.block.Block block = world.getWorld().getBlockAt(i, j, k);
|
||||||
CraftItemStack craftItem = CraftItemStack.asCraftMirror(itemstack);
|
CraftItemStack craftItem = CraftItemStack.asCraftMirror(itemstack);
|
||||||
|
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren