From c2366ed1bac1da6c896f245fd482b7f04bf80d4e Mon Sep 17 00:00:00 2001 From: Electroblob <35599699+Electroblob77@users.noreply.github.com> Date: Sun, 3 Jun 2018 15:52:13 +0100 Subject: [PATCH] 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 --- .../electroblob/wizardry/block/BlockCrystalOre.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/main/java/electroblob/wizardry/block/BlockCrystalOre.java b/src/main/java/electroblob/wizardry/block/BlockCrystalOre.java index 057162a2..ea7430c7 100644 --- a/src/main/java/electroblob/wizardry/block/BlockCrystalOre.java +++ b/src/main/java/electroblob/wizardry/block/BlockCrystalOre.java @@ -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; } }