package pm.j4.petroleum.util.module.option; import net.minecraft.client.options.KeyBinding; import pm.j4.petroleum.util.module.StringWritable; /** * The type Keybind value. */ public class KeybindValue extends StringWritable { /** * Instantiates a new Keybind value. * * @param translationKey the translation key * @param code the code * @param category the category */ public KeybindValue(String translationKey, int code, String category) { this.value = new KeyBinding(translationKey, code, category); } /** * Instantiates a new Keybind value. * * @param binding the binding */ public KeybindValue(KeyBinding binding) { this.value = binding; } @Override public String getType() { return "KB"; } @Override public String getStringValue() { return this.value.getDefaultKey().getLocalizedText().getString(); } }