Fix eating food whilst not facing a block

By: Thinkofdeath <thinkofdeath@spigotmc.org>
This commit is contained in:
CraftBukkit/Spigot
2014-11-28 11:23:19 +00:00
parent a419776f3c
commit 2443e912f8
263 changed files with 527 additions and 527 deletions

View File

@@ -1,5 +1,5 @@
--- ../work/decompile-bb26c12b/net/minecraft/server/PlayerInteractManager.java 2014-11-27 08:59:46.857421159 +1100
+++ src/main/java/net/minecraft/server/PlayerInteractManager.java 2014-11-27 08:42:10.108850996 +1100
--- ../work/decompile-8eb82bde//net/minecraft/server/PlayerInteractManager.java 2014-11-28 11:22:56.150823158 +0000
+++ src/main/java/net/minecraft/server/PlayerInteractManager.java 2014-11-28 11:18:08.282829547 +0000
@@ -1,5 +1,13 @@
package net.minecraft.server;
@@ -275,7 +275,7 @@
+
+ // If we have 'true' and no explicit deny *or* an explicit allow -- run the item part of the hook
+ if (itemstack != null && ((!result && event.useItemInHand() != Event.Result.DENY) || event.useItemInHand() == Event.Result.ALLOW)) {
+ if (itemstack.getItem() instanceof ItemBucket) {
+ if (itemstack.getItem() instanceof ItemBucket || itemstack.getItem() instanceof ItemFood) {
+ this.useItem(entityhuman, world, itemstack);
+ } else {
+ itemstack.placeItem(entityhuman, world, blockposition, enumdirection, f, f1, f2);