Curios API (Forge/NeoForge)

Curios API (Forge/NeoForge)

140M Downloads

getFortuneLevel could also increase other enchantment levels

florensie opened this issue ยท 1 comments

commented

https://github.com/TheIllusiveC4/Curios/blob/1.18.x/src/main/java/top/theillusivec4/curios/mixin/core/MixinApplyBonusCount.java

This is meant to increase the fortune level used by the loot function. This loot function could be used for other enchantments than fortune, however. Vanilla only uses the function for fortune, but this is an issue when user datapacks or or mods use the minecraft:apply_bonus function for other enchantments.

Example:

{
    "function": "minecraft:apply_bonus",
    "enchantment": "minecraft:fortune",
    "formula": "minecraft:uniform_bonus_count",
   "parameters": {
        "bonusMultiplier": 1
    }
}

Enchantment could be any other enchantment. MixinApplyBonusCount#curios$applyFortune should filter for fortune-only functions.

commented
@Shadow @Final Enchantment enchantment;

if (this.enchantment == Enchantments.BLOCK_FORTUNE) {...}