Condensed code
Including world generation
This commit is contained in:
parent
693e7804b4
commit
590c74a5fc
25 changed files with 258 additions and 548 deletions
|
|
@ -2,64 +2,58 @@ package mysticores.util;
|
|||
|
||||
import java.io.File;
|
||||
|
||||
import mysticores.lib.BlockID;
|
||||
import mysticores.blocks.BlockHandler;
|
||||
import mysticores.lib.ItemID;
|
||||
import mysticores.lib.Rarity;
|
||||
import net.minecraftforge.common.Configuration;
|
||||
|
||||
public class ConfigurationManager {
|
||||
public static Configuration config;
|
||||
|
||||
public static void initialize(File file) {
|
||||
config = new Configuration(file);
|
||||
ItemID.RESOURCES = config.getItem("Resource Items", ItemID.RESOURCES_DEFAULT).getInt();
|
||||
ItemID.VERDITESWORD = config.getItem("Tools", "Verdite Sword", ItemID.VERDITESWORD_DEFAULT).getInt();
|
||||
ItemID.VERDITEPICKAXE = config.getItem("Tools", "Verdite Pickaxe", ItemID.VERDITEPICKAXE_DEFAULT).getInt();
|
||||
ItemID.VERDITESHOVEL = config.getItem("Tools", "Verdite Shovel", ItemID.VERDITESHOVEL_DEFAULT).getInt();
|
||||
ItemID.VERDITEAXE = config.getItem("Tools", "Verdite Axe", ItemID.VERDITEAXE_DEFAULT).getInt();
|
||||
ItemID.VERDITEHOE = config.getItem("Tools", "Verdite Hoe", ItemID.VERDITEHOE_DEFAULT).getInt();
|
||||
ItemID.MITHRILSWORD = config.getItem("Tools", "Mithril Sword", ItemID.MITHRILSWORD_DEFAULT).getInt();
|
||||
ItemID.MITHRILPICKAXE = config.getItem("Tools", "Mithril Pickaxe", ItemID.MITHRILPICKAXE_DEFAULT).getInt();
|
||||
ItemID.MITHRILSHOVEL = config.getItem("Tools", "Mithril Shovel", ItemID.MITHRILSHOVEL_DEFAULT).getInt();
|
||||
ItemID.MITHRILAXE = config.getItem("Tools", "Mithril Axe", ItemID.MITHRILAXE_DEFAULT).getInt();
|
||||
ItemID.MITHRILHOE = config.getItem("Tools", "Mithril Hoe", ItemID.MITHRILHOE_DEFAULT).getInt();
|
||||
ItemID.ADAMANTINESWORD = config.getItem("Tools", "Adamantine Sword", ItemID.ADAMANTINESWORD_DEFAULT).getInt();
|
||||
ItemID.ADAMANTINEPICKAXE = config.getItem("Tools", "Adamantine Pickaxe", ItemID.ADAMANTINEPICKAXE_DEFAULT).getInt();
|
||||
ItemID.ADAMANTINESHOVEL = config.getItem("Tools", "Adamantine Shovel", ItemID.ADAMANTINESHOVEL_DEFAULT).getInt();
|
||||
ItemID.ADAMANTINEAXE = config.getItem("Tools", "Adamantine Axe", ItemID.ADAMANTINEAXE_DEFAULT).getInt();
|
||||
ItemID.ADAMANTINEHOE = config.getItem("Tools", "Adamantine Hoe", ItemID.ADAMANTINEHOE_DEFAULT).getInt();
|
||||
ItemID.IRIDIUMSWORD = config.getItem("Tools", "Iridium Sword", ItemID.IRIDIUMSWORD_DEFAULT).getInt();
|
||||
ItemID.IRIDIUMPICKAXE = config.getItem("Tools", "Iridium Pickaxe", ItemID.IRIDIUMPICKAXE_DEFAULT).getInt();
|
||||
ItemID.IRIDIUMSHOVEL = config.getItem("Tools", "Iridium Shovel", ItemID.IRIDIUMSHOVEL_DEFAULT).getInt();
|
||||
ItemID.IRIDIUMAXE = config.getItem("Tools", "Iridium Axe", ItemID.IRIDIUMAXE_DEFAULT).getInt();
|
||||
ItemID.IRIDIUMHOE = config.getItem("Tools", "Iridium Hoe", ItemID.IRIDIUMHOE_DEFAULT).getInt();
|
||||
ItemID.BLOODSTONESWORD = config.getItem("Tools", "Bloodstone Sword", ItemID.BLOODSTONESWORD_DEFAULT).getInt();
|
||||
ItemID.BLOODSTONEPICKAXE = config.getItem("Tools", "Bloodstone Pickaxe", ItemID.BLOODSTONEPICKAXE_DEFAULT).getInt();
|
||||
ItemID.BLOODSTONESHOVEL = config.getItem("Tools", "Bloodstone Shovel", ItemID.BLOODSTONESHOVEL_DEFAULT).getInt();
|
||||
ItemID.BLOODSTONEAXE = config.getItem("Tools", "Bloodstone Axe", ItemID.BLOODSTONEAXE_DEFAULT).getInt();
|
||||
ItemID.BLOODSTONEHOE = config.getItem("Tools", "Bloodstone Hoe", ItemID.BLOODSTONEHOE_DEFAULT).getInt();
|
||||
ItemID.OBSIDIANSWORD = config.getItem("Tools", "Obsidian Sword", ItemID.OBSIDIANSWORD_DEFAULT).getInt();
|
||||
ItemID.OBSIDIANPICKAXE = config.getItem("Tools", "Obsidian Pickaxe", ItemID.OBSIDIANPICKAXE_DEFAULT).getInt();
|
||||
ItemID.OBSIDIANSHOVEL = config.getItem("Tools", "Obsidian Shovel", ItemID.OBSIDIANSHOVEL_DEFAULT).getInt();
|
||||
ItemID.OBSIDIANAXE = config.getItem("Tools", "Obsidian Axe", ItemID.OBSIDIANAXE_DEFAULT).getInt();
|
||||
ItemID.OBSIDIANHOE = config.getItem("Tools", "Obsidian Hoe", ItemID.OBSIDIANHOE_DEFAULT).getInt();
|
||||
ItemID.SATCHEL = config.getItem("Satchel ID", ItemID.SATCHEL_DEFAULT).getInt();
|
||||
BlockID.BASEID = config.getBlock("Base Block ID", BlockID.BASEID_DEFAULT).getInt();
|
||||
Rarity.VERDITE = config.get("Ore Rarity", "Verdite Ore", Rarity.VERDITE_DEFAULT).getInt();
|
||||
Rarity.MITHRIL = config.get("Ore Rarity", "Mithril Ore", Rarity.MITHRIL_DEFAULT).getInt();
|
||||
Rarity.ADAMANTINE = config.get("Ore Rarity", "Adamantine Ore", Rarity.ADAMANTINE_DEFAULT).getInt();
|
||||
Rarity.IRIDIUM = config.get("Ore Rarity", "Iridium Ore", Rarity.IRIDIUM_DEFAULT).getInt();
|
||||
Rarity.AGATE = config.get("Ore Rarity", "Agate Ore", Rarity.AGATE_DEFAULT).getInt();
|
||||
Rarity.AMETHYST = config.get("Ore Rarity", "Amethyst Ore", Rarity.AMETHYST_DEFAULT).getInt();
|
||||
Rarity.TOPAZ = config.get("Ore Rarity", "Topaz Ore", Rarity.TOPAZ_DEFAULT).getInt();
|
||||
Rarity.BLOODSTONE = config.get("Nether Ore Rarity", "Bloodstone", Rarity.BLOODSTONE_DEFAULT).getInt();
|
||||
Rarity.REDSOULSTONE = config.get("Nether Ore Rarity", "Red Soulstone", Rarity.REDSOULSTONE_DEFAULT).getInt();
|
||||
Rarity.BLACKSOULSTONE = config.get("Nether Ore Rarity", "Black Soulstone", Rarity.BLACKSOULSTONE_DEFAULT).getInt();
|
||||
Rarity.BLUESOULSTONE = config.get("Nether Ore Rarity", "Blue Soulstone", Rarity.BLUESOULSTONE_DEFAULT).getInt();
|
||||
config.save();
|
||||
}
|
||||
|
||||
public static void save() {
|
||||
Configuration config = new Configuration(file);
|
||||
ItemID.RESOURCES = config.getItem("Resource Items", ItemID.RESOURCES).getInt();
|
||||
ItemID.VERDITESWORD = config.getItem("Tools", "Verdite Sword", ItemID.VERDITESWORD).getInt();
|
||||
ItemID.VERDITEPICKAXE = config.getItem("Tools", "Verdite Pickaxe", ItemID.VERDITEPICKAXE).getInt();
|
||||
ItemID.VERDITESHOVEL = config.getItem("Tools", "Verdite Shovel", ItemID.VERDITESHOVEL).getInt();
|
||||
ItemID.VERDITEAXE = config.getItem("Tools", "Verdite Axe", ItemID.VERDITEAXE).getInt();
|
||||
ItemID.VERDITEHOE = config.getItem("Tools", "Verdite Hoe", ItemID.VERDITEHOE).getInt();
|
||||
ItemID.MITHRILSWORD = config.getItem("Tools", "Mithril Sword", ItemID.MITHRILSWORD).getInt();
|
||||
ItemID.MITHRILPICKAXE = config.getItem("Tools", "Mithril Pickaxe", ItemID.MITHRILPICKAXE).getInt();
|
||||
ItemID.MITHRILSHOVEL = config.getItem("Tools", "Mithril Shovel", ItemID.MITHRILSHOVEL).getInt();
|
||||
ItemID.MITHRILAXE = config.getItem("Tools", "Mithril Axe", ItemID.MITHRILAXE).getInt();
|
||||
ItemID.MITHRILHOE = config.getItem("Tools", "Mithril Hoe", ItemID.MITHRILHOE).getInt();
|
||||
ItemID.ADAMANTINESWORD = config.getItem("Tools", "Adamantine Sword", ItemID.ADAMANTINESWORD).getInt();
|
||||
ItemID.ADAMANTINEPICKAXE = config.getItem("Tools", "Adamantine Pickaxe", ItemID.ADAMANTINEPICKAXE).getInt();
|
||||
ItemID.ADAMANTINESHOVEL = config.getItem("Tools", "Adamantine Shovel", ItemID.ADAMANTINESHOVEL).getInt();
|
||||
ItemID.ADAMANTINEAXE = config.getItem("Tools", "Adamantine Axe", ItemID.ADAMANTINEAXE).getInt();
|
||||
ItemID.ADAMANTINEHOE = config.getItem("Tools", "Adamantine Hoe", ItemID.ADAMANTINEHOE).getInt();
|
||||
ItemID.IRIDIUMSWORD = config.getItem("Tools", "Iridium Sword", ItemID.IRIDIUMSWORD).getInt();
|
||||
ItemID.IRIDIUMPICKAXE = config.getItem("Tools", "Iridium Pickaxe", ItemID.IRIDIUMPICKAXE).getInt();
|
||||
ItemID.IRIDIUMSHOVEL = config.getItem("Tools", "Iridium Shovel", ItemID.IRIDIUMSHOVEL).getInt();
|
||||
ItemID.IRIDIUMAXE = config.getItem("Tools", "Iridium Axe", ItemID.IRIDIUMAXE).getInt();
|
||||
ItemID.IRIDIUMHOE = config.getItem("Tools", "Iridium Hoe", ItemID.IRIDIUMHOE).getInt();
|
||||
ItemID.BLOODSTONESWORD = config.getItem("Tools", "Bloodstone Sword", ItemID.BLOODSTONESWORD).getInt();
|
||||
ItemID.BLOODSTONEPICKAXE = config.getItem("Tools", "Bloodstone Pickaxe", ItemID.BLOODSTONEPICKAXE).getInt();
|
||||
ItemID.BLOODSTONESHOVEL = config.getItem("Tools", "Bloodstone Shovel", ItemID.BLOODSTONESHOVEL).getInt();
|
||||
ItemID.BLOODSTONEAXE = config.getItem("Tools", "Bloodstone Axe", ItemID.BLOODSTONEAXE).getInt();
|
||||
ItemID.BLOODSTONEHOE = config.getItem("Tools", "Bloodstone Hoe", ItemID.BLOODSTONEHOE).getInt();
|
||||
ItemID.OBSIDIANSWORD = config.getItem("Tools", "Obsidian Sword", ItemID.OBSIDIANSWORD).getInt();
|
||||
ItemID.OBSIDIANPICKAXE = config.getItem("Tools", "Obsidian Pickaxe", ItemID.OBSIDIANPICKAXE).getInt();
|
||||
ItemID.OBSIDIANSHOVEL = config.getItem("Tools", "Obsidian Shovel", ItemID.OBSIDIANSHOVEL).getInt();
|
||||
ItemID.OBSIDIANAXE = config.getItem("Tools", "Obsidian Axe", ItemID.OBSIDIANAXE).getInt();
|
||||
ItemID.OBSIDIANHOE = config.getItem("Tools", "Obsidian Hoe", ItemID.OBSIDIANHOE).getInt();
|
||||
ItemID.SATCHEL = config.getItem("Satchel ID", ItemID.SATCHEL).getInt();
|
||||
BlockHandler.BASEID = config.getBlock("Base Block ID", BlockHandler.BASEID).getInt();
|
||||
Rarity.VERDITE = config.get("Ore Rarity", "Verdite Ore", Rarity.VERDITE).getInt();
|
||||
Rarity.MITHRIL = config.get("Ore Rarity", "Mithril Ore", Rarity.MITHRIL).getInt();
|
||||
Rarity.ADAMANTINE = config.get("Ore Rarity", "Adamantine Ore", Rarity.ADAMANTINE).getInt();
|
||||
Rarity.IRIDIUM = config.get("Ore Rarity", "Iridium Ore", Rarity.IRIDIUM).getInt();
|
||||
Rarity.AGATE = config.get("Ore Rarity", "Agate Ore", Rarity.AGATE).getInt();
|
||||
Rarity.AMETHYST = config.get("Ore Rarity", "Amethyst Ore", Rarity.AMETHYST).getInt();
|
||||
Rarity.TOPAZ = config.get("Ore Rarity", "Topaz Ore", Rarity.TOPAZ).getInt();
|
||||
Rarity.BLOODSTONE = config.get("Nether Ore Rarity", "Bloodstone", Rarity.BLOODSTONE).getInt();
|
||||
Rarity.REDSOULSTONE = config.get("Nether Ore Rarity", "Red Soulstone", Rarity.REDSOULSTONE).getInt();
|
||||
Rarity.BLACKSOULSTONE = config.get("Nether Ore Rarity", "Black Soulstone", Rarity.BLACKSOULSTONE).getInt();
|
||||
Rarity.BLUESOULSTONE = config.get("Nether Ore Rarity", "Blue Soulstone", Rarity.BLUESOULSTONE).getInt();
|
||||
config.save();
|
||||
}
|
||||
}
|
||||
|
|
@ -26,7 +26,7 @@ public class Localizations {
|
|||
private Localizations() {
|
||||
}
|
||||
|
||||
public static void Initialize() {
|
||||
public static void initialize() {
|
||||
File source = Loader.instance().getReversedModObjectList().get(MysticOres.instance).getSource();
|
||||
Pattern pattern = Pattern.compile(".*(assets/" + "mysticmods/lang/(.+)\\.(.+))");
|
||||
for (String file : getResources(source, pattern)) {
|
||||
|
|
|
|||
|
|
@ -6,26 +6,17 @@ import net.minecraft.item.ItemStack;
|
|||
import net.minecraftforge.oredict.OreDictionary;
|
||||
|
||||
public class OreDictManager {
|
||||
public static void Initialize() {
|
||||
OreDictionary.registerOre("ingotAdamantine", new ItemStack(Items.Resource, 1, 2));
|
||||
OreDictionary.registerOre("ingotMithril", new ItemStack(Items.Resource, 1, 1));
|
||||
OreDictionary.registerOre("ingotVerdite", new ItemStack(Items.Resource, 1, 0));
|
||||
OreDictionary.registerOre("ingotIridium", new ItemStack(Items.Resource, 1, 3));
|
||||
OreDictionary.registerOre("fuelIridium", new ItemStack(Items.Resource, 1, 4));
|
||||
OreDictionary.registerOre("gemTourmaline", new ItemStack(Items.Resource, 1, 5));
|
||||
OreDictionary.registerOre("gemTopaz", new ItemStack(Items.Resource, 1, 7));
|
||||
OreDictionary.registerOre("gemAmethyst", new ItemStack(Items.Resource, 1, 8));
|
||||
OreDictionary.registerOre("gemAgate", new ItemStack(Items.Resource, 1, 6));
|
||||
OreDictionary.registerOre("oreAdamantine", new ItemStack(BlockHandler.BlockBase, 1, 0));
|
||||
OreDictionary.registerOre("oreAmethyst", new ItemStack(BlockHandler.BlockBase, 1, 1));
|
||||
OreDictionary.registerOre("oreIridium", new ItemStack(BlockHandler.BlockBase, 1, 2));
|
||||
OreDictionary.registerOre("oreMithril", new ItemStack(BlockHandler.BlockBase, 1, 3));
|
||||
OreDictionary.registerOre("oreSapphire", new ItemStack(BlockHandler.BlockBase, 1, 4));
|
||||
OreDictionary.registerOre("oreTopaz", new ItemStack(BlockHandler.BlockBase, 1, 5));
|
||||
OreDictionary.registerOre("oreVerdite", new ItemStack(BlockHandler.BlockBase, 1, 6));
|
||||
OreDictionary.registerOre("oreBloodstone", new ItemStack(BlockHandler.BlockBase, 1, 7));
|
||||
OreDictionary.registerOre("oreBlackSoulstone", new ItemStack(BlockHandler.BlockBase, 1, 8));
|
||||
OreDictionary.registerOre("oreBlueSoulstone", new ItemStack(BlockHandler.BlockBase, 1, 9));
|
||||
OreDictionary.registerOre("oreRedSoulstone", new ItemStack(BlockHandler.BlockBase, 1, 10));
|
||||
public static final String[] INGOTS = { "ingotVerdite", "ingotMithril", "ingotAdamantine", "ingotIridium", "fuelIridium", "gemTourmaline", "gemAgate", "gemTopaz", "gemAmethyst", "dustMystic",
|
||||
" shardBloodstone", "shardGlass", "shardObsidian", "rodObsidian" };
|
||||
public static final String[] ORES = { "oreAdamantine", "oreAmethyst", "oreIridium", "oreMithril", "oreSapphire", "oreTopaz", "oreVerdite", "oreBloodstone", "oreBlackSoulstone",
|
||||
"oreBlueSoulstone", "oreRedSoulstone", "oreAgate" };
|
||||
|
||||
public static void initialize() {
|
||||
for (int i = 0; i < INGOTS.length; i++) {
|
||||
OreDictionary.registerOre(INGOTS[i], new ItemStack(Items.Resource, 1, i));
|
||||
}
|
||||
for (int i = 0; i < ORES.length; i++) {
|
||||
OreDictionary.registerOre(ORES[i], new ItemStack(BlockHandler.BlockBase, 1, i));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,8 +5,8 @@ import net.minecraft.creativetab.CreativeTabs;
|
|||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class TabMysticOres extends CreativeTabs {
|
||||
public TabMysticOres(int par1, String par2Str) {
|
||||
super(par1, par2Str);
|
||||
public TabMysticOres(String par2Str) {
|
||||
super(par2Str);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
Loading…
Reference in a new issue