2016-07-28 00:46:02 +02:00
|
|
|
From 526ae9f44188b65fb44cb33a9e91b72a6df818af Mon Sep 17 00:00:00 2001
|
2016-06-18 09:44:11 +02:00
|
|
|
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
|
2016-07-28 00:46:02 +02:00
|
|
|
index 526a608..c0c60a7 100644
|
2016-06-18 09:44:11 +02:00
|
|
|
--- 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 {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-07-28 00:46:02 +02:00
|
|
|
+ public void setHeldItem(EnumHand enumhand, @Nullable ItemStack itemstack) { a(enumhand, itemstack); } // Paper - OBFHELPER
|
2016-06-18 09:44:11 +02:00
|
|
|
public void a(EnumHand enumhand, @Nullable ItemStack itemstack) {
|
|
|
|
if (enumhand == EnumHand.MAIN_HAND) {
|
|
|
|
this.setSlot(EnumItemSlot.MAINHAND, itemstack);
|
|
|
|
--
|
2016-07-28 00:46:02 +02:00
|
|
|
2.9.2.windows.1
|
2016-06-18 09:44:11 +02:00
|
|
|
|