Apotheosis

Apotheosis

79M Downloads

Can't control enchantments on apothic bosses gear

DaytonaBlep opened this issue ยท 6 comments

commented

In my modpack, I'm trying to remove the drop of Life-mending enchantment from the entry world, for the sake of balance, making the book a reward for completing the quest, I've already disabled everything I could, but the bosses' equipment, as luck would have it, in most cases drops armor and weapons with Life-mending II or even III. What can I do, maybe there is some mod to control enchantments, or a mod setting somewhere?

commented

Enchantments can be disabled in the enchantment.cfg config file

commented

I saw this, don't these settings turn off all sources?

"apotheosis:life_mending" {
    # The max level of this enchantment - originally 3.
    # Default: 3; Range: [1 ~ 127]
    I:"Max Level"=3

    # The max level of this enchantment available from loot sources.
    # Default: 3; Range: [1 ~ 127]
    I:"Max Loot Level"=1

    # A function to determine the max enchanting power.  The variable "x" is level.  See: https://github.com/uklimaschewski/EvalEx#usage-examples
    # Default: 
    S:"Max Power Function"=

    # A function to determine the min enchanting power.
    # Default: 
    S:"Min Power Function"=

    # If this enchantment is only available by loot sources.
    # Default: false
    B:Treasure=false

    # If this enchantment is obtainable via enchanting and enchanted loot items.
    # Default: true
    B:Discoverable=false

    # If enchanted books of this enchantment are available via loot sources.
    # Default: true
    B:Lootable=false

    # If enchanted books of this enchantment are available via villager trades.
    # Default: true
    B:Tradeable=false

    # The rarity of this enchantment.  Valid values are COMMON, UNCOMMON, RARE, and VERY_RARE.
    # Default: VERY_RARE
    S:Rarity=VERY_RARE
}
commented

I tested again. Eh, I think it doesn't control the bosses gear
image
image

commented

do you have B:"Curse Boss Items" enabled in adventure.cfg?

The enchant boss gear logic shouldn't apply this anyway since Life-Mending is a curse (and it skips curses)
so the only explanation would be this part

if (AdventureConfig.curseBossItems) {
final ItemStack stk = stack; // Lambda rules require this instead of a direct reference to stack
List<Enchantment> curses = ForgeRegistries.ENCHANTMENTS.getValues().stream().filter(e -> e.canApplyAtEnchantingTable(stk) && e.isCurse()).collect(Collectors.toList());
if (!curses.isEmpty()) {
Enchantment curse = curses.get(rand.nextInt(curses.size()));
enchMap.put(curse, Mth.nextInt(rand, 1, EnchHooks.getMaxLevel(curse)));
}
}

(It may need a check for discoverable)

commented

It actually worked, too bad Life-Mending is considered a curse, it literally means I have to give up one nerfed feature to enable another. In any case, it is better without cursed gear than with the omnipresent Life-Mending, thank you.

commented

@Shadows-of-Fire shouldn't be there a check to determine if the curses are available?