Fix NPE
This commit is contained in:
@@ -18,8 +18,13 @@ 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);
|
||||||
get(dimension).remove(pos);
|
|
||||||
|
if (network != null) {
|
||||||
|
network.onRemoved();
|
||||||
|
|
||||||
|
get(dimension).remove(pos);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user