mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-11 18:22:08 -07:00
Fix eating food whilst not facing a block
By: Thinkofdeath <thinkofdeath@spigotmc.org>
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user