hit-mc / OhMyVanillaMinecraft

What's wrong with my Minecraft?
MIT License
12 stars 3 forks source link

Error occurs when starting server #1

Open tangsongxiaoba opened 3 years ago

tangsongxiaoba commented 3 years ago

HUGE THANKS TO YOUR MOD! but when i am using it and starting my 1.16.5 server, error occurs like this:

[11:00:50] [main/WARN]: @Mixin target net/minecraft/class_3898$class_3208 is public in fabric-networking-api-
v1.mixins.json:accessor.EntityTrackerAccessor and should be specified in value
[11:00:51] [main/WARN]: Error loading class: net/minecraft/class_2535$1 (java.lang.ClassNotFoundException: net/minecraft/class_2535$1)
[11:00:51] [main/WARN]: @Mixin target net/minecraft/class_2535$1 was not found randompatches.mixins.json:timeouts.ChannelInitializerMixin
[11:00:53] [main/FATAL]: Mixin apply failed carpet-extra.mixins.json:CactusBlock_syncMixin -> net.minecraft.class_2266: org.spongepowered.asm.mixin.injection.throwables.InvalidInjectionException @At("CONSTANT") on net/minecraft/class_2266::onOnScheduledTick with priority 1000 cannot inject into net/minecraft/class_2266::method_9514(Lnet/minecraft/class_2680;Lnet/minecraft/class_3218;Lnet/minecraft/class_2338;Ljava/util/Random;)V merged by com.keuin.ohmyvanillamc.mixin.Mc113809CactusBlockMixin with priority 1000 [PREINJECT Applicator Phase -> carpet-extra.mixins.json:CactusBlock_syncMixin -> Prepare Injections ->  -> constant$zme000$onOnScheduledTick(I)I -> Prepare]
org.spongepowered.asm.mixin.injection.throwables.InvalidInjectionException: @At("CONSTANT") on net/minecraft/class_2266::onOnScheduledTick with priority 1000 cannot inject into net/minecraft/class_2266::method_9514(Lnet/minecraft/class_2680;Lnet/minecraft/class_3218;Lnet/minecraft/class_2338;Ljava/util/Random;)V merged by com.keuin.ohmyvanillamc.mixin.Mc113809CactusBlockMixin with priority 1000 [PREINJECT Applicator Phase -> carpet-extra.mixins.json:CactusBlock_syncMixin -> Prepare Injections ->  -> constant$zme000$onOnScheduledTick(I)I -> Prepare]
    at org.spongepowered.asm.mixin.injection.code.Injector.findTargetNodes(Injector.java:293) ~[fabric-server-launch.jar:?]
    at org.spongepowered.asm.mixin.injection.code.Injector.find(Injector.java:240) ~[fabric-server-launch.jar:?]
    at org.spongepowered.asm.mixin.injection.struct.InjectionInfo.prepare(InjectionInfo.java:375) ~[fabric-server-launch.jar:?]
    at org.spongepowered.asm.mixin.transformer.MixinTargetContext.prepareInjections(MixinTargetContext.java:1255) ~[fabric-server-launch.jar:?]
    at org.spongepowered.asm.mixin.transformer.MixinApplicatorStandard.prepareInjections(MixinApplicatorStandard.java:1033) ~[fabric-server-launch.jar:?]
    at org.spongepowered.asm.mixin.transformer.MixinApplicatorStandard.applyMixin(MixinApplicatorStandard.java:388) ~[fabric-server-launch.jar:?]
    at org.spongepowered.asm.mixin.transformer.MixinApplicatorStandard.apply(MixinApplicatorStandard.java:320) ~[fabric-server-launch.jar:?]
    at org.spongepowered.asm.mixin.transformer.TargetClassContext.applyMixins(TargetClassContext.java:345) ~[fabric-server-launch.jar:?]
    at org.spongepowered.asm.mixin.transformer.MixinProcessor.applyMixins(MixinProcessor.java:569) ~[fabric-server-launch.jar:?]
    at org.spongepowered.asm.mixin.transformer.MixinProcessor.applyMixins(MixinProcessor.java:351) ~[fabric-server-launch.jar:?]
    at org.spongepowered.asm.mixin.transformer.MixinTransformer.transformClass(MixinTransformer.java:208) ~[fabric-server-launch.jar:?]
    at org.spongepowered.asm.mixin.transformer.MixinTransformer.transformClassBytes(MixinTransformer.java:178) ~[fabric-server-launch.jar:?]
    at org.spongepowered.asm.mixin.transformer.FabricMixinTransformerProxy.transformClassBytes(FabricMixinTransformerProxy.java:23) ~[fabric-server-launch.jar:?]
    at com.fox2code.fabriczero.FabricZeroTransformerHook.transformClassBytes(FabricZeroTransformerHook.java:41) ~[fabriczero-0.2.1.jar:?]
    at net.fabricmc.loader.launch.knot.KnotClassDelegate.getPostMixinClassByteArray(KnotClassDelegate.java:157) ~[fabric-server-launch.jar:?]
    at net.fabricmc.loader.launch.knot.KnotClassLoader.loadClass(KnotClassLoader.java:150) ~[fabric-server-launch.jar:?]
    at java.lang.ClassLoader.loadClass(ClassLoader.java:351) ~[?:1.8.0_282]
    at net.minecraft.class_3523.<clinit>(class_3523.java:13) ~[intermediary-server.jar:?]
    at net.minecraft.class_5471.<clinit>(class_5471.java:11) ~[intermediary-server.jar:?]
    at net.minecraft.class_5458.method_30573(class_5458.java:44) ~[intermediary-server.jar:?]
    at net.minecraft.class_5458.method_30566(class_5458.java:75) ~[intermediary-server.jar:?]
    at java.util.LinkedHashMap.forEach(LinkedHashMap.java:684) [?:1.8.0_282]
    at net.minecraft.class_5458.<clinit>(class_5458.java:74) [intermediary-server.jar:?]
    at net.minecraft.class_2378.<clinit>(class_2378.java:237) [intermediary-server.jar:?]
    at net.minecraft.class_2966.method_12851(class_2966.java:42) [intermediary-server.jar:?]
    at net.minecraft.server.Main.main(Main.java:87) [intermediary-server.jar:?]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_282]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_282]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_282]
    at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_282]
    at net.fabricmc.loader.game.MinecraftGameProvider.launch(MinecraftGameProvider.java:226) [fabric-server-launch.jar:?]
    at net.fabricmc.loader.launch.knot.Knot.init(Knot.java:139) [fabric-server-launch.jar:?]
    at net.fabricmc.loader.launch.knot.KnotServer.main(KnotServer.java:27) [fabric-server-launch.jar:?]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_282]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_282]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_282]
    at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_282]
    at net.fabricmc.loader.launch.server.FabricServerLauncher.launch(FabricServerLauncher.java:62) [fabric-server-launch.jar:?]
    at net.fabricmc.loader.launch.server.FabricServerLauncher.setup(FabricServerLauncher.java:106) [fabric-server-launch.jar:?]
    at net.fabricmc.loader.launch.server.FabricServerLauncher.main(FabricServerLauncher.java:50) [fabric-server-launch.jar:?]
Exception in thread "main" java.lang.RuntimeException: Failed to setup Fabric server environment!
    at net.fabricmc.loader.launch.server.FabricServerLauncher.main(FabricServerLauncher.java:52)
Caused by: java.lang.RuntimeException: java.lang.RuntimeException: An exception occurred when launching the server!
    at net.fabricmc.loader.launch.server.FabricServerLauncher.setup(FabricServerLauncher.java:108)
    at net.fabricmc.loader.launch.server.FabricServerLauncher.main(FabricServerLauncher.java:50)
Caused by: java.lang.RuntimeException: An exception occurred when launching the server!
    at net.fabricmc.loader.launch.server.FabricServerLauncher.launch(FabricServerLauncher.java:64)
    at net.fabricmc.loader.launch.server.FabricServerLauncher.setup(FabricServerLauncher.java:106)
    ... 1 more
Caused by: java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at net.fabricmc.loader.launch.server.FabricServerLauncher.launch(FabricServerLauncher.java:62)
    ... 2 more
Caused by: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
    at net.fabricmc.loader.game.MinecraftGameProvider.launch(MinecraftGameProvider.java:228)
    at net.fabricmc.loader.launch.knot.Knot.init(Knot.java:139)
    at net.fabricmc.loader.launch.knot.KnotServer.main(KnotServer.java:27)
    ... 7 more
Caused by: java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at net.fabricmc.loader.game.MinecraftGameProvider.launch(MinecraftGameProvider.java:226)
    ... 9 more
Caused by: org.spongepowered.asm.mixin.transformer.throwables.MixinTransformerError: An unexpected critical error was encountered
    at org.spongepowered.asm.mixin.transformer.MixinProcessor.applyMixins(MixinProcessor.java:363)
    at org.spongepowered.asm.mixin.transformer.MixinTransformer.transformClass(MixinTransformer.java:208)
    at org.spongepowered.asm.mixin.transformer.MixinTransformer.transformClassBytes(MixinTransformer.java:178)
    at org.spongepowered.asm.mixin.transformer.FabricMixinTransformerProxy.transformClassBytes(FabricMixinTransformerProxy.java:23)
    at com.fox2code.fabriczero.FabricZeroTransformerHook.transformClassBytes(FabricZeroTransformerHook.java:41)
    at net.fabricmc.loader.launch.knot.KnotClassDelegate.getPostMixinClassByteArray(KnotClassDelegate.java:157)
    at net.fabricmc.loader.launch.knot.KnotClassLoader.loadClass(KnotClassLoader.java:150)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
    at net.minecraft.class_3523.<clinit>(class_3523.java:13)
    at net.minecraft.class_5471.<clinit>(class_5471.java:11)
    at net.minecraft.class_5458.method_30573(class_5458.java:44)
    at net.minecraft.class_5458.method_30566(class_5458.java:75)
    at java.util.LinkedHashMap.forEach(LinkedHashMap.java:684)
    at net.minecraft.class_5458.<clinit>(class_5458.java:74)
    at net.minecraft.class_2378.<clinit>(class_2378.java:237)
    at net.minecraft.class_2966.method_12851(class_2966.java:42)
    at net.minecraft.server.Main.main(Main.java:87)
    ... 14 more
Caused by: org.spongepowered.asm.mixin.throwables.MixinApplyError: Mixin [carpet-extra.mixins.json:CactusBlock_syncMixin] from phase [DEFAULT] in config [carpet-extra.mixins.json] FAILED during APPLY
    at org.spongepowered.asm.mixin.transformer.MixinProcessor.handleMixinError(MixinProcessor.java:642)
    at org.spongepowered.asm.mixin.transformer.MixinProcessor.handleMixinApplyError(MixinProcessor.java:594)
    at org.spongepowered.asm.mixin.transformer.MixinProcessor.applyMixins(MixinProcessor.java:356)
    ... 30 more
Caused by: org.spongepowered.asm.mixin.injection.throwables.InvalidInjectionException: @At("CONSTANT") on net/minecraft/class_2266::onOnScheduledTick with priority 1000 cannot inject into net/minecraft/class_2266::method_9514(Lnet/minecraft/class_2680;Lnet/minecraft/class_3218;Lnet/minecraft/class_2338;Ljava/util/Random;)V merged by com.keuin.ohmyvanillamc.mixin.Mc113809CactusBlockMixin with priority 1000 [PREINJECT Applicator Phase -> carpet-extra.mixins.json:CactusBlock_syncMixin -> Prepare Injections ->  -> constant$zme000$onOnScheduledTick(I)I -> Prepare]
    at org.spongepowered.asm.mixin.injection.code.Injector.findTargetNodes(Injector.java:293)
    at org.spongepowered.asm.mixin.injection.code.Injector.find(Injector.java:240)
    at org.spongepowered.asm.mixin.injection.struct.InjectionInfo.prepare(InjectionInfo.java:375)
    at org.spongepowered.asm.mixin.transformer.MixinTargetContext.prepareInjections(MixinTargetContext.java:1255)
    at org.spongepowered.asm.mixin.transformer.MixinApplicatorStandard.prepareInjections(MixinApplicatorStandard.java:1033)
    at org.spongepowered.asm.mixin.transformer.MixinApplicatorStandard.applyMixin(MixinApplicatorStandard.java:388)
    at org.spongepowered.asm.mixin.transformer.MixinApplicatorStandard.apply(MixinApplicatorStandard.java:320)
    at org.spongepowered.asm.mixin.transformer.TargetClassContext.applyMixins(TargetClassContext.java:345)
    at org.spongepowered.asm.mixin.transformer.MixinProcessor.applyMixins(MixinProcessor.java:569)
    at org.spongepowered.asm.mixin.transformer.MixinProcessor.applyMixins(MixinProcessor.java:351)
    ... 30 more

It seems like this mod have conflicts with the carpet_extra mod. Or could it be the version problem between 1.16.4 & 1.16.5? Waiting for your reply :) (I'm Chinese but my import method(shu ru fa) has something wrong that couldn't type Hanzi.)

keuin commented 3 years ago

Thanks for your report. I speak both Chinese and English, and that's fine.

Since OhMyVanillaMinecraft supports both 1.16.4 and 1.16.5, it is not caused by mc version difference. In fact, these two versions are almost identical, within the scope that OMVM handles.

This is a known issue which has been reported by another user in Bilibili. It is caused by my Mixin implementation on all these plants' tick methods. These Mixins just simply overwrite all plants' tick methods. As a result, OhMyVanillaMinecraft will conflict with all other Mods that modify these plants' tick methods, such as the one you are using, Carpet Extra, no matter what type of Mixin they use.

The problem can be simply solved by disabling either Carpet Extra Mod or OhMyVanillaMinecraft. It might be fixed, however, by using a more compatible and less invasive Mixin manner. I am not good at writing Mixins, so currently we cannot use OMVM and other mods like Carpet Extra at the same time.

I need help from other people who are skilled at Fabric's Mixin. Hope someone could help us out! I will keep this issue open, and all pull requests are welcomed. I am glad to test them :)