CrucibleMC / Crucible

Crucible, a fork of Thermos, is a CraftBukkit and Forge server implementation for 1.7.10, providing the ability to load both Forge mods and Bukkit plugins alongside each other.
https://discord.gg/jWSTJ4d
GNU General Public License v3.0
184 stars 63 forks source link

Fixed NPE with MFR grinder fake-world #127

Closed TheDarkDnKTv closed 1 year ago

TheDarkDnKTv commented 1 year ago

I've lost logs, so didn't create an issue.

The problem was with random server crashed, especially right after startup. The crash log was referencing only MC's calls of entity, getting NPE on call of EntityLiving#despawnEntity. After some invistigation with debbuger on live server, I found that MFR's grinder creates World proxy to override spawnEntityInWorld, which caused filling of cauldronConfig with null and future crash on entity killing.

This simple patch fixed an issue.

juanmuscaria commented 1 year ago

Hmmm now that's odd, under any circumstance that field should be null. Unless somehow a World instance is created before overworld is even loaded? In any case, seems like actually using a getter method will make sure it's getting from the proxied world (https://github.com/CoFH/CoFHCore-1.12-Legacy/blob/4be193afe63bcf108c5ad5abd34da34028434c65/src/main/java/cofh/asm/ASMCore.java#LL1519C1-L1519C1). I already plan to tidy up that thing someday, so I'll just merge while a permanent solution is not made.