diff options
Diffstat (limited to 'nms-patches/BlockDropper.patch')
-rw-r--r-- | nms-patches/BlockDropper.patch | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/nms-patches/BlockDropper.patch b/nms-patches/BlockDropper.patch index 56952524..9f4ff914 100644 --- a/nms-patches/BlockDropper.patch +++ b/nms-patches/BlockDropper.patch @@ -11,23 +11,14 @@ public class BlockDropper extends BlockDispenser { private final IDispenseBehavior P = new DispenseBehaviorItem(); -@@ -14,7 +19,7 @@ - return new TileEntityDropper(); - } - -- protected void dispense(World world, BlockPosition blockposition) { -+ public void dispense(World world, BlockPosition blockposition) { // CraftBukkit - public - SourceBlock sourceblock = new SourceBlock(world, blockposition); - TileEntityDispenser tileentitydispenser = (TileEntityDispenser) sourceblock.getTileEntity(); - @@ -38,8 +43,25 @@ itemstack1 = null; } } else { -- itemstack1 = TileEntityHopper.addItem(iinventory, itemstack.cloneItemStack().a(1), enumdirection.opposite()); +- itemstack1 = TileEntityHopper.addItem(iinventory, itemstack.cloneItemStack().cloneAndSubtract(1), enumdirection.opposite()); - if (itemstack1 == null) { + // CraftBukkit start - Fire event when pushing items into other inventories -+ CraftItemStack oitemstack = CraftItemStack.asCraftMirror(itemstack.cloneItemStack().a(1)); ++ CraftItemStack oitemstack = CraftItemStack.asCraftMirror(itemstack.cloneItemStack().cloneAndSubtract(1)); + + org.bukkit.inventory.Inventory destinationInventory; + // Have to special case large chests as they work oddly |