Files
WeatherChanger/common/src/main/java/me/lucaslah/weatherchanger/keybinding/Key.java
Lucas Petrino 4eaf638e42 Start on NEXT (version 1.0) branch
- 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>
2024-01-14 19:20:34 +13:00

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();
}