mirror of
https://github.com/Lucaslah/WeatherChanger.git
synced 2026-01-21 05:17:51 +00:00
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>
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
package me.lucaslah.weatherchanger.keybinding;
|
||||
|
||||
import net.minecraft.util.Identifier;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
public abstract class KeybindingManager {
|
||||
private final HashMap<Identifier, Key> entries = new HashMap<>();
|
||||
|
||||
public KeybindingManager add(Key entry) {
|
||||
entries.put(entry.getId(), entry);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Key get(Identifier identifier) {
|
||||
return entries.get(identifier);
|
||||
}
|
||||
|
||||
public List<Key> getEntries() {
|
||||
if (!entries.isEmpty()) {
|
||||
return new ArrayList<>(entries.values());
|
||||
}
|
||||
|
||||
return new ArrayList<>();
|
||||
}
|
||||
|
||||
public abstract void registerKeys();
|
||||
}
|
||||
Reference in New Issue
Block a user