Skip to content

shrtk/grender-client

Repository files navigation

Grender-Client

grender-client is a Fabric client mod for Minecraft 1.21.11. It sends your current position to grender-server, receives the latest positions of other mod users in the same room, and renders them through Xaero's Minimap / Xaero's World Map when those mods are installed.

License

This project is licensed under the GNU General Public License v3.0 or later. See LICENSE for the full text.

This project uses ideas and integration techniques derived from MapLink:

Requirements

  • Minecraft 1.21.11
  • Java 21
  • Fabric Loader 0.17.0+

Required mods:

Optional mods:

Xaero mods are optional. If they are not installed, sync continues to work and the Xaero bridge becomes a no-op.

What It Does

  • sends your latest position to grender-server on a configurable interval
  • receives the latest positions of other players in the same room
  • works only in multiplayer
  • sends nothing in singleplayer or while disconnected
  • stores only the latest known player state
  • optionally renders synced players in Xaero's Minimap / World Map
  • keeps working even if Xaero mods are missing

Room Model

The client and server identify a room using:

roomId = serverKey + "::" + normalizedServerIp
normalizedServerIp = trim(serverIp).toLowerCase().removeTrailingDots()

The client normalizes the current multiplayer server address before every update so it matches the server-side room rules exactly.

Sync Payload

The client sends:

  • protocolVersion
  • modVersion
  • serverKey
  • normalized serverIp
  • dimension
  • playerUuid
  • playerName
  • x
  • y
  • z
  • yaw
  • pitch
  • timestamp

The server responds with the latest known positions of other players in the same room. The client keeps a latest cache and prunes stale entries locally.

Xaero Integration

When enabled and available:

  • synced players are rendered through Xaero tracked-player rendering
  • names and distance labels can be toggled independently
  • label display distance can be limited
  • players in other dimensions are hidden from the current minimap view
  • world map dimension switching remains supported through synced dimension data

Debugging

The mod includes /grender debug, which shows:

  • sync phase
  • backend URL
  • serverKey
  • normalized serverIp
  • roomId
  • cached player count
  • Xaero availability
  • Xaero tracked player count
  • synced display on/off

If debugLogging is enabled, the mod also logs request summaries, room resolution, received players, and cleanup reasons such as disconnect, room changed, stale, self, and duplicate suppressed.

Configuration

The config file is stored at:

config/grender-client.json

It can also be edited through YACL and opened from Mod Menu.

Current settings:

  • backendServerUrl
  • serverKey
  • requestIntervalSeconds
  • enableXaeroIntegration
  • enableXaeroWaypointDisplay
  • enableXaeroNameLabels
  • enableXaeroDistanceLabels
  • xaeroLabelMaxDistance
  • staleTimeoutSeconds
  • debugLogging

Notes:

  • requestIntervalSeconds is clamped to 1..60
  • xaeroLabelMaxDistance = 0 means unlimited
  • staleTimeoutSeconds is clamped to 5..600

Development

Build the mod:

./gradlew build

Run a local dev client:

./gradlew runClient

Project Layout

  • main entrypoint: src/main/java/net/shrtk/grender/GrenderClient.java
  • sync service: src/main/java/net/shrtk/grender/service/GrenderSyncService.java
  • protocol records: src/main/java/net/shrtk/grender/service/ServerProtocol.java
  • config model: src/main/java/net/shrtk/grender/config/GrenderConfig.java
  • Xaero bridge: src/main/java/net/shrtk/grender/integration/XaeroWaypointIntegration.java

Scope

Current scope is focused on latest-position sharing and Xaero display. It does not currently include:

  • position history
  • authentication
  • path or trail rendering
  • backend map tiles

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages