mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-11-29 18:28:34 +01:00
Revert that, as it doesn't change anything
This commit is contained in:
parent
6fd36259fc
commit
193bd806a3
2 changed files with 4 additions and 12 deletions
|
@ -126,7 +126,7 @@ public class WorldData{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void save(World world, boolean doMessage){
|
public static void save(World world){
|
||||||
if(!world.isRemote){
|
if(!world.isRemote){
|
||||||
WorldData data = worldData.get(world.provider.getDimension());
|
WorldData data = worldData.get(world.provider.getDimension());
|
||||||
if(data != null && data.handler != null){
|
if(data != null && data.handler != null){
|
||||||
|
@ -145,11 +145,9 @@ public class WorldData{
|
||||||
CompressedStreamTools.writeCompressed(compound, stream);
|
CompressedStreamTools.writeCompressed(compound, stream);
|
||||||
stream.close();
|
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){
|
catch(Exception e){
|
||||||
ModUtil.LOGGER.error("Something went wrong trying to save WorldData for world "+data.dimension+"!", e);
|
ModUtil.LOGGER.error("Something went wrong trying to save WorldData for world "+data.dimension+"!", e);
|
||||||
}
|
}
|
||||||
|
@ -162,7 +160,7 @@ public class WorldData{
|
||||||
|
|
||||||
public static void unload(World world){
|
public static void unload(World world){
|
||||||
if(!world.isRemote){
|
if(!world.isRemote){
|
||||||
save(world, true);
|
save(world);
|
||||||
|
|
||||||
worldData.remove(world.provider.getDimension());
|
worldData.remove(world.provider.getDimension());
|
||||||
ModUtil.LOGGER.info("Unloading WorldData for world "+world.provider.getDimension()+"!");
|
ModUtil.LOGGER.info("Unloading WorldData for world "+world.provider.getDimension()+"!");
|
||||||
|
|
|
@ -12,7 +12,6 @@ package de.ellpeck.actuallyadditions.mod.event;
|
||||||
|
|
||||||
import de.ellpeck.actuallyadditions.mod.data.WorldData;
|
import de.ellpeck.actuallyadditions.mod.data.WorldData;
|
||||||
import de.ellpeck.actuallyadditions.mod.util.FakePlayerUtil;
|
import de.ellpeck.actuallyadditions.mod.util.FakePlayerUtil;
|
||||||
import net.minecraftforge.event.world.ChunkDataEvent;
|
|
||||||
import net.minecraftforge.event.world.WorldEvent;
|
import net.minecraftforge.event.world.WorldEvent;
|
||||||
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
||||||
|
|
||||||
|
@ -31,12 +30,7 @@ public class WorldLoadingEvents{
|
||||||
|
|
||||||
@SubscribeEvent
|
@SubscribeEvent
|
||||||
public void onSave(WorldEvent.Save event){
|
public void onSave(WorldEvent.Save event){
|
||||||
WorldData.save(event.getWorld(), true);
|
WorldData.save(event.getWorld());
|
||||||
}
|
|
||||||
|
|
||||||
@SubscribeEvent
|
|
||||||
public void onChunkUnload(ChunkDataEvent.Save event){
|
|
||||||
WorldData.save(event.getWorld(), false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue