3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-18 12:30:06 +01:00

Don't assume all hoppers are blocks. Fixes BUKKIT-3883

Dieser Commit ist enthalten in:
Travis Watkins 2013-03-24 12:38:57 -05:00
Ursprung 8d3ba07f93
Commit b532042973

Datei anzeigen

@ -282,7 +282,13 @@ public class TileEntityHopper extends TileEntity implements IHopper {
ihopper.getWorld().getServer().getPluginManager().callEvent(event); ihopper.getWorld().getServer().getPluginManager().callEvent(event);
if (event.isCancelled()) { if (event.isCancelled()) {
iinventory.setItem(i, itemstack1); iinventory.setItem(i, itemstack1);
if (ihopper instanceof TileEntityHopper) {
((TileEntityHopper) ihopper).c(8); // delay hopper checks ((TileEntityHopper) ihopper).c(8); // delay hopper checks
} else if (ihopper instanceof EntityMinecartHopper) {
((EntityMinecartHopper) ihopper).n(4); // delay hopper minecart checks
}
return false; return false;
} }
ItemStack itemstack2 = addItem(ihopper, CraftItemStack.asNMSCopy(event.getItem()), -1); ItemStack itemstack2 = addItem(ihopper, CraftItemStack.asNMSCopy(event.getItem()), -1);
@ -294,6 +300,7 @@ public class TileEntityHopper extends TileEntity implements IHopper {
iinventory.setItem(i, itemstack1); iinventory.setItem(i, itemstack1);
} }
// CraftBukkit end // CraftBukkit end
return true; return true;
} }