mirror of
https://github.com/Lucaslah/WeatherChanger.git
synced 2026-01-12 08:57:51 +00:00
- update gradle wrapper version (8.4 to 8.5) - update logo and add banner - change to gradle kotlin DSL (from groovy) - update README.md - update project layout for planned forge support - move common logic to common module - change environment to 'client' to prevent servers from loading the mod (#2) - cleanup unneeded files - update LICENSE.md to use Markdown format for easier reading - update version number to prepare for version 1.0 Signed-off-by: Lucas Petrino <nsx1lucas@gmail.com>
26 lines
913 B
Java
26 lines
913 B
Java
package me.lucaslah.weatherchanger.keybinding;
|
|
|
|
import net.minecraft.client.MinecraftClient;
|
|
import net.minecraft.client.option.KeyBinding;
|
|
import net.minecraft.client.util.InputUtil;
|
|
import net.minecraft.util.Identifier;
|
|
import org.jetbrains.annotations.NotNull;
|
|
|
|
public abstract class Key {
|
|
public KeyBinding keybind;
|
|
public MinecraftClient mc = MinecraftClient.getInstance();
|
|
|
|
public Key(@NotNull String name) {
|
|
keybind = new KeyBinding(this.getDisplayName(), this.getKeyType(), this.getKey(), this.getCategory());
|
|
}
|
|
|
|
public abstract void onPress(@NotNull MinecraftClient client);
|
|
public abstract Identifier getId();
|
|
public abstract KeyBinding getKeyBinding();
|
|
public abstract boolean isEnabled();
|
|
public abstract String getDisplayName();
|
|
public abstract InputUtil.Type getKeyType();
|
|
public abstract String getCategory();
|
|
public abstract int getKey();
|
|
}
|