A Fabric client mod that detects when the player goes underwater in Minecraft and triggers a VTube Studio Hotkey through its public WebSocket API — handy for toggling a "wet" expression, model, or parameter on your Live2D avatar.
- Every client tick, the mod checks
player.isSubmergedInWater(). - On a dry -> wet transition it fires the configured enter water Hotkey.
- On a wet -> dry transition it fires the configured exit water Hotkey (optional — leave blank to only react to entering water).
- Communication with VTube Studio uses its built-in WebSocket API
(
ws://localhost:8001by default). No VTube Studio plugin install is needed; you just need to enable the API in VTube Studio → Settings → General → "Start API".
- Enable the API in VTube Studio (Settings → General → Start API).
- In VTube Studio, create two Hotkeys (Settings → Hotkeys) — e.g. one that triggers a "wet" expression/parameter and one that reverts it — and note their Hotkey IDs (visible in the hotkey list/export).
- Launch Minecraft once with this mod installed. It writes a config file to
config/vtsunderwater.jsonand requests an auth token from VTube Studio — approve the popup that appears in VTube Studio. - Edit
config/vtsunderwater.jsonand setenterWaterHotkeyId/exitWaterHotkeyIdto the IDs from step 2, then restart Minecraft (or rejoin a world).
| Key | Description |
|---|---|
enabled |
Master on/off switch for the mod. |
host / port |
VTube Studio API address (default localhost:8001). |
pluginName / pluginDeveloper |
Identity shown in the VTube Studio auth popup. |
authToken |
Auto-populated after you approve the plugin once; delete to re-auth. |
enterWaterHotkeyId |
Hotkey ID triggered when the player submerges. |
exitWaterHotkeyId |
Hotkey ID triggered when the player surfaces (optional). |
reconnectIntervalSeconds |
Delay between reconnect attempts while VTube Studio is unreachable. |
./gradlew build
The output jar is placed in build/libs/.
- Minecraft 26.2, Fabric Loader >= 0.19.5, Fabric API
- VTube Studio with the API enabled