spxctreofficial / enhancedcraft

This is EnhancedCraft: a mod designed to enhance the Minecraft experience with new tools, weapons, ores, and mobs, while also tweaking aspects of the vanilla game to make gameplay more fun and immersive.
https://modrinth.com/mod/enhancedcraft
GNU General Public License v3.0
5 stars 4 forks source link

Another Field named "SHIELD" already in EnchantmentTarget #40

Closed spxctreofficial closed 1 year ago

spxctreofficial commented 2 years ago

Compatibility issue with QuEnchantments regarding Fabric-ASM on the EnchantmentTarget enum.

I don't know exactly, in which mod is the cause of this error. It may be not related directly to your mod. But if you help, I will appreciate!

This mods combination works well:

enhancedcraft-1.4-SNAPSHOT+build.53+1.19.2 modmenu-4.0.6 qfapi-4.0.0-beta.10_qsl-3.0.0-beta.15_fapi-0.60.0_mc-1.19.2

And this mods combinations also works well: qu-enchantments-1.2.3-1.19 modmenu-4.0.6 qfapi-4.0.0-beta.10_qsl-3.0.0-beta.15_fapi-0.60.0_mc-1.19.2

But if I put these mods together: qu-enchantments-1.2.3-1.19 enhancedcraft-1.4-SNAPSHOT+build.53+1.19.2 modmenu-4.0.6 qfapi-4.0.0-beta.10_qsl-3.0.0-beta.15_fapi-0.60.0_mc-1.19.2

I got an error:

[19:07:32] [main/ERROR]: Minecraft has crashed!
org.quiltmc.loader.impl.FormattedException: java.lang.ClassFormatError: Duplicate field name "SHIELD" with signature "Lnet.minecraft.class_1886;" in class file net/minecraft/class_1886
    at org.quiltmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:425) ~[quilt-loader-0.17.5-beta.1.jar:?]
    at org.quiltmc.loader.impl.launch.knot.Knot.launch(Knot.java:76) [quilt-loader-0.17.5-beta.1.jar:?]
    at org.quiltmc.loader.impl.launch.knot.KnotClient.main(KnotClient.java:24) [quilt-loader-0.17.5-beta.1.jar:?]
    at jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104) ~[?:?]
    at java.lang.reflect.Method.invoke(Method.java:577) ~[?:?]
    at org.polymc.impl.OneSixLauncher.invokeMain(OneSixLauncher.java:104) [NewLaunch.jar:?]
    at org.polymc.impl.OneSixLauncher.launchWithMainClass(OneSixLauncher.java:175) [NewLaunch.jar:?]
    at org.polymc.impl.OneSixLauncher.launch(OneSixLauncher.java:185) [NewLaunch.jar:?]
    at org.polymc.EntryPoint.listen(EntryPoint.java:144) [NewLaunch.jar:?]
    at org.polymc.EntryPoint.main(EntryPoint.java:74) [NewLaunch.jar:?]
Caused by: java.lang.ClassFormatError: Duplicate field name "SHIELD" with signature "Lnet.minecraft.class_1886;" in class file net/minecraft/class_1886
    at java.lang.ClassLoader.defineClass1(Native Method) ~[?:?]
    at java.lang.ClassLoader.defineClass(ClassLoader.java:1013) ~[?:?]
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:150) ~[?:?]
    at org.quiltmc.loader.impl.launch.knot.KnotClassLoader.defineClassFwd(KnotClassLoader.java:224) ~[quilt-loader-0.17.5-beta.1.jar:?]
    at org.quiltmc.loader.impl.launch.knot.KnotClassDelegate.tryLoadClass(KnotClassDelegate.java:170) ~[quilt-loader-0.17.5-beta.1.jar:?]
    at org.quiltmc.loader.impl.launch.knot.KnotClassLoader.loadClass(KnotClassLoader.java:156) ~[quilt-loader-0.17.5-beta.1.jar:?]
    at java.lang.ClassLoader.loadClass(ClassLoader.java:521) ~[?:?]
    at net.minecraft.class_1761.<init>(class_1761.java:107) ~[client-intermediary.jar:?]
    at net.minecraft.class_1761$1.<init>(class_1761.java:15) ~[client-intermediary.jar:?]
    at net.minecraft.class_1761.<clinit>(class_1761.java:15) ~[client-intermediary.jar:?]
    at net.minecraft.class_1802.<clinit>(class_1802.java:22) ~[client-intermediary.jar:?]
    at net.minecraft.class_1792.method_7867(class_1792.java:74) ~[client-intermediary.jar:?]
    at net.minecraft.class_2248.method_8389(class_2248.java:554) ~[client-intermediary.jar:?]
    at net.minecraft.class_7143$class_7144.method_41583(class_7143.java:60) ~[client-intermediary.jar:?]
    at net.minecraft.class_7143$class_7144.method_41581(class_7143.java:66) ~[client-intermediary.jar:?]
    at net.minecraft.class_7143.method_41579(class_7143.java:199) ~[client-intermediary.jar:?]
    at net.minecraft.class_5458.method_44104(class_5458.java:98) ~[client-intermediary.jar:?]
    at net.minecraft.class_5458.method_30566(class_5458.java:105) ~[client-intermediary.jar:?]
    at java.util.LinkedHashMap.forEach(LinkedHashMap.java:721) ~[?:?]
    at net.minecraft.class_5458.<clinit>(class_5458.java:104) ~[client-intermediary.jar:?]
    at net.minecraft.class_2378.<clinit>(class_2378.java:326) ~[client-intermediary.jar:?]
    at net.minecraft.class_2966.method_12851(class_2966.java:50) ~[client-intermediary.jar:?]
    at net.minecraft.client.main.Main.method_44604(Main.java:161) ~[minecraft-1.19.2-client.jar:?]
    at net.minecraft.client.main.Main.main(Main.java:51) ~[minecraft-1.19.2-client.jar:?]
    at jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104) ~[?:?]
    at java.lang.reflect.Method.invoke(Method.java:577) ~[?:?]
    at org.quiltmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:423) ~[quilt-loader-0.17.5-beta.1.jar:?]
    ... 9 more

If you may help, this would be great. Thanks anyway!

Originally posted by @lospejos in https://github.com/spxctreofficial/enhancedcraft/issues/39#issuecomment-1237262845

spxctreofficial commented 2 years ago

@lospejos Seems to be an issue with QuEnchantments and their implementation of shield-specific enchantments conflicting with v1.4's implementation. Will look into a fix, thanks for the heads up.

spxctreofficial commented 2 years ago

This build should fix the incompatibility (they should no longer force the game to crash, not sure if the functionality has been altered in any way).

lospejos commented 2 years ago

It works, thanks for assistance!

spxctreofficial commented 1 year ago

Fixed as of v1.4.