From 2485f023bba9dc1cdaa82fd4b330c2f93f5dda26 Mon Sep 17 00:00:00 2001 From: makamys Date: Sun, 16 Apr 2023 01:30:06 +0200 Subject: Don't print status command hint in the status command's output --- src/main/java/makamys/neodymium/Neodymium.java | 2 +- .../neodymium/command/NeodymiumCommand.java | 5 ++--- .../makamys/neodymium/renderer/NeoRenderer.java | 22 +++++++++++----------- 3 files changed, 14 insertions(+), 15 deletions(-) (limited to 'src/main/java') diff --git a/src/main/java/makamys/neodymium/Neodymium.java b/src/main/java/makamys/neodymium/Neodymium.java index b140a3c..1b718e6 100644 --- a/src/main/java/makamys/neodymium/Neodymium.java +++ b/src/main/java/makamys/neodymium/Neodymium.java @@ -183,7 +183,7 @@ public class Neodymium renderDebugText = false; RenderGameOverlayEvent.Text text = (RenderGameOverlayEvent.Text) event; text.right.add(null); - text.right.addAll(renderer.getDebugText()); + text.right.addAll(renderer.getDebugText(false)); } } } diff --git a/src/main/java/makamys/neodymium/command/NeodymiumCommand.java b/src/main/java/makamys/neodymium/command/NeodymiumCommand.java index e5ccaf0..b4d51a9 100644 --- a/src/main/java/makamys/neodymium/command/NeodymiumCommand.java +++ b/src/main/java/makamys/neodymium/command/NeodymiumCommand.java @@ -88,9 +88,8 @@ public class NeodymiumCommand extends CommandBase { @Override public void processCommand(ICommandSender sender, String[] args) { if(Neodymium.renderer != null) { - List text = Neodymium.renderer.getDebugText(); - addColoredChatMessage(sender, text.get(0), EnumChatFormatting.LIGHT_PURPLE); - addChatMessages(sender, text.subList(1, text.size())); + List text = Neodymium.renderer.getDebugText(true); + addChatMessages(sender, text); } Pair, List> allWarns = Neodymium.checkCompat(); List warns = allWarns.getLeft(); diff --git a/src/main/java/makamys/neodymium/renderer/NeoRenderer.java b/src/main/java/makamys/neodymium/renderer/NeoRenderer.java index 74daa4f..7dd94bf 100644 --- a/src/main/java/makamys/neodymium/renderer/NeoRenderer.java +++ b/src/main/java/makamys/neodymium/renderer/NeoRenderer.java @@ -595,26 +595,26 @@ public class NeoRenderer { setMeshVisible(mesh, false); } - public List getDebugText() { + public List getDebugText(boolean statusCommand) { List text = new ArrayList<>(); - text.addAll(Arrays.asList( - (!rendererActive ? EnumChatFormatting.RED + "(OFF) " : "") + "Neodymium " + VERSION - )); + text.add( + (!rendererActive ? EnumChatFormatting.RED + "(OFF) " : "") + + (statusCommand ? EnumChatFormatting.LIGHT_PURPLE : "") + + "Neodymium " + VERSION + ); text.addAll(mem.getDebugText()); text.addAll(Arrays.asList( "Meshes: " + ChunkMesh.instances + " (" + ChunkMesh.usedRAM / 1024 / 1024 + "MB)", "Rendered: " + renderedMeshes + " (" + renderedQuads / 1000 + "KQ)" )); if(rendererSpeedup > 0) { - text.addAll(Arrays.asList( - EnumChatFormatting.YELLOW + "(!) Renderer speedup active" - )); + text.add(EnumChatFormatting.YELLOW + "(!) Renderer speedup active"); } if(hasIncompatibilities) { - text.addAll(Arrays.asList( - EnumChatFormatting.YELLOW + "(!) Incompatibilities", - EnumChatFormatting.YELLOW + "Type '/neodymium status'" - )); + text.add(EnumChatFormatting.YELLOW + "(!) Incompatibilities"); + if(!statusCommand) { + text.add(EnumChatFormatting.YELLOW + "Type '/neodymium status'"); + } } return text; } -- cgit