Client runtime: timing, DPI scale, local sounds and the clipboard.
Related: server · chat · hud · input · screen
Timing and scale
| Function | Returns |
|---|---|
client.fps() |
Current FPS |
client.millis() |
Wall-clock time in milliseconds |
client.tick_delta() |
Progress between ticks (0..1) — useful for smooth movement |
client.scale() |
DPI scale factor (relative to a 1920px base) |
Sounds and clipboard
| Function | What it does |
|---|---|
client.play_sound(id, volume?, pitch?) |
Plays a sound locally, e.g. "minecraft:ui.button.click" |
client.clipboard() |
System clipboard contents |
client.set_clipboard(s) |
Replaces the system clipboard |