Evil Notch Lib

Evil Notch Lib

221k Downloads

FakeWorld's WorldInfo#setDifficulty can cause a crash

JBPlayz5 opened this issue ยท 5 comments

commented

---- Minecraft Crash Report ----
// I let you down. Sorry :(

Time: 2024-10-31 20:00:52 AEDT
Description: Exception in server tick loop

net.minecraftforge.fml.common.LoaderExceptionModCrash: Caught exception from Evil Notch Lib (evilnotchlib)
Caused by: java.lang.NullPointerException
at chanceCubes.profiles.triggerHooks.VanillaTriggerHooks.onDifficultyChange(VanillaTriggerHooks.java:29)
at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_2965_VanillaTriggerHooks_onDifficultyChange_DifficultyChangeEvent.invoke(.dynamic)
at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:90)
at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:182)
at net.minecraftforge.common.ForgeHooks.onDifficultyChange(ForgeHooks.java:568)
at net.minecraft.world.storage.WorldInfo.func_176144_a(WorldInfo.java:714)
at com.evilnotch.lib.minecraft.world.FakeWorld.(FakeWorld.java:57)
at com.evilnotch.lib.main.loader.LoaderMain.loadPostInit(LoaderMain.java:100)
at com.evilnotch.lib.main.MainJava.post(MainJava.java:42)
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.minecraftforge.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:637)
at sun.reflect.GeneratedMethodAccessor12.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.google.common.eventbus.Subscriber.invokeSubscriberMethod(Subscriber.java:91)
at com.google.common.eventbus.Subscriber$SynchronizedSubscriber.invokeSubscriberMethod(Subscriber.java:150)
at com.google.common.eventbus.Subscriber$1.run(Subscriber.java:76)
at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:399)
at com.google.common.eventbus.Subscriber.dispatchEvent(Subscriber.java:71)
at com.google.common.eventbus.Dispatcher$PerThreadQueuedDispatcher.dispatch(Dispatcher.java:116)
at com.google.common.eventbus.EventBus.post(EventBus.java:217)
at net.minecraftforge.fml.common.LoadController.sendEventToModContainer(LoadController.java:219)
at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:197)
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 com.google.common.eventbus.Subscriber.invokeSubscriberMethod(Subscriber.java:91)
at com.google.common.eventbus.Subscriber$SynchronizedSubscriber.invokeSubscriberMethod(Subscriber.java:150)
at com.google.common.eventbus.Subscriber$1.run(Subscriber.java:76)
at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:399)
at com.google.common.eventbus.Subscriber.dispatchEvent(Subscriber.java:71)
at com.google.common.eventbus.Dispatcher$PerThreadQueuedDispatcher.dispatch(Dispatcher.java:116)
at com.google.common.eventbus.EventBus.post(EventBus.java:217)
at net.minecraftforge.fml.common.LoadController.distributeStateMessage(LoadController.java:136)
at net.minecraftforge.fml.common.Loader.initializeMods(Loader.java:754)
at net.minecraftforge.fml.server.FMLServerHandler.finishServerLoading(FMLServerHandler.java:108)
at net.minecraftforge.fml.common.FMLCommonHandler.onServerStarted(FMLCommonHandler.java:338)
at net.minecraft.server.dedicated.DedicatedServer.func_71197_b(DedicatedServer.java:219)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:486)
at java.lang.Thread.run(Thread.java:750)

A detailed walkthrough of the error, its code path and all known details is as follows:

-- System Details --
Minecraft Version: 1.12.2
Operating System: Windows 11 (amd64) version 10.0
Java Version: 1.8.0_422-422, OpenLogic-OpenJDK
Java VM Version: OpenJDK 64-Bit Server VM (mixed mode), OpenLogic-OpenJDK
Memory: 22224039640 bytes (21194 MB) / 25133842432 bytes (23969 MB) up to 25133842432 bytes (23969 MB)
JVM Flags: 2 total; -Xmx24G -Xms24G
IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
FML: MCP 9.42 Powered by Forge 14.23.5.2860 374 mods loaded, 373 mods active
States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored

commented

send the log it's not crashing for me

commented

Update chance cubes I am unable to reproduce. This appears to be an issue with chancecubes and not evil notch lib. While I can prevent broken mods from crashing it to begin with it still will stop other mods from getting the difficulty change event so it's not really this mods issue.

commented

OK

commented

heres the log btw
latest.log

commented

for now just update chancecubes. The actual exception is from their mod. I can crash proof the fakeworld as it was suppose to be crashproof that's why it's made to create entities in post init to get stats.