Origins (Fabric)

Origins (Fabric)

15M Downloads

Elytra Bounce Incompatibility

Ninja-Hinja42 opened this issue ยท 3 comments

commented

I am posting this issue on Elytra Bounce page as well, as I do not know what the exact problem is, though I do suspect the issue is caused by Elytra Bounce. I am playing on Minecraft 1.16.2.
Mods:
Fabric Loader v0.9.2+build.206
Fabric API v0.19.0+build.398
Origins v0.3.7
Elytra Bounce v0.1.0
When using Origins with Elytra Bounce, game crashes with this output:

[main/WARN]: @reDIrect conflict. Skipping elytra_bounce.mixins.json:LivingEntityMixin->@reDIrect::initAi(Lnet/minecraft/class_1309;IZ)V with priority 1000, already redirected by origins.mixins.json:LivingEntityMixin->@reDIrect::preventStoppingToFly(Lnet/minecraft/class_1309;IZ)V with priority 1000
Exiting with -1
org.spongepowered.asm.mixin.injection.throwables.InjectionError: Critical injection failure: Redirector initAi(Lnet/minecraft/class_1309;IZ)V in elytra_bounce.mixins.json:LivingEntityMixin failed injection check, (0/1) succeeded. Scanned 1 target(s). Using refmap elytra_bounce-refmap.json
at org.spongepowered.asm.mixin.injection.struct.InjectionInfo.postInject(InjectionInfo.java:408)
at org.spongepowered.asm.mixin.transformer.MixinTargetContext.applyInjections(MixinTargetContext.java:1291)
at org.spongepowered.asm.mixin.transformer.MixinApplicatorStandard.applyInjections(MixinApplicatorStandard.java:1042)
at org.spongepowered.asm.mixin.transformer.MixinApplicatorStandard.applyMixin(MixinApplicatorStandard.java:395)
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:570)
at org.spongepowered.asm.mixin.transformer.MixinProcessor.applyMixins(MixinProcessor.java:351)
at org.spongepowered.asm.mixin.transformer.MixinTransformer.transformClass(MixinTransformer.java:191)
at org.spongepowered.asm.mixin.transformer.MixinTransformer.transformClassBytes(MixinTransformer.java:178)
at org.spongepowered.asm.mixin.transformer.FabricMixinTransformerProxy.transformClassBytes(FabricMixinTransformerProxy.java:23)
at net.fabricmc.loader.launch.knot.KnotClassDelegate.getPostMixinClassByteArray(KnotClassDelegate.java:157)
at net.fabricmc.loader.launch.knot.KnotClassLoader.loadClass(KnotClassLoader.java:143)
at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:756)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at net.fabricmc.loader.launch.knot.KnotClassLoader.loadClass(KnotClassLoader.java:156)
at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
at net.minecraft.class_2246.(class_2246.java:99)
at net.minecraft.class_3523.(class_3523.java:13)
at net.minecraft.class_5471.(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.(class_5458.java:74)
at net.minecraft.class_2378.(class_2378.java:237)
at net.minecraft.class_2966.method_12851(class_2966.java:42)
at net.minecraft.client.main.Main.main(Main.java:137)
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:192)
at net.fabricmc.loader.launch.knot.Knot.init(Knot.java:140)
at net.fabricmc.loader.launch.knot.KnotClient.main(KnotClient.java:26)
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 org.multimc.onesix.OneSixLauncher.launchWithMainClass(OneSixLauncher.java:196)
at org.multimc.onesix.OneSixLauncher.launch(OneSixLauncher.java:231)
at org.multimc.EntryPoint.listen(EntryPoint.java:143)
at org.multimc.EntryPoint.main(EntryPoint.java:34)
Failed to start Minecraft:
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 org.multimc.onesix.OneSixLauncher.launchWithMainClass(OneSixLauncher.java:196)
at org.multimc.onesix.OneSixLauncher.launch(OneSixLauncher.java:231)
at org.multimc.EntryPoint.listen(EntryPoint.java:143)
at org.multimc.EntryPoint.main(EntryPoint.java:34)
Caused by: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
at net.fabricmc.loader.game.MinecraftGameProvider.launch(MinecraftGameProvider.java:194)
at net.fabricmc.loader.launch.knot.Knot.init(Knot.java:140)
at net.fabricmc.loader.launch.knot.KnotClient.main(KnotClient.java:26)
... 8 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:192)
... 10 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:364)
at org.spongepowered.asm.mixin.transformer.MixinTransformer.transformClass(MixinTransformer.java:191)
at org.spongepowered.asm.mixin.transformer.MixinTransformer.transformClassBytes(MixinTransformer.java:178)
at org.spongepowered.asm.mixin.transformer.FabricMixinTransformerProxy.transformClassBytes(FabricMixinTransformerProxy.java:23)
at net.fabricmc.loader.launch.knot.KnotClassDelegate.getPostMixinClassByteArray(KnotClassDelegate.java:157)
at net.fabricmc.loader.launch.knot.KnotClassLoader.loadClass(KnotClassLoader.java:143)
at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:756)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at net.fabricmc.loader.launch.knot.KnotClassLoader.loadClass(KnotClassLoader.java:156)
at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
at net.minecraft.class_2246.(class_2246.java:99)
at net.minecraft.class_3523.(class_3523.java:13)
at net.minecraft.class_5471.(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.(class_5458.java:74)
at net.minecraft.class_2378.(class_2378.java:237)
at net.minecraft.class_2966.method_12851(class_2966.java:42)
at net.minecraft.client.main.Main.main(Main.java:137)
... 15 more
Caused by: org.spongepowered.asm.mixin.injection.throwables.InjectionError: Critical injection failure: Redirector initAi(Lnet/minecraft/class_1309;IZ)V in elytra_bounce.mixins.json:LivingEntityMixin failed injection check, (0/1) succeeded. Scanned 1 target(s). Using refmap elytra_bounce-refmap.json
at org.spongepowered.asm.mixin.injection.struct.InjectionInfo.postInject(InjectionInfo.java:408)
at org.spongepowered.asm.mixin.transformer.MixinTargetContext.applyInjections(MixinTargetContext.java:1291)
at org.spongepowered.asm.mixin.transformer.MixinApplicatorStandard.applyInjections(MixinApplicatorStandard.java:1042)
at org.spongepowered.asm.mixin.transformer.MixinApplicatorStandard.applyMixin(MixinApplicatorStandard.java:395)
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:570)
at org.spongepowered.asm.mixin.transformer.MixinProcessor.applyMixins(MixinProcessor.java:351)
... 36 more
Process exited with code 255.

commented

This is caused by both of us redirecting the setFlag call in initAi. We both should be using FallFlyingLib instead - it's a library that implements the same functionality in a safer way. I've took a quick peek at the source of Origins, and it looks like making it use FallFlyingLib would be pretty easy. Elytra Bounce however redirects the method in a way that the library can't yet handle.

I'm gonna look into making the library compatible with my mod tommorow. IMO Origins should also move to FallFlyingLib, to prevent conflicts like this in the future.

commented

Thanks, I'm gonna look into switching to FallFlyingLib in a few days!

commented

Implemented in 0.3.8.