mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-13 00:37:52 +00:00
Fixed possible ClassCastException with dye-able armor. (#5985)
This commit is contained in:
1 parent
5d33697cb1
commit
995a8b8d35
1 file changed
+2
-1
@@ -11,9 +11,10 @@
|
||||
boolean flag = this.func_188363_b(p_188361_9_);
|
||||
- this.func_215333_a(this.func_177181_a(armoritem, flag));
|
||||
- if (armoritem instanceof DyeableArmorItem) {
|
||||
- int i = ((DyeableArmorItem)armoritem).func_200886_f(itemstack);
|
||||
+ this.func_215333_a(this.getArmorResource(p_188361_1_, itemstack, p_188361_9_, null));
|
||||
+ if (armoritem instanceof net.minecraft.item.IDyeableArmorItem) { // Allow this for anything, not only cloth
|
||||
int i = ((DyeableArmorItem)armoritem).func_200886_f(itemstack);
|
||||
+ int i = ((net.minecraft.item.IDyeableArmorItem)armoritem).func_200886_f(itemstack);
|
||||
float f = (float)(i >> 16 & 255) / 255.0F;
|
||||
float f1 = (float)(i >> 8 & 255) / 255.0F;
|
||||
float f2 = (float)(i & 255) / 255.0F;
|
||||
|
||||
Reference in new issue
Block a user