Fixed ItemStacks having ForgeCaps tag when no caps are serialized.
This commit is contained in:
parent
24cccab718
commit
5964bf8cb2
1 changed files with 18 additions and 14 deletions
|
@ -57,11 +57,15 @@
|
|||
EnumActionResult enumactionresult = this.func_77973_b().func_180614_a(this, p_179546_1_, p_179546_2_, p_179546_3_, p_179546_4_, p_179546_5_, p_179546_6_, p_179546_7_, p_179546_8_);
|
||||
|
||||
if (enumactionresult == EnumActionResult.SUCCESS)
|
||||
@@ -173,12 +180,16 @@
|
||||
@@ -173,12 +180,20 @@
|
||||
p_77955_1_.func_74782_a("tag", this.field_77990_d);
|
||||
}
|
||||
|
||||
+ if (this.capabilities != null) p_77955_1_.func_74782_a("ForgeCaps", this.capabilities.serializeNBT());
|
||||
+ if (this.capabilities != null)
|
||||
+ {
|
||||
+ NBTTagCompound cnbt = this.capabilities.serializeNBT();
|
||||
+ if (!cnbt.func_82582_d()) p_77955_1_.func_74782_a("ForgeCaps", this.capabilities.serializeNBT());
|
||||
+ }
|
||||
+
|
||||
return p_77955_1_;
|
||||
}
|
||||
|
@ -75,7 +79,7 @@
|
|||
this.field_77994_a = p_77963_1_.func_74771_c("Count");
|
||||
this.field_77991_e = p_77963_1_.func_74765_d("Damage");
|
||||
|
||||
@@ -196,11 +207,12 @@
|
||||
@@ -196,11 +211,12 @@
|
||||
this.field_151002_e.func_179215_a(this.field_77990_d);
|
||||
}
|
||||
}
|
||||
|
@ -89,7 +93,7 @@
|
|||
}
|
||||
|
||||
public boolean func_77985_e()
|
||||
@@ -210,7 +222,7 @@
|
||||
@@ -210,7 +226,7 @@
|
||||
|
||||
public boolean func_77984_f()
|
||||
{
|
||||
|
@ -98,7 +102,7 @@
|
|||
}
|
||||
|
||||
public boolean func_77981_g()
|
||||
@@ -220,32 +232,27 @@
|
||||
@@ -220,32 +236,27 @@
|
||||
|
||||
public boolean func_77951_h()
|
||||
{
|
||||
|
@ -136,7 +140,7 @@
|
|||
}
|
||||
|
||||
public boolean func_96631_a(int p_96631_1_, Random p_96631_2_)
|
||||
@@ -277,8 +284,8 @@
|
||||
@@ -277,8 +288,8 @@
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -147,7 +151,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
@@ -332,7 +339,7 @@
|
||||
@@ -332,7 +343,7 @@
|
||||
|
||||
public boolean func_150998_b(IBlockState p_150998_1_)
|
||||
{
|
||||
|
@ -156,7 +160,7 @@
|
|||
}
|
||||
|
||||
public boolean func_111282_a(EntityPlayer p_111282_1_, EntityLivingBase p_111282_2_, EnumHand p_111282_3_)
|
||||
@@ -342,7 +349,7 @@
|
||||
@@ -342,7 +353,7 @@
|
||||
|
||||
public ItemStack func_77946_l()
|
||||
{
|
||||
|
@ -165,7 +169,7 @@
|
|||
|
||||
if (this.field_77990_d != null)
|
||||
{
|
||||
@@ -354,7 +361,19 @@
|
||||
@@ -354,7 +365,19 @@
|
||||
|
||||
public static boolean func_77970_a(@Nullable ItemStack p_77970_0_, @Nullable ItemStack p_77970_1_)
|
||||
{
|
||||
|
@ -186,7 +190,7 @@
|
|||
}
|
||||
|
||||
public static boolean func_77989_b(@Nullable ItemStack p_77989_0_, @Nullable ItemStack p_77989_1_)
|
||||
@@ -364,7 +383,11 @@
|
||||
@@ -364,7 +387,11 @@
|
||||
|
||||
private boolean func_77959_d(ItemStack p_77959_1_)
|
||||
{
|
||||
|
@ -199,7 +203,7 @@
|
|||
}
|
||||
|
||||
public static boolean func_179545_c(@Nullable ItemStack p_179545_0_, @Nullable ItemStack p_179545_1_)
|
||||
@@ -764,6 +787,7 @@
|
||||
@@ -764,6 +791,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -207,7 +211,7 @@
|
|||
return list;
|
||||
}
|
||||
|
||||
@@ -875,7 +899,7 @@
|
||||
@@ -875,7 +903,7 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -216,7 +220,7 @@
|
|||
}
|
||||
|
||||
return multimap;
|
||||
@@ -908,6 +932,18 @@
|
||||
@@ -908,6 +936,18 @@
|
||||
@Deprecated
|
||||
public void func_150996_a(Item p_150996_1_)
|
||||
{
|
||||
|
@ -235,7 +239,7 @@
|
|||
this.field_151002_e = p_150996_1_;
|
||||
}
|
||||
|
||||
@@ -993,4 +1029,45 @@
|
||||
@@ -993,4 +1033,45 @@
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue