OreDrop fixes

Fixes 2 issues.

1/100 block breaks, a non-fortune tool grants an extra item

Bug that breaks drops if the base count is > 1
This commit is contained in:
joflashstudios 2015-06-08 01:41:15 -04:00
parent ace69fc5be
commit 00d2f5f8fd

View file

@ -49,13 +49,13 @@ public class OreDrop
int chanceOfEachBonus = 100 / (level + 2);
int roll = random.nextInt(100);
if (roll <= chanceOfEachBonus * level) //If level = 0, this is always false
if (roll < chanceOfEachBonus * level) //If level = 0, this is always false
{
return (roll / chanceOfEachBonus) + 2;
return count * ((roll / chanceOfEachBonus) + 2);
}
else
{
return 1;
return count;
}
}