Better Trims

Better Trims

4M Downloads

[Bug Report] Modded armor may lose enchantability when trimmed with lapis

James103 opened this issue ยท 2 comments

commented

Expected Behaviour
Trimming a modded armor piece with enchantability greater than 30, with lapis as the material, should not result in the armor piece losing enchantability.
Ideally, armor pieces trimmed with lapis should have increased enchantability, either as a flat bonus or a percentage, instead of being set to a specific value.

Actual Behaviour
Trimming a modded armor piece with enchantability greater than 30, with lapis as the material, results in the armor piece losing enchantability until it has 30.

If the config option lapisEnchantability is reduced below 25, this can be reproduced in a vanilla environment with only BetterTrims and the latest Fabric API.

Caused by: https://github.com/Benjamin-Norton/BetterTrims/blob/71507c1fb13413bc18cecf473eb1a9368128bb76/src/main/java/com/bawnorton/bettertrims/mixin/EnchantmentHelperMixin.java#L17

Steps to Reproduce

  1. Set the config option lapisEnchantability to a value less than 30, such as 1.
  2. Enchant a large number of pieces of golden armor (without any trim) in a vanilla enchantment table.
  3. Trim the same number of pieces of golden armor using lapis as the material, then enchant them all in a vanilla enchantment table using the same setup as in step 2.
  4. Compare the resulting enchantments. Notice the lapis-trimmed gold armor has worse enchantments on average compared to armor without any trim, due to the lapis trim setting the enchantability to a value less than the base enchantability for gold.

What version of the mod are you using
71507c1

commented

Ah yeah, I see how this is can be an issue, I'll change it to adding instead of setting

commented

Fixed in 1.2.2