Closed k-jiang closed 6 years ago
It seems that I can add an addition "tweakClass" argument in the json:
{
"arguments": {
"game": [
"--tweakClass",
"org.dimdev.riftloader.launch.RiftLoaderClientTweaker",
"--tweakClass",
"optifine.OptiFineTweaker"
]
}
}
However, new exception shows up:
Java HotSpot(TM) 64-Bit Server VM warning: Using incremental CMS is deprecated and will likely be removed in a future release
[14:10:47] [main/INFO]: Loading tweak class name org.dimdev.riftloader.launch.RiftLoaderClientTweaker
[14:10:47] [main/INFO]: Using primary tweak class name org.dimdev.riftloader.launch.RiftLoaderClientTweaker
[14:10:47] [main/INFO]: Loading tweak class name optifine.OptiFineTweaker
[14:10:47] [main/INFO]: Loading tweak class name customskinloader.tweaker.Tweaker
[14:10:47] [main/INFO]: Calling tweak class org.dimdev.riftloader.launch.RiftLoaderClientTweaker
[14:10:47] [main/INFO]: Searching mods on classpath
[14:10:47] [main/INFO]: Loaded mod 'rift'
[14:10:47] [main/INFO]: Searching for mods in /home/kenneth/.minecraft/mods
[14:10:47] [main/INFO]: Loaded 1 mods
[14:10:47] [main/INFO]: Initializing mods
[14:10:47] [main/INFO]: Loading Rift!
[14:10:47] [main/INFO]: SpongePowered MIXIN Subsystem Version=0.7.11 Source=file:/home/kenneth/.minecraft/libraries/org/dimdev/mixin/0.7.11-SNAPSHOT/mixin-0.7.11-SNAPSHOT.jar Service=LaunchWrapper Env=UNKNOWN
[14:10:47] [main/INFO]: FML platform manager could not load class cpw.mods.fml.relauncher.CoreModManager. Proceeding without FML support.
[14:10:47] [main/INFO]: Compatibility level set to JAVA_8
[14:10:47] [main/INFO]: Done initializing mods
[14:10:47] [main/INFO]: Calling tweak class optifine.OptiFineTweaker
OptiFineTweaker: acceptOptions
OptiFineTweaker: injectIntoClassLoader
OptiFine ClassTransformer
OptiFine ZIP file: /home/kenneth/.minecraft/libraries/optifine/OptiFine/1.13.2_HD_U_E4/OptiFine-1.13.2_HD_U_E4.jar
[14:10:47] [main/INFO]: Calling tweak class customskinloader.tweaker.Tweaker
[main INFO] Using Tweaker
[main INFO] Tweaker: acceptOptions
[main INFO] Tweaker: injectIntoClassLoader
[main INFO] Loaded as a library.
[14:10:47] [main/INFO]: Loading tweak class name org.spongepowered.asm.mixin.EnvironmentStateTweaker
[14:10:47] [main/INFO]: Calling tweak class org.spongepowered.asm.mixin.EnvironmentStateTweaker
OptiFineTweaker: getLaunchArguments
[main INFO] Tweaker: getLaunchArguments
[14:10:47] [main/INFO]: A re-entrant transformer 'org.dimdev.riftloader.RiftAccessTransformer' was detected and will no longer process meta class data
[14:10:47] [main/INFO]: Launching wrapped minecraft {net.minecraft.client.main.Main}
[14:10:47] [main/ERROR]: Unable to launch
java.lang.reflect.InvocationTargetException: null
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_191]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_191]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_191]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_191]
at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.12.jar:?]
at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?]
Caused by: joptsimple.MultipleArgumentsForOptionException: Found multiple arguments for option version, but you asked for only one
at joptsimple.OptionSet.valueOf(OptionSet.java:179) ~[OptionSet.class:?]
at net.minecraft.client.main.Main.a(SourceFile:149) ~[Main.class:?]
at net.minecraft.client.main.Main.main(SourceFile:105) ~[Main.class:?]
... 6 more
I'm not very good at Java, but it seems that there are something to do with this. I will try to remove the line and test it later to see if it works.
No, just no. 1. Never just add tweak classes because that can cause issues more than you realize, 2. We need that argument because you're required to pass it, which is why Forge, LiteLoader, and us do it, and 3. It's not working because you're using Optifine for 1.13.2, not 1.13.....
My bad. So I tried to fix optifine to 1.13, and it seems that you are right, adding tweak classes doesn't work.
Java HotSpot(TM) 64-Bit Server VM warning: Using incremental CMS is deprecated and will likely be removed in a future release
[14:30:19] [main/INFO]: Loading tweak class name org.dimdev.riftloader.launch.RiftLoaderClientTweaker
[14:30:19] [main/INFO]: Using primary tweak class name org.dimdev.riftloader.launch.RiftLoaderClientTweaker
[14:30:19] [main/INFO]: Loading tweak class name optifine.OptiFineTweaker
[14:30:19] [main/INFO]: Loading tweak class name customskinloader.tweaker.Tweaker
[14:30:19] [main/INFO]: Calling tweak class org.dimdev.riftloader.launch.RiftLoaderClientTweaker
[14:30:19] [main/INFO]: Searching mods on classpath
[14:30:20] [main/INFO]: Loaded mod 'rift'
[14:30:20] [main/INFO]: Searching for mods in /home/kenneth/.minecraft/mods
[14:30:20] [main/INFO]: Loaded 1 mods
[14:30:20] [main/INFO]: Initializing mods
[14:30:20] [main/INFO]: Loading Rift!
[14:30:20] [main/INFO]: SpongePowered MIXIN Subsystem Version=0.7.11 Source=file:/home/kenneth/.minecraft/libraries/org/dimdev/mixin/0.7.11-SNAPSHOT/mixin-0.7.11-SNAPSHOT.jar Service=LaunchWrapper Env=UNKNOWN
[14:30:20] [main/INFO]: FML platform manager could not load class cpw.mods.fml.relauncher.CoreModManager. Proceeding without FML support.
[14:30:20] [main/INFO]: Compatibility level set to JAVA_8
[14:30:20] [main/INFO]: Done initializing mods
[14:30:20] [main/INFO]: Calling tweak class optifine.OptiFineTweaker
OptiFineTweaker: acceptOptions
OptiFineTweaker: injectIntoClassLoader
OptiFine ClassTransformer
OptiFine ZIP file: /home/kenneth/.minecraft/libraries/optifine/OptiFine/1.13_HD_U_E4/OptiFine-1.13_HD_U_E4.jar
[14:30:20] [main/INFO]: Calling tweak class customskinloader.tweaker.Tweaker
[main INFO] Using Tweaker
[main INFO] Tweaker: acceptOptions
[main INFO] Tweaker: injectIntoClassLoader
[main INFO] Loaded as a library.
[14:30:20] [main/INFO]: Loading tweak class name org.spongepowered.asm.mixin.EnvironmentStateTweaker
[14:30:20] [main/INFO]: Calling tweak class org.spongepowered.asm.mixin.EnvironmentStateTweaker
OptiFineTweaker: getLaunchArguments
[main INFO] Tweaker: getLaunchArguments
[14:30:20] [main/INFO]: A re-entrant transformer 'org.dimdev.riftloader.RiftAccessTransformer' was detected and will no longer process meta class data
[14:30:20] [main/INFO]: Launching wrapped minecraft {net.minecraft.client.main.Main}
[14:30:20] [main/ERROR]: Unable to launch
java.lang.reflect.InvocationTargetException: null
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_191]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_191]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_191]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_191]
at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.12.jar:?]
at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?]
Caused by: joptsimple.MultipleArgumentsForOptionException: Found multiple arguments for option version, but you asked for only one
at joptsimple.OptionSet.valueOf(OptionSet.java:179) ~[OptionSet.class:?]
at net.minecraft.client.main.Main.a(SourceFile:149) ~[Main.class:?]
at net.minecraft.client.main.Main.main(SourceFile:105) ~[Main.class:?]
... 6 more
I was thinking to load the optifine with classtweak so I don't run into the version compatibility issue (other versions with forge installed will not load 1.13 mods from "mods" folder). But for now the only workaround is to drop the optifine.jar into mods floder, and make sure to remove the optifine.jar before I play any elder versions.
Game crashes with Optifine under 1.13. Minecraft: 1.13 Rift: 1.0.4-66 Optifine: 1.13_HD_U_E4
When entering multiplay games, game crashed. Both launchwrapper or put it in "mods" method are not working. I have no issue with Optifine alone (load with launchwrapper), it can run without Rift installed.