mirror of
https://github.com/GTNewHorizons/Binnie.git
synced 2026-11-22 13:09:47 +00:00
Remove module configs
We don't support disabling parts
This commit is contained in:
1 parent
0f2e6bd76e
commit
56c2e72748
26 files changed
+52
-168
No files matched your search
@@ -30,7 +30,7 @@ public abstract class AbstractMod implements IPacketProvider, IInitializable {
|
||||
MinecraftForge.EVENT_BUS.register(this);
|
||||
}
|
||||
|
||||
public abstract boolean isActive();
|
||||
public boolean isActive() { return true; }
|
||||
|
||||
@Override
|
||||
public abstract String getChannel();
|
||||
|
||||
@@ -3,7 +3,6 @@ package binnie.core;
|
||||
import binnie.Binnie;
|
||||
import binnie.core.block.MultipassBlockRenderer;
|
||||
import binnie.core.block.TileEntityMetadata;
|
||||
import binnie.core.config.ModsConfig;
|
||||
import binnie.core.craftgui.minecraft.ModuleCraftGUI;
|
||||
import binnie.core.gui.BinnieCoreGUI;
|
||||
import binnie.core.gui.BinnieGUIHandler;
|
||||
@@ -134,20 +133,12 @@ public class BinnieCore extends AbstractMod {
|
||||
return PluginManager.Module.ARBORICULTURE.isEnabled();
|
||||
}
|
||||
|
||||
public static boolean isBotanyActive() {
|
||||
return ModsConfig.botany;
|
||||
}
|
||||
|
||||
public static boolean isGeneticsActive() {
|
||||
return ModsConfig.genetics;
|
||||
}
|
||||
|
||||
public static boolean isExtraBeesActive() {
|
||||
return ModsConfig.extraBees && isApicultureActive();
|
||||
return isApicultureActive();
|
||||
}
|
||||
|
||||
public static boolean isExtraTreesActive() {
|
||||
return ModsConfig.extraTrees && isArboricultureActive();
|
||||
return isArboricultureActive();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
package binnie.core.config;
|
||||
|
||||
import static binnie.core.BinnieCore.CORE_MODID;
|
||||
|
||||
import com.gtnewhorizon.gtnhlib.config.Config;
|
||||
|
||||
@Config(modid = CORE_MODID)
|
||||
public class ModsConfig {
|
||||
|
||||
@Config.Comment("Enables the Extra Bees Mod.")
|
||||
@Config.DefaultBoolean(true)
|
||||
@Config.RequiresMcRestart
|
||||
public static boolean extraBees;
|
||||
|
||||
@Config.Comment("Enables the Extra Trees Mod.")
|
||||
@Config.DefaultBoolean(true)
|
||||
@Config.RequiresMcRestart
|
||||
public static boolean extraTrees;
|
||||
|
||||
@Config.Comment("Enables the Botany Mod.")
|
||||
@Config.DefaultBoolean(true)
|
||||
@Config.RequiresMcRestart
|
||||
public static boolean botany;
|
||||
|
||||
@Config.Comment("Enables the Genetics Mod.")
|
||||
@Config.DefaultBoolean(true)
|
||||
@Config.RequiresMcRestart
|
||||
public static boolean genetics;
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
package binnie.core.config;
|
||||
|
||||
import static binnie.core.BinnieCore.CORE_MODID;
|
||||
import static binnie.core.BinnieCore.CORE_MOD_NAME;
|
||||
|
||||
import com.gtnewhorizon.gtnhlib.config.ConfigException;
|
||||
import com.gtnewhorizon.gtnhlib.config.SimpleGuiConfig;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
|
||||
public class ModsConfigGUI extends SimpleGuiConfig {
|
||||
public ModsConfigGUI(GuiScreen parent) throws ConfigException {
|
||||
super(parent, ModsConfig.class, CORE_MODID, CORE_MOD_NAME);
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
package binnie.core.config;
|
||||
|
||||
import com.gtnewhorizon.gtnhlib.config.SimpleGuiFactory;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
|
||||
public class ModsConfigGUIFactory implements SimpleGuiFactory {
|
||||
@Override
|
||||
public Class<? extends GuiScreen> mainConfigGuiClass() {
|
||||
return ModsConfigGUI.class;
|
||||
}
|
||||
}
|
||||
@@ -58,9 +58,8 @@ public class ManagerGenetics extends ManagerBase {
|
||||
if (BinnieCore.isLepidopteryActive()) {
|
||||
mothBreedingSystem = new MothBreedingSystem();
|
||||
}
|
||||
if (BinnieCore.isBotanyActive()) {
|
||||
flowerBreedingSystem = new FlowerBreedingSystem();
|
||||
}
|
||||
|
||||
flowerBreedingSystem = new FlowerBreedingSystem();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -51,7 +51,7 @@ public class ModuleItems implements IInitializable {
|
||||
|
||||
@SubscribeEvent
|
||||
public void onUseFieldKit(PlayerInteractEvent event) {
|
||||
if (!BinnieCore.isBotanyActive() || event.action != PlayerInteractEvent.Action.RIGHT_CLICK_BLOCK) {
|
||||
if (event.action != PlayerInteractEvent.Action.RIGHT_CLICK_BLOCK) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -5,6 +5,4 @@ import binnie.core.network.IOrdinaled;
|
||||
public interface IMachineType extends IOrdinaled {
|
||||
|
||||
Class<? extends MachinePackage> getPackageClass();
|
||||
|
||||
boolean isActive();
|
||||
}
|
||||
@@ -31,14 +31,14 @@ public class MachineGroup {
|
||||
this.blockName = blockName;
|
||||
|
||||
for (IMachineType type : types) {
|
||||
if (type.getPackageClass() != null && type.isActive()) {
|
||||
if (type.getPackageClass() != null) {
|
||||
try {
|
||||
MachinePackage pack = type.getPackageClass().newInstance();
|
||||
pack.assignMetadata(type.ordinal());
|
||||
pack.setActive(type.isActive());
|
||||
pack.setActive(true);
|
||||
addPackage(pack);
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException("Failed to create machine package " + type.toString(), e);
|
||||
throw new RuntimeException("Failed to create machine package " + type, e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,11 +32,6 @@ enum Compartment implements IMachineType {
|
||||
return clss;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isActive() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public ItemStack get(int i) {
|
||||
return new ItemStack(BinnieCore.packageCompartment.getBlock(), i, ordinal());
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user