#getCommandTags Empty

2 messages · Page 1 of 1 (latest)

radiant cliff
#

Hey! Im trying to create a client mod and I need the list of command tags that the current player entity has. The issue is that player.getCommandTags() returns an empty set. This is strange because in game if I do /tag @s list it lists all the correct tags that I have. Why is it returning an empty set?

I would imagine this set should not be empty because the auto complete for /tag @s remove uses this function and correctly gets all of the tags.

This is my code

    @Override
    public void onHudRender(DrawContext drawContext, RenderTickCounter tickCounter) {
        MinecraftClient mc = MinecraftClient.getInstance();
        System.out.println(mc.player.getCommandTags());

    }```
Is it possible its empty while hud render callback is being called? Im just unsure of what could be causing it to be empty. Any help would be appreciated!
<3
radiant cliff
#

Is this field server only? If so how does the autocomplete work to get all of the tags?