From 432d42ade864715f85d7758238a68de57f2f3419 Mon Sep 17 00:00:00 2001 From: ZacSharp <68165024+ZacSharp@users.noreply.github.com> Date: Sun, 15 Jan 2023 20:22:58 +0100 Subject: [PATCH] Fix #find results not being clickable --- .../baritone/command/defaults/FindCommand.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/main/java/baritone/command/defaults/FindCommand.java b/src/main/java/baritone/command/defaults/FindCommand.java index 1bc454b82..00810218d 100644 --- a/src/main/java/baritone/command/defaults/FindCommand.java +++ b/src/main/java/baritone/command/defaults/FindCommand.java @@ -75,13 +75,13 @@ public class FindCommand extends Command { private ITextComponent positionToComponent(BetterBlockPos pos) { String positionText = String.format("%s %s %s", pos.x, pos.y, pos.z); String command = String.format("%sgoal %s", FORCE_COMMAND_PREFIX, positionText); - ITextComponent baseComponent = new StringTextComponent(pos.toString()); - ITextComponent hoverComponent = new StringTextComponent("Click to set goal to this position"); - baseComponent.getStyle() - .setColor(Color.fromTextFormatting(TextFormatting.GRAY)) - .setInsertion(positionText) - .setClickEvent(new ClickEvent(ClickEvent.Action.RUN_COMMAND, command)) - .setHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, hoverComponent)); + IFormattableTextComponent baseComponent = new StringTextComponent(pos.toString()); + IFormattableTextComponent hoverComponent = new StringTextComponent("Click to set goal to this position"); + baseComponent.setStyle(baseComponent.getStyle() + .setFormatting(TextFormatting.GRAY) + .setInsertion(positionText) + .setClickEvent(new ClickEvent(ClickEvent.Action.RUN_COMMAND, command)) + .setHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, hoverComponent))); return baseComponent; }