Merge pull request #3126 from PiTheGuy/crash-fix-3103

Add check to TorquePropagator, fixing #3103
This commit is contained in:
simibubi 2022-08-01 15:21:37 +02:00 committed by GitHub
commit 774345192b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -26,6 +26,8 @@ public class TorquePropagator {
public KineticNetwork getOrCreateNetworkFor(KineticTileEntity te) {
Long id = te.network;
KineticNetwork network;
if (!networks.containsKey(te.getLevel()))
networks.put(te.getLevel(), new HashMap<>());
Map<Long, KineticNetwork> map = networks.get(te.getLevel());
if (id == null)
return null;