mirror of
https://github.com/Auxilor/EcoEnchants.git
synced 2025-02-18 04:51:20 +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);
|
int fortune = EnchantChecks.getMainhandLevel(player, Enchantment.LOOT_BONUS_BLOCKS);
|
||||||
|
|
||||||
for (ItemStack itemStack : drops) {
|
for (ItemStack itemStack : drops) {
|
||||||
itemStack.setType(getOutput(itemStack.getType()).getFirst());
|
Pair<Material, Integer> out = getOutput(itemStack.getType());
|
||||||
experience += (getOutput(itemStack.getType()).getSecond());
|
itemStack.setType(out.getFirst());
|
||||||
|
experience += out.getSecond();
|
||||||
|
|
||||||
if(fortune > 0 && allowsFortune.contains(itemStack.getType())) {
|
if(fortune > 0 && allowsFortune.contains(itemStack.getType())) {
|
||||||
itemStack.setAmount((int) Math.ceil(1 / ((double) fortune + 2) + ((double) fortune + 1) / 2));
|
itemStack.setAmount((int) Math.ceil(1 / ((double) fortune + 2) + ((double) fortune + 1) / 2));
|
||||||
|
Loading…
Reference in New Issue
Block a user