mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-13 16:54:06 +00:00
Fixed the Signal Flare item crashing if an invalid color is loaded somehow.
This commit is contained in:
1 parent
17bc5ea3d7
commit
ba454c6358
1 file changed
+4
@@ -101,6 +101,10 @@ public class ItemSignalFlare extends ItemMod {
|
||||
if(par2 == 0)
|
||||
return 0xFFFFFF;
|
||||
|
||||
int colorv = getColor(par1ItemStack);
|
||||
if(colorv >= EntitySheep.fleeceColorTable.length || colorv < 0)
|
||||
return 0xFFFFFF;
|
||||
|
||||
float[] color = EntitySheep.fleeceColorTable[getColor(par1ItemStack)];
|
||||
return new Color(color[0], color[1], color[2]).getRGB();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user