/mc_debug_renderer

Enables servers to render debug shapes on the client.

Primary LanguageJavaMIT LicenseMIT

I have no plans to reliably update this mod, and it is not guaranteed to work perfectly

Minecraft Debug Renderer

Allows servers to render arbitrarily placed and sized debug shapes on the client.

Usage

Any platform which can send plugin messages is supported.

Minestom

A Minestom wrapper is available on Jitpack.

repositories {
    // ...
    maven { url 'https://jitpack.io' }
}

dependencies {
    // ...
    implementation 'com.github.mworzala.mc_debug_renderer:minestom:$LATEST_COMMIT_HASH'
}

Checking if enabled

The client will send a plugin message with the id debug:enabled when joining a server if the mod is present. The message will have no content.

Plugin Messages

The following plugin messages are supported:

Multi Operation

PMC ID Field Name Field Type Notes
debug:shapes Op Count VarInt The number of operations following
Operation Operation See below

Single Operation

PMC ID Field Name Field Type Notes
debug_shape Type NamespaceID
SET (0) ID NamespaceID The ID of the shape (can be anything, conflicts will be replaced)
Shape Type VarInt See below
Shape Shape See below
REMOVE (1) Target NamespaceID
CLEAR_NS (2) Target String Clears all entries in the given namespace.
CLEAR (3)

Shape Types

Box

Shape ID Field Name Field Type Notes
0 Start Vec3D 3 doubles
End Vec3D 3 doubles
Color Integer in ARGB format (8 bits per component)
Layer Enum[INLINE, TOP] (VarInt) INLINE mode will render behind impeding blocks, TOP will draw above everything else (eg always visible)

Line

Shape ID Field Name Field Type Notes
1 Point Count VarInt The number of points following, they will be drawn as a strip
Point Vec3D 3 doubles
Thickness Float Line thickness, only supported on some GPUs
Color Integer in ARGB format (8 bits per component)
Layer Enum[INLINE, TOP] (VarInt) INLINE mode will render behind impeding blocks, TOP will draw above everything else (eg always visible)

Text

Shape ID Field Name Field Type Notes
2 Point Vec3D 3 doubles
Content String The text to render
Color Integer in ARGB format (8 bits per component)
Size Float
Layer Enum[INLINE, TOP] (VarInt) INLINE mode will render behind impeding blocks, TOP will draw above everything else (eg always visible)

License

This project is licensed under the MIT License.