diff options
author | makamys <makamys@outlook.com> | 2023-04-16 01:30:06 +0200 |
---|---|---|
committer | makamys <makamys@outlook.com> | 2023-04-16 01:30:40 +0200 |
commit | 2485f023bba9dc1cdaa82fd4b330c2f93f5dda26 (patch) | |
tree | 887f8bb596f91cca80ca36e88494be11bd437b9e /src/main/java/makamys/neodymium | |
parent | c45e5e5ea42cf2b5aab99e407adf51dc34854793 (diff) | |
download | Neodymium-2485f023bba9dc1cdaa82fd4b330c2f93f5dda26.tar.gz Neodymium-2485f023bba9dc1cdaa82fd4b330c2f93f5dda26.tar.bz2 Neodymium-2485f023bba9dc1cdaa82fd4b330c2f93f5dda26.zip |
Don't print status command hint in the status command's output
Diffstat (limited to 'src/main/java/makamys/neodymium')
3 files changed, 14 insertions, 15 deletions
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<String> text = Neodymium.renderer.getDebugText(); - addColoredChatMessage(sender, text.get(0), EnumChatFormatting.LIGHT_PURPLE); - addChatMessages(sender, text.subList(1, text.size())); + List<String> text = Neodymium.renderer.getDebugText(true); + addChatMessages(sender, text); } Pair<List<String>, List<String>> allWarns = Neodymium.checkCompat(); List<String> 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<String> getDebugText() { + public List<String> getDebugText(boolean statusCommand) { List<String> 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; } |