Rearranged ores generation-recipes-oredictionary
This commit is contained in:
parent
06f1cbcce9
commit
338d0c20e7
8 changed files with 145 additions and 171 deletions
|
|
@ -12,7 +12,6 @@ public class BlockHandler {
|
||||||
public static Block BlockBase;
|
public static Block BlockBase;
|
||||||
|
|
||||||
public static void initialize() {
|
public static void initialize() {
|
||||||
BlockBase = new BlockBase().setStepSound(Block.soundTypeStone);
|
BlockBase = GameRegistry.registerBlock(new BlockBase().setStepSound(Block.soundTypeStone), ItemBase.class, "Base Blocks", "mysticores", BLOCK_NAMES);
|
||||||
GameRegistry.registerBlock(BlockBase, ItemBase.class, "Base Blocks", "mysticores", BLOCK_NAMES);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,9 +5,8 @@ import cpw.mods.fml.relauncher.SideOnly;
|
||||||
import mysticores.blocks.BlockHandler;
|
import mysticores.blocks.BlockHandler;
|
||||||
import mysticores.items.Items;
|
import mysticores.items.Items;
|
||||||
import mysticores.util.ConfigurationManager;
|
import mysticores.util.ConfigurationManager;
|
||||||
import mysticores.util.OreDictManager;
|
|
||||||
import mysticores.util.RecipeManager;
|
import mysticores.util.RecipeManager;
|
||||||
import mysticores.worldgen.GeneratorManager;
|
import mysticores.worldgen.WorldGenOres;
|
||||||
import net.minecraft.creativetab.CreativeTabs;
|
import net.minecraft.creativetab.CreativeTabs;
|
||||||
import net.minecraft.item.Item;
|
import net.minecraft.item.Item;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
|
|
@ -17,6 +16,7 @@ import cpw.mods.fml.common.Mod.EventHandler;
|
||||||
import cpw.mods.fml.common.Mod.Instance;
|
import cpw.mods.fml.common.Mod.Instance;
|
||||||
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
|
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
|
||||||
import cpw.mods.fml.common.registry.GameRegistry;
|
import cpw.mods.fml.common.registry.GameRegistry;
|
||||||
|
import net.minecraftforge.oredict.OreDictionary;
|
||||||
|
|
||||||
@Mod(modid = "mysticores", name = "Mystic Ores", version = "0.1")
|
@Mod(modid = "mysticores", name = "Mystic Ores", version = "0.1")
|
||||||
public class MysticOres implements IFuelHandler {
|
public class MysticOres implements IFuelHandler {
|
||||||
|
|
@ -37,6 +37,10 @@ public class MysticOres implements IFuelHandler {
|
||||||
return 7;
|
return 7;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
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" };
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getBurnTime(ItemStack fuel) {
|
public int getBurnTime(ItemStack fuel) {
|
||||||
|
|
@ -52,9 +56,14 @@ public class MysticOres implements IFuelHandler {
|
||||||
if(ENABLE){
|
if(ENABLE){
|
||||||
BlockHandler.initialize();
|
BlockHandler.initialize();
|
||||||
Items.initialize();
|
Items.initialize();
|
||||||
OreDictManager.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));
|
||||||
|
}
|
||||||
RecipeManager.initialize();
|
RecipeManager.initialize();
|
||||||
GeneratorManager.initialize();
|
GameRegistry.registerWorldGenerator(new WorldGenOres(), 100);
|
||||||
GameRegistry.registerFuelHandler(this);
|
GameRegistry.registerFuelHandler(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,22 +0,0 @@
|
||||||
package mysticores.util;
|
|
||||||
|
|
||||||
import mysticores.blocks.BlockHandler;
|
|
||||||
import mysticores.items.Items;
|
|
||||||
import net.minecraft.item.ItemStack;
|
|
||||||
import net.minecraftforge.oredict.OreDictionary;
|
|
||||||
|
|
||||||
public class OreDictManager {
|
|
||||||
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));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
package mysticores.util;
|
package mysticores.util;
|
||||||
|
|
||||||
|
import mysticores.MysticOres;
|
||||||
import mysticores.blocks.BlockHandler;
|
import mysticores.blocks.BlockHandler;
|
||||||
import mysticores.items.Items;
|
import mysticores.items.Items;
|
||||||
import net.minecraft.init.Blocks;
|
import net.minecraft.init.Blocks;
|
||||||
|
|
@ -93,42 +94,42 @@ public class RecipeManager {
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void powderRecipes() {
|
private static void powderRecipes() {
|
||||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(Blocks.gold_ore, 2), OreDictManager.INGOTS[9], "oreGold"));
|
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(Blocks.gold_ore, 2), MysticOres.INGOTS[9], "oreGold"));
|
||||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(Blocks.iron_ore, 2), OreDictManager.INGOTS[9], "oreIron"));
|
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(Blocks.iron_ore, 2), MysticOres.INGOTS[9], "oreIron"));
|
||||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(Items.Resource, 2, 10), OreDictManager.INGOTS[9], OreDictManager.INGOTS[10]));
|
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(Items.Resource, 2, 10), MysticOres.INGOTS[9], MysticOres.INGOTS[10]));
|
||||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(net.minecraft.init.Items.gunpowder, 2), OreDictManager.INGOTS[9], net.minecraft.init.Items.gunpowder));
|
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(net.minecraft.init.Items.gunpowder, 2), MysticOres.INGOTS[9], net.minecraft.init.Items.gunpowder));
|
||||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(Items.Resource, 2, 4), OreDictManager.INGOTS[9], OreDictManager.INGOTS[4]));
|
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(Items.Resource, 2, 4), MysticOres.INGOTS[9], MysticOres.INGOTS[4]));
|
||||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(Blocks.coal_ore, 2), OreDictManager.INGOTS[9], "oreCoal"));
|
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(Blocks.coal_ore, 2), MysticOres.INGOTS[9], "oreCoal"));
|
||||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(Blocks.iron_ore, 3), OreDictManager.INGOTS[9], "oreIron"));
|
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(Blocks.iron_ore, 3), MysticOres.INGOTS[9], "oreIron"));
|
||||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(Blocks.gold_ore, 3), OreDictManager.INGOTS[9], "oreGold"));
|
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(Blocks.gold_ore, 3), MysticOres.INGOTS[9], "oreGold"));
|
||||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(Blocks.redstone_ore, 2), OreDictManager.INGOTS[9], "oreRedstone"));
|
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(Blocks.redstone_ore, 2), MysticOres.INGOTS[9], "oreRedstone"));
|
||||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(Blocks.lapis_ore, 2), OreDictManager.INGOTS[9], "oreLapis"));
|
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(Blocks.lapis_ore, 2), MysticOres.INGOTS[9], "oreLapis"));
|
||||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(Blocks.diamond_ore, 2), OreDictManager.INGOTS[9], "oreDiamond"));
|
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(Blocks.diamond_ore, 2), MysticOres.INGOTS[9], "oreDiamond"));
|
||||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(net.minecraft.init.Items.sugar, 18), OreDictManager.INGOTS[9], net.minecraft.init.Items.sugar));
|
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(net.minecraft.init.Items.sugar, 18), MysticOres.INGOTS[9], net.minecraft.init.Items.sugar));
|
||||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(net.minecraft.init.Items.redstone, 12), OreDictManager.INGOTS[9], net.minecraft.init.Items.redstone));
|
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(net.minecraft.init.Items.redstone, 12), MysticOres.INGOTS[9], net.minecraft.init.Items.redstone));
|
||||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(net.minecraft.init.Items.glowstone_dust, 6), OreDictManager.INGOTS[9], net.minecraft.init.Items.glowstone_dust));
|
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(net.minecraft.init.Items.glowstone_dust, 6), MysticOres.INGOTS[9], net.minecraft.init.Items.glowstone_dust));
|
||||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(net.minecraft.init.Items.gunpowder, 3), OreDictManager.INGOTS[9], net.minecraft.init.Items.gunpowder));
|
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(net.minecraft.init.Items.gunpowder, 3), MysticOres.INGOTS[9], net.minecraft.init.Items.gunpowder));
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void recipes() {
|
private static void recipes() {
|
||||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Blocks.glass, 1), "##", "##", '#', OreDictManager.INGOTS[11]));
|
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Blocks.glass, 1), "##", "##", '#', MysticOres.INGOTS[11]));
|
||||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Blocks.obsidian, 1), "##", "##", '#', OreDictManager.INGOTS[12]));
|
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Blocks.obsidian, 1), "##", "##", '#', MysticOres.INGOTS[12]));
|
||||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(BlockHandler.BlockBase, 8, 7), "XXX", "XOX", "XXX", 'X', Blocks.dirt, 'O',
|
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(BlockHandler.BlockBase, 8, 7), "XXX", "XOX", "XXX", 'X', Blocks.dirt, 'O',
|
||||||
OreDictManager.INGOTS[6]));
|
MysticOres.INGOTS[6]));
|
||||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(BlockHandler.BlockBase, 16, 7), "XXX", "XOX", "XXX", 'X', OreDictManager.ORES[3], 'O',
|
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(BlockHandler.BlockBase, 16, 7), "XXX", "XOX", "XXX", 'X', MysticOres.ORES[3], 'O',
|
||||||
OreDictManager.INGOTS[6]));
|
MysticOres.INGOTS[6]));
|
||||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(BlockHandler.BlockBase, 8, 3), "XXX", "XOX", "XXX", 'X', Blocks.dirt, 'O',
|
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(BlockHandler.BlockBase, 8, 3), "XXX", "XOX", "XXX", 'X', Blocks.dirt, 'O',
|
||||||
OreDictManager.INGOTS[8]));
|
MysticOres.INGOTS[8]));
|
||||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(BlockHandler.BlockBase, 8, 12), "###", "#D#", "###", '#', OreDictManager.INGOTS[11], 'D', OreDictManager.INGOTS[12]));
|
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(BlockHandler.BlockBase, 8, 12), "###", "#D#", "###", '#', MysticOres.INGOTS[11], 'D', MysticOres.INGOTS[12]));
|
||||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(BlockHandler.BlockBase, 1, 7), "##", "##", '#', OreDictManager.INGOTS[10]));
|
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(BlockHandler.BlockBase, 1, 7), "##", "##", '#', MysticOres.INGOTS[10]));
|
||||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(BlockHandler.BlockBase, 2, 7), OreDictManager.INGOTS[9], OreDictManager.ORES[7]));
|
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(BlockHandler.BlockBase, 2, 7), MysticOres.INGOTS[9], MysticOres.ORES[7]));
|
||||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(BlockHandler.BlockBase, 2, 3), OreDictManager.INGOTS[9], OreDictManager.ORES[3]));
|
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(BlockHandler.BlockBase, 2, 3), MysticOres.INGOTS[9], MysticOres.ORES[3]));
|
||||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(BlockHandler.BlockBase, 2, 0), OreDictManager.INGOTS[9], OreDictManager.ORES[0]));
|
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(BlockHandler.BlockBase, 2, 0), MysticOres.INGOTS[9], MysticOres.ORES[0]));
|
||||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Items.Resource, 2, 13), "#", "#", '#', OreDictManager.INGOTS[12]));
|
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Items.Resource, 2, 13), "#", "#", '#', MysticOres.INGOTS[12]));
|
||||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Items.Resource, 1, 3), "###", "#O#", "###", '#', OreDictManager.INGOTS[4], 'O', OreDictManager.INGOTS[2]));
|
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Items.Resource, 1, 3), "###", "#O#", "###", '#', MysticOres.INGOTS[4], 'O', MysticOres.INGOTS[2]));
|
||||||
GameRegistry.addShapelessRecipe(new ItemStack(Items.Resource, 4, 11), Blocks.glass);
|
GameRegistry.addShapelessRecipe(new ItemStack(Items.Resource, 4, 11), Blocks.glass);
|
||||||
GameRegistry.addShapelessRecipe(new ItemStack(Items.Resource, 4, 12), Blocks.obsidian);
|
GameRegistry.addShapelessRecipe(new ItemStack(Items.Resource, 4, 12), Blocks.obsidian);
|
||||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(Items.Resource, 8, 9), OreDictManager.INGOTS[5], OreDictManager.INGOTS[7], OreDictManager.INGOTS[8], OreDictManager.INGOTS[6]));
|
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(Items.Resource, 8, 9), MysticOres.INGOTS[5], MysticOres.INGOTS[7], MysticOres.INGOTS[8], MysticOres.INGOTS[6]));
|
||||||
for(Map.Entry<Object,ItemStack> entry:agateConverted.entrySet()){
|
for(Map.Entry<Object,ItemStack> entry:agateConverted.entrySet()){
|
||||||
GameRegistry.addRecipe(new ShapedOreRecipe(entry.getValue(), "###", "#o#", "###", 'o', "gemAgate", '#', entry.getKey()));
|
GameRegistry.addRecipe(new ShapedOreRecipe(entry.getValue(), "###", "#o#", "###", 'o', "gemAgate", '#', entry.getKey()));
|
||||||
}
|
}
|
||||||
|
|
@ -144,53 +145,57 @@ public class RecipeManager {
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void smelting() {
|
private static void smelting() {
|
||||||
FurnaceRecipes.smelting().func_151394_a(new ItemStack(BlockHandler.BlockBase,1, 6), new ItemStack(Items.Resource, 1, 0), 0.4F);
|
smeltBlockIntoResource(6, 0, 0.4F);
|
||||||
FurnaceRecipes.smelting().func_151394_a(new ItemStack(BlockHandler.BlockBase,1, 3), new ItemStack(Items.Resource, 1, 1), 0.7F);
|
smeltBlockIntoResource(3, 1, 0.7F);
|
||||||
FurnaceRecipes.smelting().func_151394_a(new ItemStack(BlockHandler.BlockBase,1, 0), new ItemStack(Items.Resource, 1, 2), 0.9F);
|
smeltBlockIntoResource(0, 2, 0.9F);
|
||||||
FurnaceRecipes.smelting().func_151394_a(new ItemStack(BlockHandler.BlockBase,1, 2), new ItemStack(Items.Resource, 1, 4), 0.4F);
|
smeltBlockIntoResource(2, 4, 0.4F);
|
||||||
FurnaceRecipes.smelting().func_151394_a(new ItemStack(BlockHandler.BlockBase,1, 4), new ItemStack(Items.Resource, 1, 5), 0.4F);
|
smeltBlockIntoResource(4, 5, 0.4F);
|
||||||
FurnaceRecipes.smelting().func_151394_a(new ItemStack(BlockHandler.BlockBase,1, 11), new ItemStack(Items.Resource, 1, 6), 0.4F);
|
smeltBlockIntoResource(11, 6, 0.4F);
|
||||||
FurnaceRecipes.smelting().func_151394_a(new ItemStack(BlockHandler.BlockBase,1, 5), new ItemStack(Items.Resource, 1, 7), 0.4F);
|
smeltBlockIntoResource(5, 7, 0.4F);
|
||||||
FurnaceRecipes.smelting().func_151394_a(new ItemStack(BlockHandler.BlockBase,1, 1), new ItemStack(Items.Resource, 1, 8), 0.4F);
|
smeltBlockIntoResource(1, 8, 0.4F);
|
||||||
FurnaceRecipes.smelting().func_151394_a(new ItemStack(BlockHandler.BlockBase,1, 7), new ItemStack(Items.Resource, 1, 10), 0.4F);
|
smeltBlockIntoResource(7, 10, 0.4F);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void smeltBlockIntoResource(int metaInput, int metaOutput, float exp){
|
||||||
|
FurnaceRecipes.smelting().func_151394_a(new ItemStack(BlockHandler.BlockBase,1, metaInput), new ItemStack(Items.Resource, 1, metaOutput), exp);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void toolRecipes() {
|
private static void toolRecipes() {
|
||||||
ToolRecipes.SwordRecipe(Items.VerditeSword, OreDictManager.INGOTS[0]);
|
ToolRecipes.sword(Items.VerditeSword, MysticOres.INGOTS[0]);
|
||||||
ToolRecipes.PickaxeRecipe(Items.VerditePickaxe, OreDictManager.INGOTS[0]);
|
ToolRecipes.pickaxe(Items.VerditePickaxe, MysticOres.INGOTS[0]);
|
||||||
ToolRecipes.ShovelRecipe(Items.VerditeShovel, OreDictManager.INGOTS[0]);
|
ToolRecipes.shovel(Items.VerditeShovel, MysticOres.INGOTS[0]);
|
||||||
ToolRecipes.AxeRecipe(Items.VerditeAxe, OreDictManager.INGOTS[0]);
|
ToolRecipes.axe(Items.VerditeAxe, MysticOres.INGOTS[0]);
|
||||||
ToolRecipes.HoeRecipe(Items.VerditeHoe, OreDictManager.INGOTS[0]);
|
ToolRecipes.hoe(Items.VerditeHoe, MysticOres.INGOTS[0]);
|
||||||
ToolRecipes.SwordRecipe(Items.MithrilSword, OreDictManager.INGOTS[1]);
|
ToolRecipes.sword(Items.MithrilSword, MysticOres.INGOTS[1]);
|
||||||
ToolRecipes.PickaxeRecipe(Items.MithrilPickaxe, OreDictManager.INGOTS[1]);
|
ToolRecipes.pickaxe(Items.MithrilPickaxe, MysticOres.INGOTS[1]);
|
||||||
ToolRecipes.ShovelRecipe(Items.MithrilShovel, OreDictManager.INGOTS[1]);
|
ToolRecipes.shovel(Items.MithrilShovel, MysticOres.INGOTS[1]);
|
||||||
ToolRecipes.AxeRecipe(Items.MithrilAxe, OreDictManager.INGOTS[1]);
|
ToolRecipes.axe(Items.MithrilAxe, MysticOres.INGOTS[1]);
|
||||||
ToolRecipes.HoeRecipe(Items.MithrilHoe, OreDictManager.INGOTS[1]);
|
ToolRecipes.hoe(Items.MithrilHoe, MysticOres.INGOTS[1]);
|
||||||
ToolRecipes.AdvancedSwordRecipe(Items.AdamantineSword, OreDictManager.INGOTS[2]);
|
ToolRecipes.advancedSword(Items.AdamantineSword, MysticOres.INGOTS[2]);
|
||||||
ToolRecipes.AdvancedPickaxeRecipe(Items.AdamantinePickaxe, OreDictManager.INGOTS[2]);
|
ToolRecipes.advancedPickaxe(Items.AdamantinePickaxe, MysticOres.INGOTS[2]);
|
||||||
ToolRecipes.AdvancedShovelRecipe(Items.AdamantineShovel, OreDictManager.INGOTS[2]);
|
ToolRecipes.advancedShovel(Items.AdamantineShovel, MysticOres.INGOTS[2]);
|
||||||
ToolRecipes.AdvancedAxeRecipe(Items.AdamantineAxe, OreDictManager.INGOTS[2]);
|
ToolRecipes.advancedAxe(Items.AdamantineAxe, MysticOres.INGOTS[2]);
|
||||||
ToolRecipes.AdvancedHoeRecipe(Items.AdamantineHoe, OreDictManager.INGOTS[2]);
|
ToolRecipes.advancedHoe(Items.AdamantineHoe, MysticOres.INGOTS[2]);
|
||||||
ToolRecipes.AdvancedSwordRecipe(Items.IridiumSword, OreDictManager.INGOTS[3]);
|
ToolRecipes.advancedSword(Items.IridiumSword, MysticOres.INGOTS[3]);
|
||||||
ToolRecipes.AdvancedPickaxeRecipe(Items.IridiumPickaxe, OreDictManager.INGOTS[3]);
|
ToolRecipes.advancedPickaxe(Items.IridiumPickaxe, MysticOres.INGOTS[3]);
|
||||||
ToolRecipes.AdvancedShovelRecipe(Items.IridiumShovel, OreDictManager.INGOTS[3]);
|
ToolRecipes.advancedShovel(Items.IridiumShovel, MysticOres.INGOTS[3]);
|
||||||
ToolRecipes.AdvancedAxeRecipe(Items.IridiumAxe, OreDictManager.INGOTS[3]);
|
ToolRecipes.advancedAxe(Items.IridiumAxe, MysticOres.INGOTS[3]);
|
||||||
ToolRecipes.AdvancedHoeRecipe(Items.IridiumHoe, OreDictManager.INGOTS[3]);
|
ToolRecipes.advancedHoe(Items.IridiumHoe, MysticOres.INGOTS[3]);
|
||||||
ToolRecipes.AdvancedSwordRecipe(Items.IridiumSword, OreDictManager.INGOTS[3]);
|
ToolRecipes.advancedSword(Items.IridiumSword, MysticOres.INGOTS[3]);
|
||||||
ToolRecipes.AdvancedPickaxeRecipe(Items.IridiumPickaxe, OreDictManager.INGOTS[3]);
|
ToolRecipes.advancedPickaxe(Items.IridiumPickaxe, MysticOres.INGOTS[3]);
|
||||||
ToolRecipes.AdvancedShovelRecipe(Items.IridiumShovel, OreDictManager.INGOTS[3]);
|
ToolRecipes.advancedShovel(Items.IridiumShovel, MysticOres.INGOTS[3]);
|
||||||
ToolRecipes.AdvancedAxeRecipe(Items.IridiumAxe, OreDictManager.INGOTS[3]);
|
ToolRecipes.advancedAxe(Items.IridiumAxe, MysticOres.INGOTS[3]);
|
||||||
ToolRecipes.AdvancedHoeRecipe(Items.IridiumHoe, OreDictManager.INGOTS[3]);
|
ToolRecipes.advancedHoe(Items.IridiumHoe, MysticOres.INGOTS[3]);
|
||||||
ToolRecipes.AdvancedSwordRecipe(Items.ObsidianSword, new ItemStack(Blocks.obsidian));
|
ToolRecipes.advancedSword(Items.ObsidianSword, new ItemStack(Blocks.obsidian));
|
||||||
ToolRecipes.AdvancedPickaxeRecipe(Items.ObsidianPickaxe, new ItemStack(Blocks.obsidian));
|
ToolRecipes.advancedPickaxe(Items.ObsidianPickaxe, new ItemStack(Blocks.obsidian));
|
||||||
ToolRecipes.AdvancedShovelRecipe(Items.ObsidianShovel, new ItemStack(Blocks.obsidian));
|
ToolRecipes.advancedShovel(Items.ObsidianShovel, new ItemStack(Blocks.obsidian));
|
||||||
ToolRecipes.AdvancedAxeRecipe(Items.ObsidianAxe, new ItemStack(Blocks.obsidian));
|
ToolRecipes.advancedAxe(Items.ObsidianAxe, new ItemStack(Blocks.obsidian));
|
||||||
ToolRecipes.AdvancedHoeRecipe(Items.ObsidianHoe, new ItemStack(Blocks.obsidian));
|
ToolRecipes.advancedHoe(Items.ObsidianHoe, new ItemStack(Blocks.obsidian));
|
||||||
ToolRecipes.AdvancedSwordRecipe(Items.BloodstoneSword, OreDictManager.ORES[7]);
|
ToolRecipes.advancedSword(Items.BloodstoneSword, MysticOres.ORES[7]);
|
||||||
ToolRecipes.AdvancedPickaxeRecipe(Items.BloodstonePickaxe, OreDictManager.ORES[7]);
|
ToolRecipes.advancedPickaxe(Items.BloodstonePickaxe, MysticOres.ORES[7]);
|
||||||
ToolRecipes.AdvancedShovelRecipe(Items.BloodstoneShovel, OreDictManager.ORES[7]);
|
ToolRecipes.advancedShovel(Items.BloodstoneShovel, MysticOres.ORES[7]);
|
||||||
ToolRecipes.AdvancedAxeRecipe(Items.BloodstoneAxe, OreDictManager.ORES[7]);
|
ToolRecipes.advancedAxe(Items.BloodstoneAxe, MysticOres.ORES[7]);
|
||||||
ToolRecipes.AdvancedHoeRecipe(Items.BloodstoneHoe, OreDictManager.ORES[7]);
|
ToolRecipes.advancedHoe(Items.BloodstoneHoe, MysticOres.ORES[7]);
|
||||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Items.Satchel, 1), "#$#", "$%$", "#$#", '#', net.minecraft.init.Items.string, '$', OreDictManager.INGOTS[9], '%', Blocks.ender_chest));
|
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Items.Satchel, 1), "#$#", "$%$", "#$#", '#', net.minecraft.init.Items.string, '$', MysticOres.INGOTS[9], '%', Blocks.ender_chest));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,52 +1,53 @@
|
||||||
package mysticores.util;
|
package mysticores.util;
|
||||||
|
|
||||||
|
import mysticores.MysticOres;
|
||||||
import net.minecraft.item.Item;
|
import net.minecraft.item.Item;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraftforge.oredict.ShapedOreRecipe;
|
import net.minecraftforge.oredict.ShapedOreRecipe;
|
||||||
import cpw.mods.fml.common.registry.GameRegistry;
|
import cpw.mods.fml.common.registry.GameRegistry;
|
||||||
|
|
||||||
public class ToolRecipes {
|
public class ToolRecipes {
|
||||||
public static void AdvancedAxeRecipe(Item output, Object input) {
|
public static void advancedAxe(Item output, Object input) {
|
||||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(output), "## ", "#S ", " S ", 'S', OreDictManager.INGOTS[13], '#', input));
|
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(output), "## ", "#S ", " S ", 'S', MysticOres.INGOTS[13], '#', input));
|
||||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(output), "## ", "S# ", "S ", 'S', OreDictManager.INGOTS[13], '#', input));
|
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(output), "## ", "S# ", "S ", 'S', MysticOres.INGOTS[13], '#', input));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void AdvancedHoeRecipe(Item output, Object input) {
|
public static void advancedHoe(Item output, Object input) {
|
||||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(output), "## ", " S ", " S ", 'S', OreDictManager.INGOTS[13], '#', input));
|
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(output), "## ", " S ", " S ", 'S', MysticOres.INGOTS[13], '#', input));
|
||||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(output), "## ", "S ", "S ", 'S', OreDictManager.INGOTS[13], '#', input));
|
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(output), "## ", "S ", "S ", 'S', MysticOres.INGOTS[13], '#', input));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void AdvancedPickaxeRecipe(Item output, Object input) {
|
public static void advancedPickaxe(Item output, Object input) {
|
||||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(output), "###", " S ", " S ", 'S', OreDictManager.INGOTS[13], '#', input));
|
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(output), "###", " S ", " S ", 'S', MysticOres.INGOTS[13], '#', input));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void AdvancedShovelRecipe(Item output, Object input) {
|
public static void advancedShovel(Item output, Object input) {
|
||||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(output), "#", "S", "S", 'S', OreDictManager.INGOTS[13], '#', input));
|
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(output), "#", "S", "S", 'S', MysticOres.INGOTS[13], '#', input));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void AdvancedSwordRecipe(Item output, Object input) {
|
public static void advancedSword(Item output, Object input) {
|
||||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(output), "#", "#", "S", 'S', OreDictManager.INGOTS[13], '#', input));
|
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(output), "#", "#", "S", 'S', MysticOres.INGOTS[13], '#', input));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void AxeRecipe(Item output, Object input) {
|
public static void axe(Item output, Object input) {
|
||||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(output), "## ", "#S ", " S ", 'S', "stickWood", '#', input));
|
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(output), "## ", "#S ", " S ", 'S', "stickWood", '#', input));
|
||||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(output), "## ", "S# ", "S ", 'S', "stickWood", '#', input));
|
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(output), "## ", "S# ", "S ", 'S', "stickWood", '#', input));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void HoeRecipe(Item output, Object input) {
|
public static void hoe(Item output, Object input) {
|
||||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(output), "## ", " S ", " S ", 'S', "stickWood", '#', input));
|
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(output), "## ", " S ", " S ", 'S', "stickWood", '#', input));
|
||||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(output), "## ", "S ", "S ", 'S', "stickWood", '#', input));
|
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(output), "## ", "S ", "S ", 'S', "stickWood", '#', input));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void PickaxeRecipe(Item output, Object input) {
|
public static void pickaxe(Item output, Object input) {
|
||||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(output), "###", " S ", " S ", 'S', "stickWood", '#', input));
|
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(output), "###", " S ", " S ", 'S', "stickWood", '#', input));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void ShovelRecipe(Item output, Object input) {
|
public static void shovel(Item output, Object input) {
|
||||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(output), "#", "S", "S", 'S', "stickWood", '#', input));
|
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(output), "#", "S", "S", 'S', "stickWood", '#', input));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void SwordRecipe(Item output, Object input) {
|
public static void sword(Item output, Object input) {
|
||||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(output), "#", "#", "S", 'S', "stickWood", '#', input));
|
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(output), "#", "#", "S", 'S', "stickWood", '#', input));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,15 +0,0 @@
|
||||||
package mysticores.worldgen;
|
|
||||||
|
|
||||||
import mysticores.blocks.BlockHandler;
|
|
||||||
import mysticores.lib.Rarity;
|
|
||||||
import cpw.mods.fml.common.registry.GameRegistry;
|
|
||||||
|
|
||||||
public class GeneratorManager {
|
|
||||||
public static void initialize() {
|
|
||||||
GameRegistry.registerWorldGenerator(new WorldGenOres(), 100);
|
|
||||||
GameRegistry.registerWorldGenerator(new NetherGenMineable(BlockHandler.BlockBase, 7, Rarity.BLOODSTONE + 1), 100);
|
|
||||||
GameRegistry.registerWorldGenerator(new NetherGenMineable(BlockHandler.BlockBase, 8, Rarity.BLACKSOULSTONE + 1), 100);
|
|
||||||
GameRegistry.registerWorldGenerator(new NetherGenMineable(BlockHandler.BlockBase, 9, Rarity.BLUESOULSTONE + 1), 100);
|
|
||||||
GameRegistry.registerWorldGenerator(new NetherGenMineable(BlockHandler.BlockBase, 10, Rarity.REDSOULSTONE), 100);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,36 +0,0 @@
|
||||||
package mysticores.worldgen;
|
|
||||||
|
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
import net.minecraft.block.Block;
|
|
||||||
import net.minecraft.world.World;
|
|
||||||
import net.minecraft.world.chunk.IChunkProvider;
|
|
||||||
import net.minecraft.world.gen.feature.WorldGenerator;
|
|
||||||
import cpw.mods.fml.common.IWorldGenerator;
|
|
||||||
|
|
||||||
public class NetherGenMineable implements IWorldGenerator {
|
|
||||||
private WorldGenerator helper;
|
|
||||||
|
|
||||||
public NetherGenMineable(Block blockId, int numBlocks) {
|
|
||||||
helper = new NetherGenHelper(blockId, numBlocks);
|
|
||||||
}
|
|
||||||
|
|
||||||
public NetherGenMineable(Block blockId, int meta, int numBlocks) {
|
|
||||||
helper = new NetherGenHelper(blockId, meta, numBlocks);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider) {
|
|
||||||
if (world.provider.isHellWorld)
|
|
||||||
generateNether(world, random, chunkX * 16, chunkZ * 16);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void generateNether(World world, Random random, int i, int j) {
|
|
||||||
for (int j1 = 0; j1 < 50; j1++) {
|
|
||||||
int Xcoordinate = i + random.nextInt(16);
|
|
||||||
int Zcoordinate = j + random.nextInt(16);
|
|
||||||
int Ycoordinate = random.nextInt(256);
|
|
||||||
helper.generate(world, random, Xcoordinate, Ycoordinate, Zcoordinate);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -19,11 +19,17 @@ public class WorldGenOres implements IWorldGenerator {
|
||||||
public static final WorldGenMinable topaz = new WorldGenMinable(BlockHandler.BlockBase, 5, 4, Blocks.stone);
|
public static final WorldGenMinable topaz = new WorldGenMinable(BlockHandler.BlockBase, 5, 4, Blocks.stone);
|
||||||
public static final WorldGenMinable verdite = new WorldGenMinable(BlockHandler.BlockBase, 6, 9, Blocks.stone);
|
public static final WorldGenMinable verdite = new WorldGenMinable(BlockHandler.BlockBase, 6, 9, Blocks.stone);
|
||||||
public static final WorldGenMinable agate = new WorldGenMinable(BlockHandler.BlockBase, 11, 4, Blocks.stone);
|
public static final WorldGenMinable agate = new WorldGenMinable(BlockHandler.BlockBase, 11, 4, Blocks.stone);
|
||||||
|
public static final NetherGenHelper bloodstone = new NetherGenHelper(BlockHandler.BlockBase, 7, Rarity.BLOODSTONE + 1);
|
||||||
|
public static final NetherGenHelper blackSoulstone = new NetherGenHelper(BlockHandler.BlockBase, 8, Rarity.BLACKSOULSTONE + 1);
|
||||||
|
public static final NetherGenHelper blueSoulstone = new NetherGenHelper(BlockHandler.BlockBase, 9, Rarity.BLUESOULSTONE + 1);
|
||||||
|
public static final NetherGenHelper redSoulstone = new NetherGenHelper(BlockHandler.BlockBase, 10, Rarity.REDSOULSTONE);
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider) {
|
public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider) {
|
||||||
if (!world.provider.isHellWorld) {
|
if (!world.provider.isHellWorld) {
|
||||||
generateSurface(world, random, chunkX * 16, chunkZ * 16);
|
generateSurface(world, random, chunkX * 16, chunkZ * 16);
|
||||||
|
}else{
|
||||||
|
generateNether(world, random, chunkX * 16, chunkZ * 16);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -77,4 +83,31 @@ public class WorldGenOres implements IWorldGenerator {
|
||||||
verdite.generate(world, random, Xcoord, Ycoord, Zcoord);
|
verdite.generate(world, random, Xcoord, Ycoord, Zcoord);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void generateNether(World world, Random random, int i, int j) {
|
||||||
|
for (int j1 = 0; j1 < 50; j1++) {
|
||||||
|
int Xcoordinate = i + random.nextInt(16);
|
||||||
|
int Zcoordinate = j + random.nextInt(16);
|
||||||
|
int Ycoordinate = random.nextInt(256);
|
||||||
|
bloodstone.generate(world, random, Xcoordinate, Ycoordinate, Zcoordinate);
|
||||||
|
}
|
||||||
|
for (int j1 = 0; j1 < 50; j1++) {
|
||||||
|
int Xcoordinate = i + random.nextInt(16);
|
||||||
|
int Zcoordinate = j + random.nextInt(16);
|
||||||
|
int Ycoordinate = random.nextInt(256);
|
||||||
|
blackSoulstone.generate(world, random, Xcoordinate, Ycoordinate, Zcoordinate);
|
||||||
|
}
|
||||||
|
for (int j1 = 0; j1 < 50; j1++) {
|
||||||
|
int Xcoordinate = i + random.nextInt(16);
|
||||||
|
int Zcoordinate = j + random.nextInt(16);
|
||||||
|
int Ycoordinate = random.nextInt(256);
|
||||||
|
blueSoulstone.generate(world, random, Xcoordinate, Ycoordinate, Zcoordinate);
|
||||||
|
}
|
||||||
|
for (int j1 = 0; j1 < 50; j1++) {
|
||||||
|
int Xcoordinate = i + random.nextInt(16);
|
||||||
|
int Zcoordinate = j + random.nextInt(16);
|
||||||
|
int Ycoordinate = random.nextInt(256);
|
||||||
|
redSoulstone.generate(world, random, Xcoordinate, Ycoordinate, Zcoordinate);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Loading…
Reference in a new issue