Tweaked OreDrop constructor

baseChance is now exposed to the rest of the world as a double, since it was just an error waiting to happen when somebody enters the % chance as stack size or vice versa.
This commit is contained in:
joflashstudios 2015-06-08 01:06:56 -04:00
parent 999567e6df
commit ace69fc5be

View file

@ -19,11 +19,11 @@ public class OreDrop
this.baseChance = 100; this.baseChance = 100;
} }
public OreDrop(ItemStack drop, Integer baseChance) public OreDrop(ItemStack drop, double baseChance)
{ {
this.drop = drop; this.drop = drop;
this.count = drop.stackSize; this.count = drop.stackSize;
this.baseChance = baseChance; this.baseChance = (int)(baseChance * 100);
} }
public ItemStack getDrops(int fortuneLevel, Random random) public ItemStack getDrops(int fortuneLevel, Random random)