diff --git a/src/main/java/dev/stardust/modules/ChatSigns.java b/src/main/java/dev/stardust/modules/ChatSigns.java index 3d56b8d..0e55ad6 100644 --- a/src/main/java/dev/stardust/modules/ChatSigns.java +++ b/src/main/java/dev/stardust/modules/ChatSigns.java @@ -282,8 +282,12 @@ private ArrayList getNearbySigns(WorldChunk chunk) { return signs; } + private boolean isSignEmpty(SignBlockEntity sbe) { + return !sbe.getFrontText().hasText(mc.player) && !sbe.getBackText().hasText(mc.player); + } + private String formatSignText(SignBlockEntity sign, WorldChunk chunk) { - if (mc.world == null) return ""; + if (mc.world == null || isSignEmpty(sign)) return ""; ArrayList lines = new ArrayList<>(); String color = signColor.get().label; @@ -317,7 +321,7 @@ private String formatSignText(SignBlockEntity sign, WorldChunk chunk) { boolean couldBeOld = false; RegistryKey dimension = mc.world.getRegistryKey(); - if (!String.join("", lines).trim().isEmpty() && dimension != World.NETHER || !ignoreNether.get()) { + if (dimension != World.NETHER || !ignoreNether.get()) { WoodType woodType = WoodType.BAMBOO; Block block = sign.getCachedState().getBlock(); if (block instanceof SignBlock signBlock) woodType = signBlock.getWoodType();