Player module

Player: Minecraft 26.3 cheat module, full source for every implementation (1 client: Nicotine).

1 implementationHUD

Clients with this module

Full module source: 1 implementation

Every implementation below is the complete module file, verbatim. Expand a client to read its code.

NicotineHUDsrc/client/java/nicotine/mod/mods/hud/Player.javaJava · 34 lines · 864 B
Player.javaJava · Minecraft 26.3 · 34 lines · 864 B · complete file, verbatimOriginal ↗
1
package nicotine.mod.mods.hud;
2
3
import net.minecraft.ChatFormatting;
4
import nicotine.events.ClientLevelTickEvent;
5
import nicotine.mod.HUDMod;
6
import nicotine.mod.ModCategory;
7
import nicotine.mod.mods.general.HUD;
8
import nicotine.util.EventBus;
9
10
import java.util.List;
11
12
import static nicotine.util.Common.mc;
13
14
public class Player extends HUDMod {
15
16
    public Player() {
17
        super(ModCategory.HUD, "Player");
18
        this.anchor = HUDMod.Anchor.TopLeft;
19
    }
20
21
    @Override
22
    protected void init() {
23
        EventBus.register(ClientLevelTickEvent.class, event -> {
24
            if (!this.enabled)
25
                return true;
26
27
            String playerText = String.format("player %s%s %s", ChatFormatting.WHITE, HUD.separator.value, mc.player.getName().getString());
28
            this.texts = List.of(playerText);
29
30
            return true;
31
        });
32
    }
33
}
34