mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-17 19:05:16 +00:00
Fixed a weird crash relating to metadata on colored items.
This commit is contained in:
1 parent
a6a3a67de6
commit
9ea8ea5ae7
1 file changed
+3
@@ -29,6 +29,9 @@ public class Item16Colors extends ItemMod {
|
||||
|
||||
@Override
|
||||
public int getColorFromItemStack(ItemStack par1ItemStack, int par2) {
|
||||
if(par1ItemStack.getItemDamage() >= EntitySheep.fleeceColorTable.length)
|
||||
return 0xFFFFFF;
|
||||
|
||||
float[] color = EntitySheep.fleeceColorTable[par1ItemStack.getItemDamage()];
|
||||
return new Color(color[0], color[1], color[2]).getRGB();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user