2015-11-01 10:34:17 +01:00
|
|
|
/*
|
|
|
|
* This file ("WorldLoadingEvents.java") is part of the Actually Additions Mod for Minecraft.
|
|
|
|
* It is created and owned by Ellpeck and distributed
|
|
|
|
* under the Actually Additions License to be found at
|
|
|
|
* http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md
|
|
|
|
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
|
|
|
|
*
|
2015-11-02 20:55:19 +01:00
|
|
|
* © 2015 Ellpeck
|
2015-11-01 10:34:17 +01:00
|
|
|
*/
|
|
|
|
|
|
|
|
package ellpeck.actuallyadditions.event;
|
|
|
|
|
|
|
|
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
|
|
|
import ellpeck.actuallyadditions.misc.LaserRelayConnectionHandler;
|
2015-11-12 20:06:58 +01:00
|
|
|
import ellpeck.actuallyadditions.misc.WorldData;
|
2015-11-01 10:34:17 +01:00
|
|
|
import net.minecraftforge.event.world.WorldEvent;
|
|
|
|
|
|
|
|
public class WorldLoadingEvents{
|
|
|
|
|
|
|
|
@SubscribeEvent
|
|
|
|
public void onLoad(WorldEvent.Load event){
|
|
|
|
if(LaserRelayConnectionHandler.getInstance() == null){
|
|
|
|
LaserRelayConnectionHandler.setInstance(new LaserRelayConnectionHandler());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@SubscribeEvent
|
|
|
|
public void onUnload(WorldEvent.Unload event){
|
2015-11-15 13:13:58 +01:00
|
|
|
WorldData.makeDirty(true);
|
2015-11-01 10:34:17 +01:00
|
|
|
}
|
2015-11-12 20:06:58 +01:00
|
|
|
|
|
|
|
@SubscribeEvent
|
|
|
|
public void onSave(WorldEvent.Save event){
|
2015-11-15 13:13:58 +01:00
|
|
|
WorldData.makeDirty(false);
|
2015-11-12 20:06:58 +01:00
|
|
|
}
|
2015-11-01 10:34:17 +01:00
|
|
|
}
|