More work for 1.14

This commit is contained in:
Shane Freeder
2019-04-26 02:24:00 +01:00
parent 29a22e708f
commit aa701c743f
33 changed files with 257 additions and 941 deletions

View File

@@ -5,7 +5,7 @@ Subject: [PATCH] Custom replacement for eaten items
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index 0ba15fce63..a12cc1e92f 100644
index e3613a8e67..44570edcae 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -0,0 +0,0 @@ public abstract class EntityLiving extends Entity {
@@ -33,9 +33,9 @@ index 0ba15fce63..a12cc1e92f 100644
+ itemstack = CraftItemStack.asNMSCopy(event.getReplacement());
+ }
+ // Paper end
this.a(this.cU(), itemstack);
this.a(this.getRaisedHand(), itemstack);
// CraftBukkit end
this.da();
this.dp();
+ // Paper start - if the replacement is anything but the default, update the client inventory
+ if (this instanceof EntityPlayer && !com.google.common.base.Objects.equal(defaultReplacement, itemstack)) {
+ ((EntityPlayer) this).getBukkitEntity().updateInventory();