Changed fortune logic in infernal touch (Thanks Markster!)

This commit is contained in:
Auxilor 2021-02-06 17:10:59 +00:00
parent 487c9eb428
commit df7c2d23c9

View File

@ -111,7 +111,7 @@ public class InfernalTouch extends EcoEnchant {
experience += out.getSecond(); experience += out.getSecond();
if (fortune > 0 && FORTUNE_MATERIALS.contains(itemStack.getType())) { if (fortune > 0 && FORTUNE_MATERIALS.contains(itemStack.getType())) {
itemStack.setAmount((int) Math.ceil(1 / ((double) fortune + 2) + ((double) fortune + 1) / 2)); itemStack.setAmount((int) Math.round((Math.random() * ((double) fortune - 1)) + 1.1));
experience++; experience++;
} }
} }