Actually fixed Laser Relay Connection Issues

This commit is contained in:
Ellpeck 2015-11-12 20:06:58 +01:00
parent 093a69ed13
commit 0259e52fa1
2 changed files with 11 additions and 4 deletions

View file

@ -31,10 +31,7 @@ import ellpeck.actuallyadditions.items.InitItems;
import ellpeck.actuallyadditions.items.ItemCoffee;
import ellpeck.actuallyadditions.material.InitArmorMaterials;
import ellpeck.actuallyadditions.material.InitToolMaterials;
import ellpeck.actuallyadditions.misc.DispenserHandlerEmptyBucket;
import ellpeck.actuallyadditions.misc.DispenserHandlerFertilize;
import ellpeck.actuallyadditions.misc.DispenserHandlerFillBucket;
import ellpeck.actuallyadditions.misc.WorldData;
import ellpeck.actuallyadditions.misc.*;
import ellpeck.actuallyadditions.network.PacketHandler;
import ellpeck.actuallyadditions.ore.InitOreDict;
import ellpeck.actuallyadditions.proxy.IProxy;
@ -124,6 +121,10 @@ public class ActuallyAdditions{
@EventHandler
public void serverStarted(FMLServerStartedEvent event){
if(LaserRelayConnectionHandler.getInstance() == null){
LaserRelayConnectionHandler.setInstance(new LaserRelayConnectionHandler());
}
WorldData.init(MinecraftServer.getServer());
}

View file

@ -12,6 +12,7 @@ package ellpeck.actuallyadditions.event;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import ellpeck.actuallyadditions.misc.LaserRelayConnectionHandler;
import ellpeck.actuallyadditions.misc.WorldData;
import net.minecraftforge.event.world.WorldEvent;
public class WorldLoadingEvents{
@ -28,4 +29,9 @@ public class WorldLoadingEvents{
//Clear Data so that it won't be carried over to other worlds
LaserRelayConnectionHandler.getInstance().networks.clear();
}
@SubscribeEvent
public void onSave(WorldEvent.Save event){
WorldData.makeDirty();
}
}