Fix Laser Relay Network. Damn it.

This commit is contained in:
Ellpeck 2015-10-31 15:21:50 +01:00
parent 1cab983658
commit 42a6401c0d
2 changed files with 3 additions and 8 deletions

View file

@ -117,10 +117,6 @@ public class ActuallyAdditions{
Util.registerDispenserHandler(Items.bucket, new DispenserHandlerFillBucket()); Util.registerDispenserHandler(Items.bucket, new DispenserHandlerFillBucket());
Util.registerDispenserHandler(InitItems.itemFertilizer, new DispenserHandlerFertilize()); Util.registerDispenserHandler(InitItems.itemFertilizer, new DispenserHandlerFertilize());
if(LaserRelayConnectionHandler.getInstance() == null){
LaserRelayConnectionHandler.setInstance(new LaserRelayConnectionHandler());
}
WorldData.init(event.getServer()); WorldData.init(event.getServer());
} }

View file

@ -31,13 +31,12 @@ public class LaserRelayConnectionHandler{
public ConcurrentSet<Network> networks = new ConcurrentSet<Network>(); public ConcurrentSet<Network> networks = new ConcurrentSet<Network>();
public static LaserRelayConnectionHandler getInstance(){ public static LaserRelayConnectionHandler getInstance(){
if(instance == null){
instance = new LaserRelayConnectionHandler();
}
return instance; return instance;
} }
public static void setInstance(LaserRelayConnectionHandler i){
instance = i;
}
public NBTTagCompound writeNetworkToNBT(Network network){ public NBTTagCompound writeNetworkToNBT(Network network){
NBTTagList list = new NBTTagList(); NBTTagList list = new NBTTagList();
for(ConnectionPair pair : network.connections){ for(ConnectionPair pair : network.connections){