Files
MinecraftForge/fml/patches/minecraft/net/minecraft/item/ItemStack.java.patch
T

51 lines
1.8 KiB
Diff

--- ../src-base/minecraft/net/minecraft/item/ItemStack.java
+++ ../src-work/minecraft/net/minecraft/item/ItemStack.java
@@ -52,6 +52,7 @@
private boolean field_179551_k;
private static final String __OBFID = "CL_00000043";
+ private cpw.mods.fml.common.registry.RegistryDelegate<Item> delegate;
public ItemStack(Block p_i1876_1_)
{
this(p_i1876_1_, 1);
@@ -83,7 +84,7 @@
this.field_179553_i = false;
this.field_179550_j = null;
this.field_179551_k = false;
- this.field_151002_e = p_i1881_1_;
+ this.func_150996_a(p_i1881_1_);
this.field_77994_a = p_i1881_2_;
this.field_77991_e = p_i1881_3_;
@@ -123,7 +124,7 @@
public Item func_77973_b()
{
- return this.field_151002_e;
+ return this.delegate != null ? this.delegate.get() : null;
}
public boolean func_179546_a(EntityPlayer p_179546_1_, World p_179546_2_, BlockPos p_179546_3_, EnumFacing p_179546_4_, float p_179546_5_, float p_179546_6_, float p_179546_7_)
@@ -172,11 +173,11 @@
{
if (p_77963_1_.func_150297_b("id", 8))
{
- this.field_151002_e = Item.func_111206_d(p_77963_1_.func_74779_i("id"));
+ this.func_150996_a(Item.func_111206_d(p_77963_1_.func_74779_i("id")));
}
else
{
- this.field_151002_e = Item.func_150899_d(p_77963_1_.func_74765_d("id"));
+ this.func_150996_a(Item.func_150899_d(p_77963_1_.func_74765_d("id")));
}
this.field_77994_a = p_77963_1_.func_74771_c("Count");
@@ -870,6 +871,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_;
}