This repository is a starter template for building a Fabric mod targeting:
- Minecraft:
1.21.11 - Fabric Loader:
0.18.4 - Java:
21
The baseline client mod implements a toggle-driven state machine bound to the ] key:
- States:
INITIALIZING,STARTING,IDLE,STOPPING,STOPPED - Default values on launch:
- Toggle:
OFF - State:
INITIALIZING
- Toggle:
State machine behavior by loop:
INITIALIZING-> logs entry, then moves toSTARTINGSTARTING-> logs entry, turns toggleON, then moves toIDLEIDLE-> logs entry, pressing]moves toSTOPPINGSTOPPING-> logs entry, turns toggleOFF, then moves toSTOPPEDSTOPPED-> logs entry, pressing]moves toSTARTING
The template includes logging helpers that write to the local Minecraft client logs (log file / console), not in-game chat:
- State transitions (via
setStatehelper) - Toggle changes (
ON/OFF) - Entry into each state loop
./gradlew buildRun the client in dev mode:
./gradlew runClientsrc/main/java- common mod initializersrc/client/java- client-only state machine, keybinding, and logging helperssrc/main/resources/fabric.mod.json- mod metadatadocs/- additional setup and usage docs
See docs/SETUP.md for version and customization notes.