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 net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.common.config.Configuration;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
|
||||
public enum ChestChangerType {
|
||||
|
|
@ -56,7 +55,7 @@ public enum ChestChangerType {
|
|||
return this.target.ordinal();
|
||||
}
|
||||
|
||||
public ItemChestChanger buildItem(Configuration cfg)
|
||||
public ItemChestChanger buildItem()
|
||||
{
|
||||
item = new ItemChestChanger(this);
|
||||
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())
|
||||
{
|
||||
type.buildItem(cfg);
|
||||
type.buildItem();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -12,12 +12,7 @@ package cpw.mods.ironchest;
|
|||
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.common.config.Configuration;
|
||||
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.EventHandler;
|
||||
import cpw.mods.fml.common.Mod.Instance;
|
||||
|
|
@ -43,23 +38,7 @@ public class IronChest {
|
|||
{
|
||||
Version.init(event.getVersionProperties());
|
||||
event.getModMetadata().version = Version.fullVersionString();
|
||||
Configuration cfg = new Configuration(event.getSuggestedConfigurationFile());
|
||||
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();
|
||||
}
|
||||
ChestChangerType.buildItems();
|
||||
ironChestBlock = new BlockIronChest();
|
||||
GameRegistry.registerBlock(ironChestBlock, ItemIronChest.class, "BlockIronChest");
|
||||
PacketHandler.INSTANCE.ordinal();
|
||||
|
|
|
|||
Loading…
Reference in New Issue