Machines no longer explode when they receive too much power, they just smoke. Fix a crash with the power net.

(cherry picked from commit 2ae5951)
This commit is contained in:
modmuss50 2017-03-15 09:45:13 +00:00
parent 50093455ab
commit 5ed6760db9
No known key found for this signature in database
GPG key ID: 203A5ED4D3E48BEA
2 changed files with 13 additions and 7 deletions

View file

@ -228,9 +228,11 @@ public abstract class CableMultipart extends Multipart
if(network == null && cableMultipart.network != null){
network = cableMultipart.network;
network.addElement(this);
} else if (network != cableMultipart.network){
} else if (network != null && cableMultipart.network != null && network != cableMultipart.network){
network = cableMultipart.network.merge(network);
network.addElement(this);
} else {
findAndJoinNetwork(getWorld(), getPos());
}
}
}