ActuallyAdditions icon indicating copy to clipboard operation
ActuallyAdditions copied to clipboard

[Bug]: Lens of Disenchantment + Apotheosis Endersurge Gem = unbounded enchantment levels

Open James103 opened this issue 1 year ago • 3 comments

General Info

  • [X] I am running a modpack (Craftoria 1.11.0)
  • [X] I can reproduce this issue consistently in single-player
  • [ ] I can reproduce this issue consistently in multi-player
  • [X] I have searched for this issue previously and it was either (1) not previously reported, or (2) previously fixed and I am having the same problem.
  • [ ] I am crashing and can provide my crash report(s)
  • [x] I am using the latest version of the mod

Forge/Neoforge version

Neoforge 21.1.90

Minecraft version

1.21.1

Mod version

1.3.12

Java version

21.0.2

Issue Description

When the Lens of Disenchantment disenchants an enchanted item with an Endersurge Gem from Apotheosis socketed inside, the Endersurge Gem's "+N levels to all existing enchantments" bonus is applied (along with all other enchantment level modifiers on the item) and the final level (not the old base level) becomes the new base level of the enchanted book and any leftover enchantments.

With the right setup, this can be repeated infinitely, leading to unbounded enchantment levels.

Please check if there's a function similar to Enchantment#getLevel which gets the enchantment's base level (instead of the level after modifiers) and if so, substitute a call to that function here: https://github.com/Ellpeck/ActuallyAdditions/blob/4abc36599226f248cbf7660e1f73a33040616692/src/main/java/de/ellpeck/actuallyadditions/mod/items/lens/LensDisenchanting.java#L76

Additional Information

Should be fixed by https://github.com/Ellpeck/ActuallyAdditions/pull/1472.

James103 avatar Jan 05 '25 15:01 James103

https://github.com/Ellpeck/ActuallyAdditions/pull/1472 has been merged

Mrbysco avatar Feb 02 '25 20:02 Mrbysco

https://www.curseforge.com/minecraft/mc-mods/actually-additions/files/6151639

Mrbysco avatar Feb 02 '25 21:02 Mrbysco

From what I heard this is still an issue even after merging #1472

Mrbysco avatar Apr 16 '25 13:04 Mrbysco