Fix bug introduced by last commit, world is nullable so we need to be checking the instanceof first to ensure it is not null
@@ -409,7 +409,7 @@ public class Mekanism {
private synchronized void onChunkDataLoad(ChunkDataEvent.Load event) {
IWorld world = event.getWorld();
- if (!world.isRemote() && world instanceof World && MekanismConfig.world.enableRegeneration.get()) {
+ if (world instanceof World && !world.isRemote() && MekanismConfig.world.enableRegeneration.get()) {
CompoundNBT levelTag = event.getData().getCompound(NBTConstants.CHUNK_DATA_LEVEL);
if (levelTag.getInt(NBTConstants.WORLD_GEN_VERSION) < MekanismConfig.world.userGenVersion.get()) {
worldTickHandler.addRegenChunk(((World) world).func_234923_W_(), event.getChunk().getPos());
