From 444e619f91d220e8b652bdc935a3d54cd2027e87 Mon Sep 17 00:00:00 2001 From: Unknown Date: Mon, 11 Nov 2019 01:29:56 +0100 Subject: [PATCH] Fixed intermittent console spam when breaking a cloaking core --- .../warpdrive/block/detection/TileEntityCloakingCore.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/java/cr0s/warpdrive/block/detection/TileEntityCloakingCore.java b/src/main/java/cr0s/warpdrive/block/detection/TileEntityCloakingCore.java index f957bc30..005fa34d 100644 --- a/src/main/java/cr0s/warpdrive/block/detection/TileEntityCloakingCore.java +++ b/src/main/java/cr0s/warpdrive/block/detection/TileEntityCloakingCore.java @@ -340,8 +340,12 @@ public class TileEntityCloakingCore extends TileEntityAbstractEnergyCoreOrContro } private void updateCoils(final boolean isConnected, final boolean isActive) { - updateBlockState(null, BlockProperties.ACTIVE, isActive); + // update core, only if it's still present/connected + if (isConnected) { + updateBlockState(null, BlockProperties.ACTIVE, isActive); + } + // update coils for (final EnumFacing direction : EnumFacing.VALUES) { if (isValidInnerCoils[direction.ordinal()]) { updateCoil(isConnected, isActive, direction, DISTANCE_INNER_COILS_BLOCKS);