From 0c088a429918db129807eabd2c124854b501395b Mon Sep 17 00:00:00 2001 From: Christian Date: Thu, 31 Jul 2014 09:47:35 -0230 Subject: [PATCH] Tweak Itemstack patch to always delegate to the method call. Set the field, so it's in sync. --- .../net/minecraft/item/ItemStack.java.patch | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 fml/patches/minecraft/net/minecraft/item/ItemStack.java.patch diff --git a/fml/patches/minecraft/net/minecraft/item/ItemStack.java.patch b/fml/patches/minecraft/net/minecraft/item/ItemStack.java.patch new file mode 100644 index 0000000000..37ac209756 --- /dev/null +++ b/fml/patches/minecraft/net/minecraft/item/ItemStack.java.patch @@ -0,0 +1,36 @@ +--- ../src-base/minecraft/net/minecraft/item/ItemStack.java ++++ ../src-work/minecraft/net/minecraft/item/ItemStack.java +@@ -45,6 +45,7 @@ + private EntityItemFrame field_82843_f; + private static final String __OBFID = "CL_00000043"; + ++ private cpw.mods.fml.common.registry.RegistryDelegate delegate; + public ItemStack(Block p_i1876_1_) + { + this(p_i1876_1_, 1); +@@ -72,7 +73,7 @@ + + public ItemStack(Item p_i1881_1_, int p_i1881_2_, int p_i1881_3_) + { +- this.field_151002_e = p_i1881_1_; ++ func_150996_a(p_i1881_1_); + this.field_77994_a = p_i1881_2_; + this.field_77991_e = p_i1881_3_; + +@@ -106,7 +107,7 @@ + + public Item func_77973_b() + { +- return this.field_151002_e; ++ return this.delegate.get(); + } + + @SideOnly(Side.CLIENT) +@@ -744,6 +745,7 @@ + + public void func_150996_a(Item p_150996_1_) + { ++ this.delegate = p_150996_1_ != null ? p_150996_1_.delegate : null; + this.field_151002_e = p_150996_1_; + } +