diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/data/WorldData.java b/src/main/java/de/ellpeck/actuallyadditions/mod/data/WorldData.java index 3587b668f..2d4ce8eab 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/data/WorldData.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/data/WorldData.java @@ -126,7 +126,7 @@ public class WorldData{ } } - public static void save(World world, boolean doMessage){ + public static void save(World world){ if(!world.isRemote){ WorldData data = worldData.get(world.provider.getDimension()); if(data != null && data.handler != null){ @@ -145,9 +145,7 @@ public class WorldData{ CompressedStreamTools.writeCompressed(compound, stream); stream.close(); - if(doMessage){ - ModUtil.LOGGER.info("Saved WorldData for world "+data.dimension+"!"); - } + ModUtil.LOGGER.info("Saved WorldData for world "+data.dimension+"!"); } } catch(Exception e){ @@ -162,7 +160,7 @@ public class WorldData{ public static void unload(World world){ if(!world.isRemote){ - save(world, true); + save(world); worldData.remove(world.provider.getDimension()); ModUtil.LOGGER.info("Unloading WorldData for world "+world.provider.getDimension()+"!"); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/event/WorldLoadingEvents.java b/src/main/java/de/ellpeck/actuallyadditions/mod/event/WorldLoadingEvents.java index 660195306..eb4e353db 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/event/WorldLoadingEvents.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/event/WorldLoadingEvents.java @@ -12,7 +12,6 @@ package de.ellpeck.actuallyadditions.mod.event; import de.ellpeck.actuallyadditions.mod.data.WorldData; import de.ellpeck.actuallyadditions.mod.util.FakePlayerUtil; -import net.minecraftforge.event.world.ChunkDataEvent; import net.minecraftforge.event.world.WorldEvent; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; @@ -31,12 +30,7 @@ public class WorldLoadingEvents{ @SubscribeEvent public void onSave(WorldEvent.Save event){ - WorldData.save(event.getWorld(), true); - } - - @SubscribeEvent - public void onChunkUnload(ChunkDataEvent.Save event){ - WorldData.save(event.getWorld(), false); + WorldData.save(event.getWorld()); } }