From dea0632de4f6caf240cd24d66a69c40d406697a7 Mon Sep 17 00:00:00 2001 From: johnch18 <42650497+johnch18@users.noreply.github.com> Date: Wed, 26 Oct 2022 12:30:59 -0600 Subject: Fixed annoying cover message bug (#1490) * Fixed annoying cover message bug * Spotless --- .../gregtech/common/covers/GT_Cover_ControlsWork.java | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) (limited to 'src/main/java/gregtech/common') diff --git a/src/main/java/gregtech/common/covers/GT_Cover_ControlsWork.java b/src/main/java/gregtech/common/covers/GT_Cover_ControlsWork.java index dda79321c9..d8f09619bc 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_ControlsWork.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_ControlsWork.java @@ -46,13 +46,18 @@ public class GT_Cover_ControlsWork extends GT_CoverBehavior { } else { if (machine.wasShutdown()) { machine.disableWorking(); - GT_Utility.sendChatToPlayer( - lastPlayer, - aTileEntity.getInventoryName() + "at " - + String.format( - "(%d,%d,%d)", - aTileEntity.getXCoord(), aTileEntity.getYCoord(), aTileEntity.getZCoord()) - + " shut down."); + if (!mPlayerNotified) { + mPlayerNotified = true; + GT_Utility.sendChatToPlayer( + lastPlayer, + aTileEntity.getInventoryName() + "at " + + String.format( + "(%d,%d,%d)", + aTileEntity.getXCoord(), + aTileEntity.getYCoord(), + aTileEntity.getZCoord()) + + " shut down."); + } return 2; } else { return 3 + doCoverThings(aSide, aInputRedstone, aCoverID, aCoverVariable - 3, aTileEntity, aTimer); -- cgit