Fixed unable to eat/throw

This commit is contained in:
Erik Broes
2011-03-24 23:27:40 +01:00
parent 92518f4fc0
commit f330025f1f
2 changed files with 13 additions and 10 deletions

View File

@@ -185,6 +185,12 @@ public class ItemInWorldManager {
public boolean a(EntityHuman entityhuman, World world, ItemStack itemstack) {
int i = itemstack.count;
PlayerInteractEvent event = CraftEventFactory.callPlayerInteractEvent(entityhuman, Action.RIGHT_CLICK_AIR, itemstack);
if (event.useItemInHand() == Event.Result.DENY) {
return false;
}
ItemStack itemstack1 = itemstack.a(world, entityhuman);
if (itemstack1 == itemstack && (itemstack1 == null || itemstack1.count == i)) {