mirror of
https://github.com/Auxilor/EcoEnchants.git
synced 2024-11-21 14:55:17 +01:00
Optimised InfernalTouch
This commit is contained in:
parent
efc8e8c977
commit
f3b94c87be
@ -87,8 +87,9 @@ public class InfernalTouch extends EcoEnchant {
|
||||
int fortune = EnchantChecks.getMainhandLevel(player, Enchantment.LOOT_BONUS_BLOCKS);
|
||||
|
||||
for (ItemStack itemStack : drops) {
|
||||
itemStack.setType(getOutput(itemStack.getType()).getFirst());
|
||||
experience += (getOutput(itemStack.getType()).getSecond());
|
||||
Pair<Material, Integer> out = getOutput(itemStack.getType());
|
||||
itemStack.setType(out.getFirst());
|
||||
experience += out.getSecond();
|
||||
|
||||
if(fortune > 0 && allowsFortune.contains(itemStack.getType())) {
|
||||
itemStack.setAmount((int) Math.ceil(1 / ((double) fortune + 2) + ((double) fortune + 1) / 2));
|
||||
|
Loading…
Reference in New Issue
Block a user