mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-26 12:36:07 +01:00
Remove the item from the correct hand when spawn egg depletes
This commit is contained in:
parent
bf40dd5557
commit
c8643cef2e
@ -1,4 +1,4 @@
|
|||||||
From 31d6804e83b8c5f6100c0d1c3625f296ae721ee0 Mon Sep 17 00:00:00 2001
|
From 4c0a4516fb82d1b4436faa124c595d28c46d3f02 Mon Sep 17 00:00:00 2001
|
||||||
From: Techcable <Techcable@outlook.com>
|
From: Techcable <Techcable@outlook.com>
|
||||||
Date: Sat, 18 Jun 2016 01:01:37 -0500
|
Date: Sat, 18 Jun 2016 01:01:37 -0500
|
||||||
Subject: [PATCH] Make entities look for hoppers
|
Subject: [PATCH] Make entities look for hoppers
|
||||||
@ -358,5 +358,5 @@ index 8717ae1..cefd659 100644
|
|||||||
|
|
||||||
if (!list.isEmpty()) {
|
if (!list.isEmpty()) {
|
||||||
--
|
--
|
||||||
2.8.3
|
2.9.0
|
||||||
|
|
@ -0,0 +1,34 @@
|
|||||||
|
From 51086b7a0e474b8832ac8dd7e4ec5e2a21be1cfb Mon Sep 17 00:00:00 2001
|
||||||
|
From: Aikar <aikar@aikar.co>
|
||||||
|
Date: Sat, 18 Jun 2016 01:49:22 -0400
|
||||||
|
Subject: [PATCH] Remove the item from the correct hand when spawn egg depletes
|
||||||
|
|
||||||
|
|
||||||
|
diff --git a/src/main/java/net/minecraft/server/EntityAgeable.java b/src/main/java/net/minecraft/server/EntityAgeable.java
|
||||||
|
index 6092346..c1e9cbf 100644
|
||||||
|
--- a/src/main/java/net/minecraft/server/EntityAgeable.java
|
||||||
|
+++ b/src/main/java/net/minecraft/server/EntityAgeable.java
|
||||||
|
@@ -63,7 +63,7 @@ public abstract class EntityAgeable extends EntityCreature {
|
||||||
|
--itemstack.count;
|
||||||
|
// CraftBukkit start - allow less than 0 stacks as "infinite"
|
||||||
|
if (itemstack.count == 0) {
|
||||||
|
- entityhuman.inventory.setItem(entityhuman.inventory.itemInHandIndex, (ItemStack) null);
|
||||||
|
+ entityhuman.setHeldItem(enumhand, null); // Paper
|
||||||
|
}
|
||||||
|
// CraftBukkit end
|
||||||
|
}
|
||||||
|
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||||
|
index 22333ea..4e424aa 100644
|
||||||
|
--- a/src/main/java/net/minecraft/server/EntityLiving.java
|
||||||
|
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||||
|
@@ -1407,6 +1407,7 @@ public abstract class EntityLiving extends Entity {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
+ public void setHeldItem(EnumHand enumhand, @Nullable ItemStack itemstack) { a(enumhand, itemstack); } // Paper // OBFHELPER
|
||||||
|
public void a(EnumHand enumhand, @Nullable ItemStack itemstack) {
|
||||||
|
if (enumhand == EnumHand.MAIN_HAND) {
|
||||||
|
this.setSlot(EnumItemSlot.MAINHAND, itemstack);
|
||||||
|
--
|
||||||
|
2.9.0
|
||||||
|
|
Loading…
Reference in New Issue
Block a user