fix: name clash! how fun

This commit is contained in:
dev@ftbsc 2023-01-26 22:39:11 +01:00
parent ced8ae36ee
commit c207cdbfb4
2 changed files with 5 additions and 5 deletions

View file

@ -33,7 +33,7 @@ public class BoSCoVicino {
public static Minecraft minecraft; public static Minecraft minecraft;
public static List<Mod> mods; public static List<co.fantabos.bscv.Mod> mods;
public BoSCoVicino() { public BoSCoVicino() {
// Register the setup method for modloading // Register the setup method for modloading
@ -52,9 +52,9 @@ public class BoSCoVicino {
ForgeConfigSpec.Builder builder = new ForgeConfigSpec.Builder(); ForgeConfigSpec.Builder builder = new ForgeConfigSpec.Builder();
// load and register mods // load and register mods
BoSCoVicino.mods = new ArrayList<Mod>(); BoSCoVicino.mods = new ArrayList<co.fantabos.bscv.Mod>();
BoSCoVicino.mods.add((Mod) new Fullbright(builder)); BoSCoVicino.mods.add(new Fullbright(builder));
ForgeConfigSpec spec = builder.build(); ForgeConfigSpec spec = builder.build();
@ -90,7 +90,7 @@ public class BoSCoVicino {
@SubscribeEvent @SubscribeEvent
public void onRegisterCommand(RegisterCommandsEvent event) { public void onRegisterCommand(RegisterCommandsEvent event) {
for (Mod mod : BoSCoVicino.mods) { for (co.fantabos.bscv.Mod mod : BoSCoVicino.mods) {
mod.registerCommands(event.getDispatcher()); mod.registerCommands(event.getDispatcher());
} }
} }

View file

@ -30,7 +30,7 @@ public abstract class Mod {
.define("enabled", false); .define("enabled", false);
} }
protected void registerCommand(CommandDispatcher<CommandSource> dispatcher) { public void registerCommands(CommandDispatcher<CommandSource> dispatcher) {
dispatcher.register( dispatcher.register(
Commands.literal(this.name.toLowerCase()) Commands.literal(this.name.toLowerCase())
.then( .then(