mirror of
https://github.com/Auxilor/EcoEnchants.git
synced 2024-11-26 15:45:12 +01:00
Fixed fortune check for infernal touch
This commit is contained in:
parent
228df89bf2
commit
1f5b211e17
@ -39,7 +39,7 @@ public final class InfernalTouch extends EcoEnchant {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
FurnaceRecipe furnaceRecipe = (FurnaceRecipe) recipe;
|
FurnaceRecipe furnaceRecipe = (FurnaceRecipe) recipe;
|
||||||
recipes.put(furnaceRecipe.getInput().getType(), new Pair<>(furnaceRecipe.getResult().getType(), (int) furnaceRecipe.getExperience()));
|
recipes.put(furnaceRecipe.getInput().getType(), new Pair<>(furnaceRecipe.getResult().getType(), (int) Math.ceil(furnaceRecipe.getExperience())));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -83,6 +83,7 @@ public final class InfernalTouch extends EcoEnchant {
|
|||||||
|
|
||||||
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));
|
||||||
|
experience.addAndGet(1);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user