fix: name collision
This commit is contained in:
parent
c207cdbfb4
commit
b56e37df86
3 changed files with 8 additions and 6 deletions
|
@ -25,6 +25,8 @@ import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
import co.fantabos.bscv.Module;
|
||||||
|
|
||||||
// The value here should match an entry in the META-INF/mods.toml file
|
// The value here should match an entry in the META-INF/mods.toml file
|
||||||
@Mod("bscv")
|
@Mod("bscv")
|
||||||
public class BoSCoVicino {
|
public class BoSCoVicino {
|
||||||
|
@ -33,7 +35,7 @@ public class BoSCoVicino {
|
||||||
|
|
||||||
public static Minecraft minecraft;
|
public static Minecraft minecraft;
|
||||||
|
|
||||||
public static List<co.fantabos.bscv.Mod> mods;
|
public static List<Module> mods;
|
||||||
|
|
||||||
public BoSCoVicino() {
|
public BoSCoVicino() {
|
||||||
// Register the setup method for modloading
|
// Register the setup method for modloading
|
||||||
|
@ -52,7 +54,7 @@ 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<co.fantabos.bscv.Mod>();
|
BoSCoVicino.mods = new ArrayList<Module>();
|
||||||
|
|
||||||
BoSCoVicino.mods.add(new Fullbright(builder));
|
BoSCoVicino.mods.add(new Fullbright(builder));
|
||||||
|
|
||||||
|
@ -90,7 +92,7 @@ public class BoSCoVicino {
|
||||||
|
|
||||||
@SubscribeEvent
|
@SubscribeEvent
|
||||||
public void onRegisterCommand(RegisterCommandsEvent event) {
|
public void onRegisterCommand(RegisterCommandsEvent event) {
|
||||||
for (co.fantabos.bscv.Mod mod : BoSCoVicino.mods) {
|
for (Module mod : BoSCoVicino.mods) {
|
||||||
mod.registerCommands(event.getDispatcher());
|
mod.registerCommands(event.getDispatcher());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,7 +6,7 @@ import net.minecraftforge.common.ForgeConfigSpec;
|
||||||
import net.minecraftforge.event.TickEvent;
|
import net.minecraftforge.event.TickEvent;
|
||||||
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
||||||
|
|
||||||
public class Fullbright extends Mod {
|
public class Fullbright extends Module {
|
||||||
|
|
||||||
private final ForgeConfigSpec.ConfigValue<String> mode;
|
private final ForgeConfigSpec.ConfigValue<String> mode;
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@ import net.minecraft.command.Commands;
|
||||||
import net.minecraftforge.common.ForgeConfigSpec;
|
import net.minecraftforge.common.ForgeConfigSpec;
|
||||||
import net.minecraftforge.common.MinecraftForge;
|
import net.minecraftforge.common.MinecraftForge;
|
||||||
|
|
||||||
public abstract class Mod {
|
public abstract class Module {
|
||||||
public enum Group {
|
public enum Group {
|
||||||
CORE,
|
CORE,
|
||||||
BUILD,
|
BUILD,
|
||||||
|
@ -20,7 +20,7 @@ public abstract class Mod {
|
||||||
public final Group group;
|
public final Group group;
|
||||||
public final ForgeConfigSpec.ConfigValue<Boolean> enabled;
|
public final ForgeConfigSpec.ConfigValue<Boolean> enabled;
|
||||||
|
|
||||||
protected Mod(String name, Group group, ForgeConfigSpec.Builder builder) {
|
protected Module(String name, Group group, ForgeConfigSpec.Builder builder) {
|
||||||
this.name = name;
|
this.name = name;
|
||||||
this.group = group;
|
this.group = group;
|
||||||
|
|
Loading…
Reference in a new issue