PlanetTeamSpeakk / MoreCommands

The source code of my mod, MoreCommands
https://www.curseforge.com/minecraft/mc-mods/morecommands
Creative Commons Zero v1.0 Universal
14 stars 5 forks source link

MoreCommands causes DynoCaps to load infinitely OR MoreCommands crashes mc. #13

Closed K0-RR closed 3 years ago

K0-RR commented 3 years ago

After adding your mod to my modpack the game won't finish loading. It stops on dynocaps but only when MoreCommands is present. https://paste.ee/p/mV02p

PlanetTeamSpeakk commented 3 years ago

Not sure if it is related, but after looking at the log, I did notice MoreCommands cannot find a certain class that's only present in newer versions of the API. So for starters, I suggest you update the Fabric API to the latest version, which is 0.29.3, I believe, and then try again.

PlanetTeamSpeakk commented 3 years ago

MoreCommands also seems to conflict with some mod named drogtors as they both try to redirect a call that broadcasts a message when someone leaves, although this conflict should not stop your game from loading, I don't think it should, at least. If the problem still persist, however, I suggest you open the MoreCommands jar file with something like WinRar and remove the line saying "MixinServerPlayNetworkHandler" from the file morecommands.common_mixins.json although this may have unwanted consequences.

K0-RR commented 3 years ago

0.29.3

I'm on this version. I reported this to dynocaps too and I'm waiting for a response from them.

PlanetTeamSpeakk commented 3 years ago

May I suggest trying to load only MoreCommands and Dynocaps and sending that log instead? This one is too cluttered to make anything out.

K0-RR commented 3 years ago

Loading only MoreCommands and Dynocaps works so this may be caused by more than these two mods. I will try with drogtors and other mods if needed but I don't have time for this yet sorry.

K0-RR commented 3 years ago

Wait I'm stupid and didn't remember that I disabled DynoCaps [I found a similar mod] in multimc.

with these two and a few other mods mc crashes instead of hanging when loading - log

[12:53:54] [main/INFO]: Loading for game Minecraft 1.16.5
[12:53:56] [ForkJoinPool-1-worker-7/WARN]: The mod "autoconfig1u" contains invalid entries in its mod json:
- Unsupported root entry "$schema" at line 2 column 14
[12:53:56] [ForkJoinPool-1-worker-5/WARN]: The mod "autoconfig1u" contains invalid entries in its mod json:
- Unsupported root entry "$schema" at line 2 column 14
[12:53:56] [ForkJoinPool-1-worker-3/WARN]: The mod "cotton-config" contains invalid entries in its mod json:
- Unsupported root entry "licence" at line 7 column 12
[12:53:56] [ForkJoinPool-1-worker-3/WARN]: The mod "cotton-logging" contains invalid entries in its mod json:
- Unsupported root entry "licence" at line 7 column 12
[12:53:56] [main/WARN]: Warnings were found! 
 - Conflicting versions found for terraform-wood-api-v1: used 1.0.0+build.4, also found 1.0.0+build.1
 - Conflicting versions found for terraform-config-api-v1: used 1.0.0+build.4, also found 1.0.0+build.1
 - Conflicting versions found for terraform-surfaces-api-v1: used 1.0.0+build.4, also found 1.0.0+build.1
 - Conflicting versions found for terraform-biome-builder-api-v1: used 1.0.0+build.4, also found 1.0.0+build.1
 - Conflicting versions found for terraform-overworld-biome-extensions-api-v1: used 1.0.0+build.4, also found 1.0.0+build.1
[12:53:56] [main/INFO]: [FabricLoader] Loading 108 mods: fermion@2.1.191, fabric-keybindings-v0@0.2.1+ca58154a7d, fabricloader@0.11.1, hydrogen@0.2, cloth-durability-bar-api-v1@1.4.9, fabric-dimensions-v1@2.0.2+ca58154a7d, java@15, betternether@5.0.7, fabric-game-rule-api-v1@1.0.6+ca58154a7d, fermion-modkeys@1.10.218, fabric-api-base@0.2.0+daa38b3d7d, astromine-discoveries@1.11.5+fabric-1.16.5, ctm@0.2.0, piglib@1.0.1, fiber@0.23.0-2, org_joml_joml@1.10.0, maybe-data@1.0.0-1.16.2, cardinal-components-level@2.7.10, org_jetbrains_kotlin_kotlin-stdlib@1.4.0, astromine@1.11.5+fabric-1.16.5, astromine-transportations@1.11.5+fabric-1.16.5, terraform-dirt-api-v1@1.1.0+build.4, fabric-blockrenderlayer-v1@1.1.5+ca58154a7d, astromine-foundations@1.11.5+fabric-1.16.5, dynocaps@1.6.13, terraform-wood-api-v1@1.0.0+build.4, org_jetbrains_kotlin_kotlin-stdlib-jdk7@1.4.0, libblockattributes_items@0.8.5, fabric@0.29.4+1.16, fabric-networking-v0@0.3.2+ca58154a7d, cotton-config@1.0.0-rc.7, wrenchable@1.0.0+1.16.1, fabric-screen-handler-api-v1@1.1.1+ca58154a7d, tk_valoeghese_zoesteriaconfig@1.3.2, modmenu@1.14.15, morecommands@3.2, org_jetbrains_kotlin_kotlin-stdlib-jdk8@1.4.0, fabric-tool-attribute-api-v1@1.2.6+ca58154a7d, terraform-tree-api-v1@1.0.1+build.4, fabric-crash-report-info-v1@0.1.3+ca58154a7d, fabric-events-interaction-v0@0.4.2+ca58154a7d, patchouli@1.16.4-48-FABRIC, fabric-key-binding-api-v1@1.0.2+ca58154a7d, cloth-config2@4.8.3, fabric-resource-loader-v0@0.4.2+ca58154a7d, cardinal-components-entity@2.7.10, magna@1.4.3-1.16.2, libblockattributes_fluids@0.8.5, astromine-technologies@1.11.5+fabric-1.16.5, fabric-registry-sync-v0@0.7.4+ca58154a7d, fabric-commands-v0@0.2.2+ca58154a7d, cardinal-components-base@2.7.10, fabric-mining-levels-v0@0.1.3+ca58154a7d, fabric-networking-api-v1@1.0.1+ca58154a7d, fabric-models-v0@0.2.1+ca58154a7d, fabric-item-groups-v0@0.2.3+ca58154a7d, terraform-shapes-api-v1@1.0.0+build.4, fabric-renderer-api-v1@0.4.1+ca58154a7d, terrestria@2.1.6, cardinal-components-block@2.7.10, fabric-structure-api-v1@1.1.4+ca58154a7d, blade@2.0.0, fabric-containers-v0@0.1.10+ca58154a7d, fabric-object-builder-api-v1@1.9.3+ca58154a7d, terraform-config-api-v1@1.0.0+build.4, fabric-rendering-data-attachment-v1@0.1.5+ca58154a7d, campanion@1.3.2, terraform-surfaces-api-v1@1.0.0+build.4, fabric-textures-v0@1.0.6+ca58154a7d, cardinal-components-item@2.7.10, fabric-rendering-fluids-v1@0.1.13+ca58154a7d, reach-entity-attributes@1.0.1, cotton-logging@1.0.0-rc.4, ecotones@0.7.1, fabric-lifecycle-events-v1@1.2.1+ca58154a7d, sodium@0.1.1-SNAPSHOT, cardinal-components-chunk@2.7.10, traverse@3.3.1, cardinal-components-util@2.7.10, fabric-renderer-registries-v1@2.2.1+ca58154a7d, fabric-loot-tables-v1@1.0.2+ca58154a7d, fabric-particles-v1@0.2.4+ca58154a7d, libblockattributes_core@0.8.5, terraform-biome-builder-api-v1@1.0.0+build.4, minecraft@1.16.5, fabric-networking-blockentity-v0@0.2.8+ca58154a7d, jankson@3.0.1+j1.2.0, cloth-basic-math@0.5.1, fabric-command-api-v1@1.0.10+ca58154a7d, fabric-renderer-indigo@0.4.4+ca58154a7d, fabric-item-api-v1@1.2.1+ca58154a7d, libgui@3.0.0-beta.1+1.16.2-rc2, fabric-entity-events-v1@1.0.3+ca58154a7d, fabric-rendering-v0@1.1.2+ca58154a7d, fabric-rendering-v1@1.5.1+ca58154a7d, terraform-overworld-biome-extensions-api-v1@1.0.0+build.4, autoconfig1u@3.3.1, fabric-content-registries-v0@0.2.1+ca58154a7d, fabric-tag-extensions-v0@1.1.1+ca58154a7d, cardinal-components-world@2.7.10, indium@1.0.0, fabric-biome-api-v1@3.1.1+ca58154a7d, byg@1.1.3, cloth-datagen-api-v1@1.4.9, fabric-events-lifecycle-v0@0.2.1+ca58154a7d, astromine-core@1.11.5+fabric-1.16.5, team_reborn_energy@0.1.1, fabric-object-builders-v0@0.7.2+ca58154a7d
[12:53:57] [main/INFO]: SpongePowered MIXIN Subsystem Version=0.8.2 Source=file:/home/asus/.local/share/multimc/libraries/net/fabricmc/sponge-mixin/0.8.2+build.24/sponge-mixin-0.8.2+build.24.jar Service=Knot/Fabric Env=CLIENT
[12:53:58] [main/INFO]: Loaded configuration file for Sodium: 23 options available, 0 override(s) found
[12:53:58] [main/WARN]: Reference map 'blade-2.0.0+fabric-1.16.3-refmap.json' for blade.mixins.json could not be read. If this is a development environment you can ignore this message
[12:53:58] [main/WARN]: Reference map 'wrenchable-refmap.json' for wrenchable.mixins.json could not be read. If this is a development environment you can ignore this message
[12:53:58] [main/WARN]: Reference map 'astromine-technologies-refmap.json' for astromine-technologies.mixins.json could not be read. If this is a development environment you can ignore this message
[12:53:58] [main/WARN]: Reference map 'astromine-transportations-refmap.json' for astromine-transportations.mixins.json could not be read. If this is a development environment you can ignore this message
[12:53:58] [main/WARN]: Reference map 'astromine-foundations-refmap.json' for astromine-foundations.mixins.json could not be read. If this is a development environment you can ignore this message
[12:54:03] [main/WARN]: Trying to reflect-hack into the class-loader so we can define our own classes in an unrestricted loader...
[12:54:03] [main/WARN]: ** The JVM might warn you with something nasty! **
[12:54:03] [main/INFO]: Injecting class 'com.google.common.collect.HydrogenImmutableMapEntry' (url: jar:file:/home/asus/.local/share/multimc/instances/1.16.4/.minecraft/mods/hydrogen-fabric-mc1.16.5-0.2.jar!/com/google/common/collect/HydrogenImmutableMapEntry.class)
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by me.jellysquid.mods.hydrogen.common.jvm.ClassDefineTool (file:/home/asus/.local/share/multimc/instances/1.16.4/.minecraft/mods/hydrogen-fabric-mc1.16.5-0.2.jar) to method java.lang.ClassLoader.defineClass(byte[],int,int)
WARNING: Please consider reporting this to the maintainers of me.jellysquid.mods.hydrogen.common.jvm.ClassDefineTool
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
[12:54:03] [main/INFO]: Injecting class 'com.google.common.collect.HydrogenImmutableReferenceHashMap' (url: jar:file:/home/asus/.local/share/multimc/instances/1.16.4/.minecraft/mods/hydrogen-fabric-mc1.16.5-0.2.jar!/com/google/common/collect/HydrogenImmutableReferenceHashMap.class)
[12:54:03] [main/INFO]: Injecting class 'com.google.common.collect.HydrogenEntrySet' (url: jar:file:/home/asus/.local/share/multimc/instances/1.16.4/.minecraft/mods/hydrogen-fabric-mc1.16.5-0.2.jar!/com/google/common/collect/HydrogenEntrySet.class)
[12:54:03] [main/INFO]: Injecting class 'com.google.common.collect.HydrogenEntrySetIterator' (url: jar:file:/home/asus/.local/share/multimc/instances/1.16.4/.minecraft/mods/hydrogen-fabric-mc1.16.5-0.2.jar!/com/google/common/collect/HydrogenEntrySetIterator.class)
[12:54:05] [main/WARN]: @Inject(@At("INVOKE")) Shift.BY=2 on dynocaps.mixins.json:resourcereloader.MinecraftClientMxn::handler$zbn000$onReloadResources exceeds the maximum allowed value: 0. Increase the value of maxShiftBy to suppress this warning.
[12:54:26] [main/INFO]: [STDERR]: Failed to start Minecraft:
[12:54:26] [main/INFO]: [STDERR]: java.lang.reflect.InvocationTargetException
[12:54:26] [main/INFO]: [STDERR]:   at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[12:54:26] [main/INFO]: [STDERR]:   at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
[12:54:26] [main/INFO]: [STDERR]:   at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[12:54:26] [main/INFO]: [STDERR]:   at java.base/java.lang.reflect.Method.invoke(Method.java:564)
[12:54:26] [main/INFO]: [STDERR]:   at org.multimc.onesix.OneSixLauncher.launchWithMainClass(OneSixLauncher.java:196)
[12:54:26] [main/INFO]: [STDERR]:   at org.multimc.onesix.OneSixLauncher.launch(OneSixLauncher.java:231)
[12:54:26] [main/INFO]: [STDERR]:   at org.multimc.EntryPoint.listen(EntryPoint.java:143)
[12:54:26] [main/INFO]: [STDERR]:   at org.multimc.EntryPoint.main(EntryPoint.java:34)
[12:54:26] [main/INFO]: [STDERR]: Caused by: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
[12:54:26] [main/INFO]: [STDERR]:   at net.fabricmc.loader.game.MinecraftGameProvider.launch(MinecraftGameProvider.java:228)
[12:54:26] [main/INFO]: [STDERR]:   at net.fabricmc.loader.launch.knot.Knot.init(Knot.java:139)
[12:54:26] [main/INFO]: [STDERR]:   at net.fabricmc.loader.launch.knot.KnotClient.main(KnotClient.java:27)
[12:54:26] [main/INFO]: [STDERR]:   ... 8 more
[12:54:26] [main/INFO]: [STDERR]: Caused by: java.lang.reflect.InvocationTargetException
[12:54:26] [main/INFO]: [STDERR]:   at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[12:54:26] [main/INFO]: [STDERR]:   at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
[12:54:26] [main/INFO]: [STDERR]:   at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[12:54:26] [main/INFO]: [STDERR]:   at java.base/java.lang.reflect.Method.invoke(Method.java:564)
[12:54:26] [main/INFO]: [STDERR]:   at net.fabricmc.loader.game.MinecraftGameProvider.launch(MinecraftGameProvider.java:226)
[12:54:26] [main/INFO]: [STDERR]:   ... 10 more
[12:54:26] [main/INFO]: [STDERR]: Caused by: java.lang.NoClassDefFoundError: sun/reflect/ConstructorAccessor
[12:54:26] [main/INFO]: [STDERR]:   at com.ptsmods.morecommands.miscellaneous.ReflectionHelper.newEnumInstance(ReflectionHelper.java:168)
[12:54:26] [main/INFO]: [STDERR]:   at com.ptsmods.morecommands.miscellaneous.Rainbow.<clinit>(Rainbow.java:29)
[12:54:26] [main/INFO]: [STDERR]:   at com.ptsmods.morecommands.MoreCommands.<clinit>(MoreCommands.java:154)
[12:54:26] [main/INFO]: [STDERR]:   at com.ptsmods.morecommands.miscellaneous.Command.<clinit>(Command.java:30)
[12:54:26] [main/INFO]: [STDERR]:   at net.minecraft.class_1657.handler$zpp000$createPlayerAttributes(class_1657.java:3827)
[12:54:26] [main/INFO]: [STDERR]:   at net.minecraft.class_1657.method_26956(class_1657.java:227)
[12:54:26] [main/INFO]: [STDERR]:   at net.minecraft.class_5135.<clinit>(class_5135.java:116)
[12:54:26] [main/INFO]: [STDERR]:   at net.minecraft.class_2966.method_17598(class_2966.java:112)
[12:54:26] [main/INFO]: [STDERR]:   at net.minecraft.client.main.Main.main(Main.java:138)
[12:54:26] [main/INFO]: [STDERR]:   ... 15 more
[12:54:26] [main/INFO]: [STDERR]: Caused by: java.lang.ClassNotFoundException: sun.reflect.ConstructorAccessor
[12:54:26] [main/INFO]: [STDERR]:   at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:606)
[12:54:26] [main/INFO]: [STDERR]:   at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:168)
[12:54:26] [main/INFO]: [STDERR]:   at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
[12:54:26] [main/INFO]: [STDERR]:   at net.fabricmc.loader.launch.knot.KnotClassLoader.loadClass(KnotClassLoader.java:168)
[12:54:26] [main/INFO]: [STDERR]:   at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
[12:54:26] [main/INFO]: [STDERR]:   ... 24 more
[12:54:26] [main/INFO]: [STDOUT]: Exiting with -1
Process exited with code 255.
PlanetTeamSpeakk commented 3 years ago

I think I see what's going on, are you using Java 9, perhaps?

K0-RR commented 3 years ago

Was checking again, this time with a clear mind, and seems like MoreCommands just doesn't work with the newest fabric api/1.16.5/idk?

I'm using java 15 on pc and 11 on laptop. Should I try with 8?

https://paste.ee/p/yWBRd

K0-RR commented 3 years ago

Your gradle.properties contain a patch to your java, if it's not needed for you [probably is yeet] then delete it to allow building from source on other computers.

It's building with java 15 now. Build failed. https://scans.gradle.com/s/feushifxxsghq Can you add compatibility with java 9+?

PlanetTeamSpeakk commented 3 years ago

Switching to Java 8 would certainly fix the problem as the class it's trying to load, sun.reflect.ConstructorAccessor, was moved to a different package in Java 9. This is an issue because MoreCommands loads this class and uses it directly, but it wouldn't be an issue if the class is never directly accessed, but only indirectly via reflections.

For now I suggest you use Java 8 to launch Minecraft, but in a future release I will have fixed this issue using the aforementioned solution.

And yes, the org.gradle.java.home property appears to be required for me to build it, especially since I updated my JDK after creating the project, but you could just download and extract the entire repo, edit or remove that line from gradle.properties and run gradlew build.

PlanetTeamSpeakk commented 3 years ago

Should be fixed now as the mod is compatible with all Java versions greater than or equal to 1.8.