Add friends, markers, HUD overlays, tab complete

- FriendsManager persists a per-user friend list at config/clientirc-friends.json.
- MarkerManager holds one ephemeral marker per owner (5 min expiry).
- IRC protocol extended with marker_set / marker_remove; server relays them.
- IrcService DisplayLine replaced with sealed IrcEvent (Chat / System / MarkerSet / MarkerRemove); chat formatting moved into the client.
- ClientIrcMod handles .friends add/remove/list, .marker remove, .help; chat lines from friends are prefixed with a green dot; marker events from non-friends are ignored.
- OverlayHud draws a top-center compass strip and a top-left watermark (nick / FPS / ping) via HudLayerRegistrationCallback.
- WorldOverlayRenderer draws green crosses above friends and magenta beams + base cubes at active markers via WorldRenderEvents.AFTER_ENTITIES.
- MiddleClickHandler binds MMB via KeyMapping, raycasts a block or 20-block look ray, stores locally and sends marker_set on a daemon executor.
- ChatScreenMixin completes . prefix commands on Tab; first mixin in the project, plumbed through clientirc.client.mixins.json and fabric.mod.json.
This commit is contained in:
2026-06-21 21:16:32 +06:00
parent 0112bde962
commit c25e394d50
12 changed files with 864 additions and 66 deletions

View File

@@ -6,27 +6,55 @@ public final class IrcMessage {
public String player;
public String message;
public String token;
public String dimensionId;
public Double x;
public Double y;
public Double z;
public long timestamp;
public static IrcMessage hello(String clientName, String playerName, String token) {
IrcMessage message = new IrcMessage();
message.type = "hello";
message.client = clientName;
message.player = playerName;
message.token = token;
message.timestamp = System.currentTimeMillis();
return message;
IrcMessage m = new IrcMessage();
m.type = "hello";
m.client = clientName;
m.player = playerName;
m.token = token;
m.timestamp = System.currentTimeMillis();
return m;
}
public static IrcMessage chat(String clientName, String playerName, String text, String token) {
IrcMessage message = new IrcMessage();
message.type = "chat";
message.client = clientName;
message.player = playerName;
message.message = text;
message.token = token;
message.timestamp = System.currentTimeMillis();
return message;
IrcMessage m = new IrcMessage();
m.type = "chat";
m.client = clientName;
m.player = playerName;
m.message = text;
m.token = token;
m.timestamp = System.currentTimeMillis();
return m;
}
public static IrcMessage markerSet(String clientName, String playerName, String token,
String dimensionId, double x, double y, double z) {
IrcMessage m = new IrcMessage();
m.type = "marker_set";
m.client = clientName;
m.player = playerName;
m.token = token;
m.dimensionId = dimensionId;
m.x = x;
m.y = y;
m.z = z;
m.timestamp = System.currentTimeMillis();
return m;
}
public static IrcMessage markerRemove(String clientName, String playerName, String token) {
IrcMessage m = new IrcMessage();
m.type = "marker_remove";
m.client = clientName;
m.player = playerName;
m.token = token;
m.timestamp = System.currentTimeMillis();
return m;
}
}