Pack Making JSON Custom Keybinds - DonBruce64/MinecraftTransportSimulator GitHub Wiki

Custom keybinds are a great way to get vehicles and entities to do custom things. A max of 4 different keys are usable, with a vehicle referencing all of them when parts are present. This means it is quite possible for parts to share keybind slots if you are not careful about what goes to what. The static-slotting is required, however, to not change keybinds to the players. If it was first-come-first-serve, the keybinds would change based on part installation order and could be different for different vehicles depending on assembly order. Keybinds consist of the following:

  • name - The name of this keybind. Will be displayed on the overlay and will be grouped together with same-named keybinds.
  • keyIndex - The index of the key to use. This determines which bound key should be attached to this binding.
  • action - The action to perform when this keybind is pressed.