Closed snowyegret23 closed 1 month ago
Holder$Reference cannot be cast to EnchantmentType
https://github.com/SpongePowered/Sponge/blob/api-12/src/main/java/org/spongepowered/common/item/enchantment/SpongeRandomEnchantmentListBuilder.java#L138
Holder needs to be unpacked.
Also check for similar casting issues due to change of registry type to holder
Affected Product(s)
SpongeVanilla
Version
1.21-12.0.0-RC1755
Operating System
Windows
Java Version
openjdk version "21.0.3" 2024-04-16 LTS OpenJDK Runtime Environment Temurin-21.0.3+9 (build 21.0.3+9-LTS) OpenJDK 64-Bit Server VM Temurin-21.0.3+9 (build 21.0.3+9-LTS, mixed mode, sharing)
Plugins/Mods
Describe the bug
spongevanilla-1.21-12.0.0-RC1734-universal -> A bug occurs when I put an item and lapis lazuli in the enchantment table and click on the enchantment it. -> Enchantments will appear, but will not be enchanted.
spongevanilla-1.21-12.0.0-RC1755-universal -> Putting an item in the enchantment table causes a bug. -> The bug occurs even if you don't put lapis lazuli. -> Enchantments (sharp II, silk touch....) do not appear.
Link to logs
https://gist.github.com/snowyegret23/5cc0c0642e9e4a37609d0c3c80b9f24f