mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-17 19:15:32 +00:00
Fixed ChunkDataEvent.Save being fired with a null world if chunk isn't fully generated when unloaded. (#6628)
This commit is contained in:
1 parent
4fce4eb10b
commit
1fa88ebd56
5 files changed
+46
-1
No files matched your search
@@ -0,0 +1,23 @@
|
||||
package net.minecraftforge.debug.world;
|
||||
|
||||
import net.minecraftforge.event.world.ChunkDataEvent;
|
||||
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
||||
import net.minecraftforge.fml.common.Mod;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
@Mod(ChunkDataEventSaveNullWorldTest.MODID)
|
||||
@Mod.EventBusSubscriber
|
||||
public class ChunkDataEventSaveNullWorldTest {
|
||||
static final String MODID = "chunk_data_event_save_null_world_test";
|
||||
private static final Logger LOGGER = LogManager.getLogger(MODID);
|
||||
|
||||
@SubscribeEvent
|
||||
public static void onChunkSave(final ChunkDataEvent.Save event)
|
||||
{
|
||||
if(event.getWorld() == null)
|
||||
{
|
||||
LOGGER.info("Chunk at {} had null world", event.getChunk().getPos());
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user