From c76640733d45fb20794bc37e15d58c3068de16ae Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Sat, 3 Dec 2016 23:32:03 +0100 Subject: [PATCH] Fix Laser Relays sometimes not updating their caches --- .../actuallyadditions/mod/tile/TileEntityLaserRelayEnergy.java | 2 +- .../actuallyadditions/mod/tile/TileEntityLaserRelayFluids.java | 2 +- .../actuallyadditions/mod/tile/TileEntityLaserRelayItem.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLaserRelayEnergy.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLaserRelayEnergy.java index ed87181c7..35c1b99e9 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLaserRelayEnergy.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLaserRelayEnergy.java @@ -100,7 +100,7 @@ public class TileEntityLaserRelayEnergy extends TileEntityLaserRelay implements } } - if(change){ + if(change || old.size() != this.receiversAround.size()){ Network network = ActuallyAdditionsAPI.connectionHandler.getNetworkFor(this.getPos(), this.getWorld()); if(network != null){ network.changeAmount++; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLaserRelayFluids.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLaserRelayFluids.java index d7d259a97..3c8079189 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLaserRelayFluids.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLaserRelayFluids.java @@ -63,7 +63,7 @@ public class TileEntityLaserRelayFluids extends TileEntityLaserRelay implements } } - if(change){ + if(change || old.size() != this.receiversAround.size()){ Network network = ActuallyAdditionsAPI.connectionHandler.getNetworkFor(this.getPos(), this.getWorld()); if(network != null){ network.changeAmount++; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLaserRelayItem.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLaserRelayItem.java index 386f37970..c1e34dccb 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLaserRelayItem.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLaserRelayItem.java @@ -79,7 +79,7 @@ public class TileEntityLaserRelayItem extends TileEntityLaserRelay{ } } - if(change){ + if(change || old.size() != this.handlersAround.size()){ Network network = ActuallyAdditionsAPI.connectionHandler.getNetworkFor(this.getPos(), this.getWorld()); if(network != null){ network.changeAmount++;