Baritone AI pathfinder

Baritone AI pathfinder

72.7k Downloads

Any way to disable command feedback in chat?

TheUnderTaker11 opened this issue ยท 8 comments

commented

What do you need help with?

I want to know if I can disable the command feeback in chat, like this stuff
image

It would be super helpful if there was some way to stop it completely, or at least have a blacklist/whitelist of commands that will or won't give feedback like that in chat.

I see this

public final Setting<Consumer<ITextComponent>> logger = new Setting<>(Minecraft.getMinecraft().ingameGUI.getChatGUI()::printChatMessage);

But I have no idea how it could be used to stop logging certain things, or altogether stopping logging, either is acceptable. I can do this in code myself with a Forge mod if I only knew HOW to do it.

Final checklist

  • I know how to properly use check boxes
  • I have not used any OwO's or UwU's in this issue.
commented

can you give me compiled version?

commented

its a setting i think..
maybe censorRanCommands
maybe you could delete it with a regex mod..

commented

censorRanCommands doesn't do that, it's got another purpose. echoCommands also isn't really helpful.

If someone could tell me how to change the behavior of the logger, it would perfectly fit my situation.

commented

Censor censors the coordinates in commands.
If you wanna do this with a forge mod, just make a ClientChatReceivedEvent event and then do

if (event.getMessage().match(REGEX GOES HERE)) event.setCancelled(true)

There isn't a way to disable it in baritone itself without changing the logger to some custom chat source that doesn't show.

commented

@Dominikaaaa It took me awhile to test since Baritone legit just won't run in my workspace (Yes I changed the mappings of my mod to the ones baritone uses, compiled it myself using gradlew java from the source code, put it on the build path, it just simply doesn't load baritone, then trying to put baritone in the run directory as a normal mod just crashes)

But that aside, the ClientChatRecivedEvent is not fired by Baritone's chat messages, so that doesn't work.

commented

Look at the last 2 commits in my build.gradle here for how we got Baritone working in our gradle. As for the second one, I can't help you there.

commented

I thought overwriting the logger using something like
BaritoneAPI.getSettings().logger.value = SOMETHING would work, however I was never able to get anything at all in that SOMETHING to work. It either crashed the game, or didn't overwrite the fact it logs to chatGUI

commented

Here is how to change it.

BaritoneAPI.getSettings().logger.value = (component) -> {
            System.out.println("BARITONE SAID :: " + component.getUnformattedText());
        };