Removed the extremely useless config file
This commit is contained in:
parent
b7d6edb3f8
commit
82ca2dccfd
|
|
@ -16,7 +16,6 @@ import static cpw.mods.ironchest.IronChestType.SILVER;
|
||||||
import static cpw.mods.ironchest.IronChestType.WOOD;
|
import static cpw.mods.ironchest.IronChestType.WOOD;
|
||||||
import net.minecraft.init.Blocks;
|
import net.minecraft.init.Blocks;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraftforge.common.config.Configuration;
|
|
||||||
import cpw.mods.fml.common.registry.GameRegistry;
|
import cpw.mods.fml.common.registry.GameRegistry;
|
||||||
|
|
||||||
public enum ChestChangerType {
|
public enum ChestChangerType {
|
||||||
|
|
@ -56,7 +55,7 @@ public enum ChestChangerType {
|
||||||
return this.target.ordinal();
|
return this.target.ordinal();
|
||||||
}
|
}
|
||||||
|
|
||||||
public ItemChestChanger buildItem(Configuration cfg)
|
public ItemChestChanger buildItem()
|
||||||
{
|
{
|
||||||
item = new ItemChestChanger(this);
|
item = new ItemChestChanger(this);
|
||||||
GameRegistry.registerItem(item, itemName);
|
GameRegistry.registerItem(item, itemName);
|
||||||
|
|
@ -76,11 +75,11 @@ public enum ChestChangerType {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void buildItems(Configuration cfg)
|
public static void buildItems()
|
||||||
{
|
{
|
||||||
for (ChestChangerType type : values())
|
for (ChestChangerType type : values())
|
||||||
{
|
{
|
||||||
type.buildItem(cfg);
|
type.buildItem();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -12,12 +12,7 @@ package cpw.mods.ironchest;
|
||||||
|
|
||||||
import net.minecraft.init.Blocks;
|
import net.minecraft.init.Blocks;
|
||||||
import net.minecraftforge.common.MinecraftForge;
|
import net.minecraftforge.common.MinecraftForge;
|
||||||
import net.minecraftforge.common.config.Configuration;
|
|
||||||
import net.minecraftforge.oredict.OreDictionary;
|
import net.minecraftforge.oredict.OreDictionary;
|
||||||
|
|
||||||
import org.apache.logging.log4j.Level;
|
|
||||||
|
|
||||||
import cpw.mods.fml.common.FMLLog;
|
|
||||||
import cpw.mods.fml.common.Mod;
|
import cpw.mods.fml.common.Mod;
|
||||||
import cpw.mods.fml.common.Mod.EventHandler;
|
import cpw.mods.fml.common.Mod.EventHandler;
|
||||||
import cpw.mods.fml.common.Mod.Instance;
|
import cpw.mods.fml.common.Mod.Instance;
|
||||||
|
|
@ -43,23 +38,7 @@ public class IronChest {
|
||||||
{
|
{
|
||||||
Version.init(event.getVersionProperties());
|
Version.init(event.getVersionProperties());
|
||||||
event.getModMetadata().version = Version.fullVersionString();
|
event.getModMetadata().version = Version.fullVersionString();
|
||||||
Configuration cfg = new Configuration(event.getSuggestedConfigurationFile());
|
ChestChangerType.buildItems();
|
||||||
try
|
|
||||||
{
|
|
||||||
cfg.load();
|
|
||||||
ChestChangerType.buildItems(cfg);
|
|
||||||
CACHE_RENDER = cfg.get(Configuration.CATEGORY_GENERAL, "cacheRenderingInformation", true).getBoolean(true);
|
|
||||||
OCELOTS_SITONCHESTS = cfg.get(Configuration.CATEGORY_GENERAL, "ocelotsSitOnChests", true).getBoolean(true);
|
|
||||||
}
|
|
||||||
catch (Exception e)
|
|
||||||
{
|
|
||||||
FMLLog.log(Level.ERROR, e, "IronChest has a problem loading its configuration");
|
|
||||||
}
|
|
||||||
finally
|
|
||||||
{
|
|
||||||
if (cfg.hasChanged())
|
|
||||||
cfg.save();
|
|
||||||
}
|
|
||||||
ironChestBlock = new BlockIronChest();
|
ironChestBlock = new BlockIronChest();
|
||||||
GameRegistry.registerBlock(ironChestBlock, ItemIronChest.class, "BlockIronChest");
|
GameRegistry.registerBlock(ironChestBlock, ItemIronChest.class, "BlockIronChest");
|
||||||
PacketHandler.INSTANCE.ordinal();
|
PacketHandler.INSTANCE.ordinal();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue