Change crystal ore drop quantity to drop the intended 1-3 crystals (rather than the previous 1-2) and change fortune behaviour to work like vanilla ores, see discussion in #43

This commit is contained in:
Electroblob
2018-06-03 15:52:13 +01:00
parent 46df8d7311
commit c2366ed1ba
@@ -20,10 +20,17 @@ public class BlockCrystalOre extends Block {
@Override
public int quantityDropped(IBlockState state, int fortune, Random random){
// This now works the same way as vanilla ores
if(fortune > 0){
return random.nextInt(2) + 1 + random.nextInt(fortune);
int i = random.nextInt(fortune + 2) - 1;
if(i < 0) i = 0;
return (random.nextInt(3) + 1) * (i + 1);
}else{
return random.nextInt(2) + 1;
return random.nextInt(3) + 1;
}
}