This commit is contained in:
Raoul Van den Berge
2016-06-22 00:12:46 +02:00
parent 27455b118a
commit 5f24e1cd9f

View File

@@ -18,10 +18,15 @@ public class NetworkMasterRegistry {
public static void remove(BlockPos pos, int dimension) { public static void remove(BlockPos pos, int dimension) {
if (get(dimension) != null) { if (get(dimension) != null) {
get(dimension).get(pos).onRemoved(); NetworkMaster network = get(dimension).get(pos);
if (network != null) {
network.onRemoved();
get(dimension).remove(pos); get(dimension).remove(pos);
} }
} }
}
public static NetworkMaster get(BlockPos pos, int dimension) { public static NetworkMaster get(BlockPos pos, int dimension) {
return get(dimension) == null ? null : get(dimension).get(pos); return get(dimension) == null ? null : get(dimension).get(pos);