Skip to content

Commit

Permalink
Fix division by zero crash, fixes #32 (#33)
Browse files Browse the repository at this point in the history
  • Loading branch information
TheCodedOne authored and unascribed committed Aug 2, 2018
1 parent b7f5b64 commit 6009651
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/com/elytradev/fruitphone/FruitPhone.java
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ public ItemStack getIconItemStack() {
}
int iTicks = (int)ClientProxy.ticks;
if (iTicks%20 == 0) {
int col = FruitRecipes.craftableColors.get((iTicks/20) % FruitRecipes.craftableColors.size());
int col = FruitRecipes.craftableColors.get((iTicks == 0 ? 0 : iTicks / 20) % FruitRecipes.craftableColors.size());
icon.getTagCompound().setInteger("fruitphone:color", col);
}
return icon;
Expand Down

0 comments on commit 6009651

Please sign in to comment.