diff options
author | Travis Watkins <amaranth@ubuntu.com> | 2013-03-24 12:38:57 -0500 |
---|---|---|
committer | Travis Watkins <amaranth@ubuntu.com> | 2013-03-24 12:38:57 -0500 |
commit | b5320429731b10a48d4d9892a5f73c533144cb57 (patch) | |
tree | 3b1eb16709a94da320e3e8260374c835a51cfa46 /src/main | |
parent | 8d3ba07f93f457f95961b01b8f70bc7f51b79f93 (diff) | |
download | craftbukkit-b5320429731b10a48d4d9892a5f73c533144cb57.tar craftbukkit-b5320429731b10a48d4d9892a5f73c533144cb57.tar.gz craftbukkit-b5320429731b10a48d4d9892a5f73c533144cb57.tar.lz craftbukkit-b5320429731b10a48d4d9892a5f73c533144cb57.tar.xz craftbukkit-b5320429731b10a48d4d9892a5f73c533144cb57.zip |
Don't assume all hoppers are blocks. Fixes BUKKIT-3883
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/net/minecraft/server/TileEntityHopper.java | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/main/java/net/minecraft/server/TileEntityHopper.java b/src/main/java/net/minecraft/server/TileEntityHopper.java index 8e0918d6..94c510f8 100644 --- a/src/main/java/net/minecraft/server/TileEntityHopper.java +++ b/src/main/java/net/minecraft/server/TileEntityHopper.java @@ -282,7 +282,13 @@ public class TileEntityHopper extends TileEntity implements IHopper { ihopper.getWorld().getServer().getPluginManager().callEvent(event); if (event.isCancelled()) { iinventory.setItem(i, itemstack1); - ((TileEntityHopper) ihopper).c(8); // delay hopper checks + + if (ihopper instanceof TileEntityHopper) { + ((TileEntityHopper) ihopper).c(8); // delay hopper checks + } else if (ihopper instanceof EntityMinecartHopper) { + ((EntityMinecartHopper) ihopper).n(4); // delay hopper minecart checks + } + return false; } ItemStack itemstack2 = addItem(ihopper, CraftItemStack.asNMSCopy(event.getItem()), -1); @@ -294,6 +300,7 @@ public class TileEntityHopper extends TileEntity implements IHopper { iinventory.setItem(i, itemstack1); } // CraftBukkit end + return true; } |