Class ConflictSafeKeyMapping

java.lang.Object
net.minecraft.client.KeyMapping
net.createmod.catnip.client.ConflictSafeKeyMapping
All Implemented Interfaces:
Comparable<net.minecraft.client.KeyMapping>

public class ConflictSafeKeyMapping extends net.minecraft.client.KeyMapping
Marker class for a KeyMapping that is not registered to KeyMapping.MAP on Fabric. On Forge, this is no difference between an instance of this class and a normal KeyMapping.

Normal keybind features such as isDown and consumeClick will be unreliable. Instead, use isKeyPressed.

This is done to avoid conflicting with vanilla keybinds. Forge handles that case fine already.

This workaround will be fully obsolete on 1.21.9 or newer.

  • Field Summary

    Fields inherited from class net.minecraft.client.KeyMapping

    CATEGORY_CREATIVE, CATEGORY_GAMEPLAY, CATEGORY_INTERFACE, CATEGORY_INVENTORY, CATEGORY_MISC, CATEGORY_MOVEMENT, CATEGORY_MULTIPLAYER
  • Constructor Summary

    Constructors
    Constructor
    Description
    ConflictSafeKeyMapping(String description, int defaultKey, String category)
     
    ConflictSafeKeyMapping(String description, com.mojang.blaze3d.platform.InputConstants.Type type, int defaultKey, String category)
     
  • Method Summary

    Methods inherited from class net.minecraft.client.KeyMapping

    click, compareTo, consumeClick, createNameSupplier, getCategory, getDefaultKey, getName, getTranslatedKeyMessage, isDefault, isDown, isUnbound, matches, matchesMouse, releaseAll, resetMapping, resetToggleKeys, same, saveString, set, setAll, setDown, setKey

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ConflictSafeKeyMapping

      public ConflictSafeKeyMapping(String description, int defaultKey, String category)
    • ConflictSafeKeyMapping

      public ConflictSafeKeyMapping(String description, com.mojang.blaze3d.platform.InputConstants.Type type, int defaultKey, String category)