Update to MC 1.12-pre2

This commit is contained in:
Zach Brown
2017-05-14 13:05:01 -05:00
parent b712d77d72
commit ab4ae72fd5
148 changed files with 724 additions and 1045 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 247224117..9cb3b22fb 100644
index 1ad33521c..2b20a0205 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 {
@@ -13,7 +13,7 @@ index 247224117..9cb3b22fb 100644
protected void v() {
if (!this.activeItem.isEmpty() && this.isHandRaised()) {
+ PlayerItemConsumeEvent event = null; // Paper
this.a(this.activeItem, 16);
this.b(this.activeItem, 16);
// CraftBukkit start - fire PlayerItemConsumeEvent
ItemStack itemstack;
if (this instanceof EntityPlayer) {
@@ -34,9 +34,9 @@ index 247224117..9cb3b22fb 100644
+ }
+ // Paper end
+
this.a(this.cz(), itemstack);
this.a(this.cF(), itemstack);
// CraftBukkit end
this.cF();
this.cL();
+
+ // 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)) {