Added forge support + update architectury loom

This commit is contained in:
2024-01-19 12:17:31 +13:00
parent 7eab9daf0b
commit aa744b1362
14 changed files with 173 additions and 70 deletions

View File

@@ -1,4 +1,28 @@
package me.lucaslah.weatherchanger.command;
import net.minecraft.util.Identifier;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
public class CommandManager {
private final HashMap<Identifier, Command> entries = new HashMap<>();
public CommandManager add(Command entry) {
entries.put(entry.getId(), entry);
return this;
}
public Command get(Identifier identifier) {
return entries.get(identifier);
}
public List<Command> getEntries() {
if (!entries.isEmpty()) {
return new ArrayList<>(entries.values());
}
return new ArrayList<>();
}
}