VR Jester API

VR Jester API

Virtual Reality Gesture Recognition API for Vivecraft and QuestCraft

by
16.5K Downloads
fabricforgequiltgame-mechanicslibraryutility
Rent Server with this Mod

About this Mod

Virtual Reality Gesture Recognition API for Minecraft VR

Play Vivecraft or QuestCraft? Love mods? Ever wish mods were more VR compatible? Wait no further. This is a solution for devs and players alike!

This API enables Minecraft mod developers to easily implement support for their mod to be more VR compatible. Create any custom gestures that map to any key binds and trigger events. No longer do you need to map controller keybindings to keyboard keys. With this API, your body is the controller.

Demos:

Installation:

  1. Install required dependency mods. Note that Questbind is only required for QuestCraft usage.
  2. Download the VR Jester API mod & place it in the mods folder.
  3. Run Minecraft. Necessary config files will generate on initialization.

Usage:

  1. While in Minecraft VR, bind one of your controller buttons to the "Gesture Listener Trigger". I recommend a grip button. For Vivecraft you must do this through Steam VR's controller bindings menu. For QuestCraft you do this through QuestBind.
  2. These are 2 ways to create gestures:
    • Using the /gesture command
    • Modifying the config/gesture_store.json directly where gestures are stored.
      Sample gesture store:
    "GESTURE 1": {
       "RIGHT_CONTROLLER|LEFT_CONTROLLER": [
         {
           "vrDevice": "RIGHT_CONTROLLER|LEFT_CONTROLLER",
           "movement": "forward",
           "elapsedTime": 0,
           "speed": 0.0,
           "direction": {
             "x": 0.0,
             "y": 0.0,
             "z": 0.0
           },
           "devicesInProximity": {}
         }
       ]
     },
     ...
    
  3. Once your gestures are created, you can map them to key binds in config/VRJesterAPI.cfg by creating key value objects under the field "GESTURE_KEY_MAPPINGS". You can find the key bind names in .minecraft/options.txt. (Note: The actual KeyMapping string of an individual key bind in that file is in between the key_ and colon. i.e.: key_key.inventory:18) The "KEY_ACTION" field determines whether the recognized gesture triggers a single click key press or a hold down key press. A hold is triggered when you keep your gesture in place after it's recognized.
"GESTURE_KEY_MAPPINGS": {
   "GESTURE 1": {
      "KEY_MAPPING": "examplemod.key.ability_1",
      "KEY_ACTION": "click"
   },
   "GESTURE 2": {
      "KEY_MAPPING": "key.hotbar.2,key.sneak",
      "KEY_ACTION": "hold"
   },
   "GESTURE 3": {
      "KEY_MAPPING": "key.keyboard.j",
      "KEY_ACTION": "click"
   }
}

Download: modrinth curseforge

Info:

  • Consider each object within the square brackets [ ] a mere piece of the gesture. You can add multiple of these GestureComponent objects. This API recognizes gestures as complex as you want! Just know the more conplex, the more difficult it is to perform a gesture correctly to match your stored gesture.
  • Different values for "movement" are forward, back, left, right, up, down. The movement direction is relative to your facing direction at the moment you click the Jester Trigger which initiates the gesture listener. Simple example is punching in the same direction you're facing would be recognized as "forward".
  • Different values for "vrDevice" are RIGHT_CONTROLLER, LEFT_CONTROLLER, HEAD_MOUNTED_DISPLAY and if you want a gesture recognized on multiple VR devices you can incorporate a 'logical or' using a pipe | like so RIGHT_CONTROLLER|LEFT_CONTROLLER|HEAD_MOUNTED_DISPLAY
  • The "elapsedTime" is in milliseconds. So putting a value of 2000 would mean that part of the gesture lasts 2 seconds. This would be good for a charge up sort of move.
  • The "speed" field is a float value representing the velocity of that GestureComponent. A decent threshold to recognize the speed of a punch would be 1500.0-2000.0 and feel free to play around with the values as much as you want.
  • The "direction" field takes x,y,z float values that create a 3D normalized vector. Example usage of this would be having {0.0, 1.0, 0.0} to recognize when the player's brick hand is facing upwards. There's a certain threshold so it doesn't have to be exact.
  • Finally there's "devicesInProximity" which is formatted like so:
    "devicesInProximity": {
        "LEFT_CONTROLLER": 20
    }
    
    What this example means is that the vrDevice of this GestureComponent has to be within proximity of the left controller for 20 ticks.
  • Subscribe to the event bus to handle events triggered by a recognized gesture (Forge) or register to the event callback interface (Fabric).

Forge:

@SubscribeEvent
public void onGestureEvent(GestureEvent event) {
    // gesture handler code here -> event.getGestureName()
}

Fabric:

public static void init() {
    GestureEventCallback.EVENT.register((gestureEvent) -> {
        // gesture handler code here -> gestureEvent.getGestureName()
    });
}

Planned:

In the future I'll add continous gesture recognition, more configuration options, and optimizations.

Update 3/27/2025 - I know I haven't updated in a while, but I fully intend to come back to this mod. I've been working on other projects. Apologies for the inconvenience.

Available Versions

1.1.2 [FORGE 1.16.5]release
MC 1.16.5forge
December 24, 2023
1.1.1 [FORGE 1.20.2]release
MC 1.20.2forge
December 20, 2023
1.1.1 [FABRIC 1.20.2]release
MC 1.20.2fabric, quilt
December 20, 2023
1.1.1 [FORGE 1.20.1]release
MC 1.20.1forge
December 20, 2023
1.1.1 [FABRIC 1.20.1]release
MC 1.20.1fabric, quilt
December 20, 2023

How to Install VR Jester API on Your Server

1

Order Server

Order a Minecraft Java server with at least 3 GB RAM (4 GB recommended).

2

Set fabric Loader

In the panel under "Egg", select the fabric loader and matching Minecraft version (1.20.2).

3

Install Mod

Open the mod browser in the dashboard and search for "VR Jester API". Click "Install" – done! Alternatively, upload the .jar via SFTP to the /mods folder.

Compatibility

Mod Loaders

fabricforgequilt

Minecraft Versions

1.20.2, 1.20.1, 1.19.4 (+4 more)

Server-side

Unsupported

Recommended RAM

4 GB(min. 3 GB)

Frequently Asked Questions

VR Jester API server crashes on startup – what to do?

Most common cause: wrong fabric version or insufficient RAM. Check the server log (latest.log) for "OutOfMemoryError" or "Mixin" errors. With Mado Hosting: ensure at least 3 GB RAM is allocated and the loader matches the mod version (1.20.2). You can switch loaders with one click in the panel.

Is VR Jester API compatible with fabric and forge and quilt?

VR Jester API officially supports fabric, forge, quilt for Minecraft 1.20.2, 1.20.1, 1.19.4. Note: Forge and Fabric mods are NOT cross-compatible – pick one loader and stick with it. The Mado dashboard automatically detects incompatible loader combinations.

Server lagging with VR Jester API – how to optimize performance?

Recommended RAM: 4 GB (per 8 players). Use /spark profiler to check if VR Jester API consumes the most tick time. Common fixes: reduce server view-distance to 8-10, install "performant" or "starlight" as supplementary mods on Forge. With Mado Hosting, your server runs on NVMe SSDs with dedicated CPU cores for minimal latency.

Rent Modded Server

Install VR Jester API with just one click on your server.

Recommended RAM
4 GBab €8/mo
Min. 3 GB | +1 GB pro 8 Spieler
Create Server Now
1-Click Mod Install
NVMe SSD Storage
DDoS Protection included

Details

License
MIT License
Server-side
Unsupported

Supported Versions

1.20.21.20.11.19.41.19.31.19.21.18.21.16.5