mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-24 01:47:42 +01:00
Don't assume all hoppers are blocks. Fixes BUKKIT-3883
This commit is contained in:
parent
8d3ba07f93
commit
b532042973
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user