enforce cache reset of storage bus attached to interfaces were configs

changed
This commit is contained in:
PrototypeTrousers
2021-08-16 21:55:35 -03:00
parent b041fae0d5
commit 9f09cd04d4
3 changed files with 15 additions and 3 deletions
@@ -25,6 +25,9 @@ import java.util.Objects;
import appeng.fluids.parts.FluidHandlerAdapter;
import appeng.me.storage.MEPassThrough;
import appeng.parts.AEBasePart;
import appeng.tile.misc.TileInterface;
import appeng.tile.networking.TileCableBus;
import appeng.util.ConfigManager;
import com.jaquadro.minecraft.storagedrawers.api.capabilities.IItemRepository;
import net.minecraft.entity.player.EntityPlayer;
@@ -306,10 +309,19 @@ public class PartStorageBus extends PartUpgradeable implements IGridTickable, IC
{
if( pos.offset( this.getSide().getFacing() ).equals( neighbor ) )
{
final TileEntity te = w.getTileEntity( neighbor );
// In case the TE was destroyed, we have to do a full reset immediately.
if( te == null )
if( te instanceof TileCableBus )
{
if( ( (TileCableBus) te ).getPart( this.getSide().getOpposite() ) instanceof PartInterface )
{
this.resetCache( true );
this.resetCache();
}
}
if( te == null || te instanceof TileInterface )
{
this.resetCache( true );
this.resetCache();