Skip to content
Permalink
Browse files

fix edge case in BlockAsh drops causing crash, fixes #2440 (#2441)

  • Loading branch information
temp1011 authored and Nedelosk committed Jul 31, 2019
1 parent 29c7d1e commit 1ab3e04763288a89a179a694b611ba9b9b914ffe
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/main/java/forestry/arboriculture/blocks/BlockAsh.java
@@ -80,7 +80,7 @@ public void getDrops(NonNullList<ItemStack> drops, IBlockAccess world, BlockPos
amount += rand.nextInt(1 + fortune);
}
drops.add(new ItemStack(Items.COAL, amount, 1));
drops.add(new ItemStack(ModuleCore.getItems().ash, 1 + rand.nextInt(amount / 4)));
drops.add(new ItemStack(ModuleCore.getItems().ash, 1 + rand.nextInt(Math.max(amount / 4, 1))));
}
}

0 comments on commit 1ab3e04

Please sign in to comment.
You can’t perform that action at this time.