From c23aafee9f3e40c062da76260a03c58ddf9549c4 Mon Sep 17 00:00:00 2001 From: Ben Spiers Date: Sun, 12 Apr 2015 00:19:49 +0100 Subject: [PATCH] Should fix the NPE in updateTransmitterOnSide. --- .../mekanism/api/transmitters/DynamicNetwork.java | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/main/java/mekanism/api/transmitters/DynamicNetwork.java b/src/main/java/mekanism/api/transmitters/DynamicNetwork.java index 734f958e8..fd78b865c 100644 --- a/src/main/java/mekanism/api/transmitters/DynamicNetwork.java +++ b/src/main/java/mekanism/api/transmitters/DynamicNetwork.java @@ -35,8 +35,6 @@ public abstract class DynamicNetwork> implemen protected Range4D packetRange = null; - protected int ticksSinceCreate = 0; - protected int capacity = 0; protected double meanCapacity = 0; @@ -86,11 +84,14 @@ public abstract class DynamicNetwork> implemen for(Entry, EnumSet> entry : changedAcceptors.entrySet()) { IGridTransmitter transmitter = entry.getKey(); - EnumSet directionsChanged = entry.getValue(); - - for(ForgeDirection side : directionsChanged) + if(transmitter.isValid()) { - updateTransmitterOnSide(transmitter, side); + EnumSet directionsChanged = entry.getValue(); + + for(ForgeDirection side : directionsChanged) + { + updateTransmitterOnSide(transmitter, side); + } } }