mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-11-04 16:19:10 +01:00
36 lines
1.1 KiB
Java
36 lines
1.1 KiB
Java
/*
|
|
* 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 Ellpeck
|
|
*/
|
|
|
|
package de.ellpeck.actuallyadditions.event;
|
|
|
|
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
|
import de.ellpeck.actuallyadditions.misc.LaserRelayConnectionHandler;
|
|
import de.ellpeck.actuallyadditions.misc.WorldData;
|
|
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){
|
|
WorldData.makeDirty();
|
|
}
|
|
|
|
@SubscribeEvent
|
|
public void onSave(WorldEvent.Save event){
|
|
WorldData.makeDirty();
|
|
}
|
|
}
|