From cce6e89085755497756ff5e1b284251deb5cec67 Mon Sep 17 00:00:00 2001 From: Thiakil Date: Fri, 3 Jan 2025 22:13:54 +0800 Subject: [PATCH] clear capability cache when marked as invalid to try prevent bad caches (#8291) --- .../network/transmitter/LogisticalTransporterBase.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/main/java/mekanism/common/content/network/transmitter/LogisticalTransporterBase.java b/src/main/java/mekanism/common/content/network/transmitter/LogisticalTransporterBase.java index 7ada33c131f..cb3fae235ae 100644 --- a/src/main/java/mekanism/common/content/network/transmitter/LogisticalTransporterBase.java +++ b/src/main/java/mekanism/common/content/network/transmitter/LogisticalTransporterBase.java @@ -310,6 +310,7 @@ public void onUpdateServer() { @Override public void remove() { super.remove(); + capabilityCache.clear(); if (!isRemote()) { for (TransporterStack stack : getTransit()) { TransporterManager.remove(getLevel(), stack); @@ -317,6 +318,12 @@ public void remove() { } } + @Override + public void refreshConnections() { + super.refreshConnections(); + capabilityCache.clear(); + } + @Override public InventoryNetwork createEmptyNetworkWithID(UUID networkID) { return new InventoryNetwork(networkID);