Closed felixdivo closed 3 years ago
I got the same NPE, but in my case, I ran into something that gave me Nausea and poison underground and I drank a milk bucket to clear it, and then my game crashed. If you want my crash report just let me know.
Seems to have a variety of sources.
Redirecting all those issues here.
Also happens for me if I do /effect clear
when I have nausea... probably caused by that weird portal overlay in vanilla that happens when you clear nausea forcibly.
Would make sense with falling too, at least for the crash report above, since Majrusz's Progressive Difficulty gives you nausea when you fall far enough.
Would make sense with falling too, at least for the crash report above, since Majrusz's Progressive Difficulty gives you nausea when you fall far enough.
also when taking drowning damage. :V
It's definitely an issue with the portal overlay. Just not exactly sure what the issue is. As someone who is primarily a worldgen modder, this is unfortunately an area of the game I'm not familiar with. What I may do for now is simply catch the error and prevent the game from crashing - it might mean the overlay is buggy, but that's certainly better than a crash.
absolutely. especially in packs like mine where potion effects come out a fair bit and clearing or preventing them is kinda useful to have. :V
Okay, so I've figured it out.
In vanilla, the overlay when entering a Nether portal has some special logic to execute when the player has the nausea effect. In an attempt to be as vanilla-friendly as possible, I duplicated this effect. However, I failed to reset my counter variables (used to keep track of the overlay's animation state) whenever the nausea effect is removed. This results in a single frame of attempting to render the overlays when the effect is cleared. If you're in a dimension that doesn't have settings for both a reclaimer and a rift (which is any dimension by default), this will result in a crash for the missing variant when fetching the settings.
The counter variables are now properly cleared as of v0.3.5, so this should no longer happen. Additionally, there are now several more null
checks in place, so if other bugs exist that somehow cause the variant settings to be null
, they should no longer cause crashes.
Please let me know if it's fixed for you, and if so I'll close the issue!
Welp... I seem to be getting a crash while trying to load the game with the new version (0.3.5). It didn't even get past the FML early loading phase.
Mixin apply failed betterportals.mixins.json:MixinClientPlayerEntity -> net.minecraft.client.entity.player.ClientPlayerEntity: org.spongepowered.asm.mixin.injection.throwables.InvalidInjectionException Critical injection failure: @Inject annotation on resetPortalAndReclaimerCounters could not find any targets matching 'removeActivePotionEffect' in net.minecraft.client.entity.player.ClientPlayerEntity. No refMap loaded. [PREINJECT Applicator Phase -> betterportals.mixins.json:MixinClientPlayerEntity -> Prepare Injections -> -> handler$zhp000$resetPortalAndReclaimerCounters(Lnet/minecraft/potion/Effect;Lorg/spongepowered/asm/mixin/injection/callback/CallbackInfoReturnable;)V -> Parse]
org.spongepowered.asm.mixin.injection.throwables.InvalidInjectionException: Critical injection failure: @Inject annotation on resetPortalAndReclaimerCounters could not find any targets matching 'removeActivePotionEffect' in net.minecraft.client.entity.player.ClientPlayerEntity. No refMap loaded. [PREINJECT Applicator Phase -> betterportals.mixins.json:MixinClientPlayerEntity -> Prepare Injections -> -> handler$zhp000$resetPortalAndReclaimerCounters(Lnet/minecraft/potion/Effect;Lorg/spongepowered/asm/mixin/injection/callback/CallbackInfoReturnable;)V -> Parse]
at org.spongepowered.asm.mixin.injection.struct.InjectionInfo.findMethods(InjectionInfo.java:572)
at org.spongepowered.asm.mixin.injection.struct.InjectionInfo.readAnnotation(InjectionInfo.java:288)
at org.spongepowered.asm.mixin.injection.struct.InjectionInfo.<init>(InjectionInfo.java:275)
at org.spongepowered.asm.mixin.injection.struct.InjectionInfo.<init>(InjectionInfo.java:267)
at org.spongepowered.asm.mixin.injection.struct.CallbackInjectionInfo.<init>(CallbackInjectionInfo.java:46)
at sun.reflect.GeneratedConstructorAccessor60.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
at org.spongepowered.asm.mixin.injection.struct.InjectionInfo$InjectorEntry.create(InjectionInfo.java:140)
at org.spongepowered.asm.mixin.injection.struct.InjectionInfo.parse(InjectionInfo.java:624)
at org.spongepowered.asm.mixin.transformer.MixinTargetContext.prepareInjections(MixinTargetContext.java:1247)
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)
at org.spongepowered.asm.mixin.transformer.MixinTransformer.transformClass(MixinTransformer.java:223)
at org.spongepowered.asm.mixin.transformer.MixinTransformationHandler.processClass(MixinTransformationHandler.java:121)
at org.spongepowered.asm.launch.MixinLaunchPlugin.processClass(MixinLaunchPlugin.java:131)
at cpw.mods.modlauncher.serviceapi.ILaunchPluginService.processClassWithFlags(ILaunchPluginService.java:154)
at cpw.mods.modlauncher.LaunchPluginHandler.offerClassNodeToPlugins(LaunchPluginHandler.java:85)
at cpw.mods.modlauncher.ClassTransformer.transform(ClassTransformer.java:120)
at cpw.mods.modlauncher.TransformingClassLoader$DelegatedClassLoader.findClass(TransformingClassLoader.java:265)
at cpw.mods.modlauncher.TransformingClassLoader.loadClass(TransformingClassLoader.java:136)
at cpw.mods.modlauncher.TransformingClassLoader.loadClass(TransformingClassLoader.java:98)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at java.lang.invoke.MethodHandleNatives.resolve(Native Method)
at java.lang.invoke.MemberName$Factory.resolve(MemberName.java:962)
at java.lang.invoke.MemberName$Factory.resolveOrFail(MemberName.java:987)
at java.lang.invoke.MethodHandles$Lookup.resolveOrFail(MethodHandles.java:1390)
at java.lang.invoke.MethodHandles$Lookup.linkMethodHandleConstant(MethodHandles.java:1746)
at java.lang.invoke.MethodHandleNatives.linkMethodHandleConstant(MethodHandleNatives.java:477)
at net.minecraft.entity.EntityType.<clinit>(EntityType.java:148)
at net.minecraft.world.gen.feature.DungeonsFeature.<clinit>(DungeonsFeature.java:24)
at net.minecraft.world.gen.feature.Feature.<clinit>(Feature.java:37)
at net.minecraft.world.gen.feature.Features.<clinit>(SourceFile:92)
at net.minecraft.util.registry.WorldGenRegistries.func_243672_e(WorldGenRegistries.java:39)
at net.minecraft.util.registry.WorldGenRegistries$$Lambda$657/1547998401.get(Unknown Source)
at net.minecraft.util.registry.WorldGenRegistries.func_243668_a(WorldGenRegistries.java:89)
at net.minecraft.util.registry.WorldGenRegistries$$Lambda$663/506869658.accept(Unknown Source)
at java.util.LinkedHashMap.forEach(LinkedHashMap.java:676)
at net.minecraft.util.registry.WorldGenRegistries.<clinit>(WorldGenRegistries.java:88)
at net.minecraft.util.registry.Registry.<clinit>(Registry.java:464)
at net.minecraft.util.registry.Bootstrap.func_151354_b(Bootstrap.java:38)
at net.minecraft.client.main.Main.lambda$main$0(Main.java:123)
at net.minecraft.client.main.Main$$Lambda$604/897098843.run(Unknown Source)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
@Tmtravlr what's your Forge version? It may be the case that this only works on 1.16.5 (Forge 36)
The pack I'm running is using forge 36.1.24
@Tmtravlr Download the JAR attached to this experimental release and see if it fixes your problem: https://github.com/yungnickyoung/YUNGs-Better-Portals/releases/tag/forge-1.16-0.3.6-beta0
Seems to have worked! The game loaded up fine, and I just gave myself nausea and /effect cleared it, and no crash!
Sweet, pushing the updated version to CF now :)
Issue will remain open for a bit in case the others experience issues w/ the new version
Thanks so much for fixing it quickly! =)
I just jumped down a cliff and on the bottom, the below crash occurred. Nothing else was suspicious. However, I have quite a few mods installed.