mirror of
https://github.com/PaperMC/Paper.git
synced 2026-11-26 02:49:44 -05:00
Fixed unable to eat/throw
This commit is contained in:
1 parent
92518f4fc0
commit
f330025f1f
2 files changed
+13
-10
No files matched your search
@@ -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)) {
|
||||
|
||||
Reference in new issue
Block a user