@Soulevoker opened this Pull Request on April 14th 2021 First_time_contributor

Why:

  • Baritone has the ability to click on messages in the chat to
    execute commands. These commands use a "Force Command" system
    that prefixes the commands with <<UUID>>.
  • In a fix to prevent plugins from detecting whether or not a user
    is running a hacked client like Wurst, run command chat actions
    were disabled in the ScreenMixin. This breaks clicking Baritone
    chat commands.

How:

  • There are two proposed solutions.
    1. Solution one checks whether or not a message has the "Force
      Command" system prefix, and tells the mixin to return, allowing
      the command to execute.
    2. Solution two checks whether or not a message starts with the
      Wurst command prefix, ".". If it does, force sending that
      message to the chat window to emulate a vanilla client
      typing that exact string. This solution has the added benefit
      of "fixing" the Xaero's Map teleport integration. The teleport
      integration allows for running a custom command, such at Baritone's

      goto command.

Test Plan:
Common:

  • Ensure Wurst commands still work
  • Ensure Baritone Chat commands work
  • Ensure servers cannot detect the Wurst client with Captchas
  • Run this command in-game, and click the result:
    /tellraw <a class='mention' href='https://github.com/a'>@a</a> {"text":"Click this!","clickEvent":{"action":"run_command","value":".say /say Hello!"}}
    The result should have the player say the exact string, ".say /say Hello!"

Solution 1:

  • Ensure Xaero's map integration remains broken; when "teleporting" the #goto command should be said by the player

Solution 2:

  • Ensure Xaero's map integration works
@CLAassistant commented on April 14th 2021

CLA assistant check
All committers have signed the CLA.

@10maurycy10 commented on April 30th 2021

I added and built this patch and it fixed the problem.
Wurst-Client-v7.15-MC1.16.5.zip