mirror of
https://github.com/GTNewHorizons/AE2FluidCraft-Rework.git
synced 2026-11-16 18:44:42 +00:00
config file
This commit is contained in:
1 parent
226e977e85
commit
18647ceb31
7 files changed
+60
-17
No files matched your search
@@ -0,0 +1,31 @@
|
||||
package com.glodblock.github.common;
|
||||
|
||||
import cpw.mods.fml.relauncher.FMLInjectionData;
|
||||
import net.minecraftforge.common.config.Configuration;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
public class Config {
|
||||
|
||||
private static final Configuration Config = new Configuration(new File(new File((File) FMLInjectionData.data()[6], "config"), "ae2fc.cfg"));
|
||||
|
||||
public static boolean fluidCells;
|
||||
public static boolean noFluidPacket;
|
||||
|
||||
public static void run() {
|
||||
loadCategory();
|
||||
loadProperty();
|
||||
}
|
||||
|
||||
private static void loadProperty() {
|
||||
fluidCells = Config.getBoolean("Enable Fluid Storage Cell", "Fluid Craft for AE2", true, "Enable this to generate the fluid storage cells. If you are playing with EC2, you can turn it off.");
|
||||
noFluidPacket = Config.getBoolean("No Fluid Packet", "Fluid Craft for AE2", false, "Enable this to make normal ME Interface can emit fluid with fluid pattern, like the Fluid Interface.");
|
||||
|
||||
if (Config.hasChanged())
|
||||
Config.save();
|
||||
}
|
||||
|
||||
private static void loadCategory() {
|
||||
Config.addCustomCategoryComment("Fluid Craft for AE2", "Settings for AE2FC.");
|
||||
}
|
||||
}
|
||||
@@ -18,6 +18,7 @@ import appeng.items.contents.CellUpgrades;
|
||||
import appeng.util.InventoryAdaptor;
|
||||
import appeng.util.Platform;
|
||||
import com.glodblock.github.FluidCraft;
|
||||
import com.glodblock.github.common.Config;
|
||||
import com.glodblock.github.common.storage.CellType;
|
||||
import com.glodblock.github.common.storage.IFluidCellInventory;
|
||||
import com.glodblock.github.common.storage.IFluidCellInventoryHandler;
|
||||
@@ -323,6 +324,7 @@ public class ItemBasicFluidStorageCell extends AEBaseItem implements IStorageFlu
|
||||
}
|
||||
|
||||
public ItemBasicFluidStorageCell register() {
|
||||
if (!Config.fluidCells) return null;
|
||||
GameRegistry.registerItem(this, NameConst.ITEM_FLUID_STORAGE + this.totalBytes / 1024 , FluidCraft.MODID);
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.glodblock.github.common.item;
|
||||
|
||||
import com.glodblock.github.FluidCraft;
|
||||
import com.glodblock.github.common.Config;
|
||||
import com.glodblock.github.util.NameConst;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
@@ -57,6 +58,7 @@ public class ItemBasicFluidStoragePart extends Item {
|
||||
}
|
||||
|
||||
public ItemBasicFluidStoragePart register() {
|
||||
if (!Config.fluidCells) return null;
|
||||
GameRegistry.registerItem(this, NameConst.ITEM_FLUID_PART, FluidCraft.MODID);
|
||||
return this;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user