mirror of
https://github.com/GTNewHorizons/EnderIO.git
synced 2026-11-28 23:59:11 +00:00
Materials and capacitors ported.
This commit is contained in:
1 parent
f0fbfe5844
commit
c0bef5cc24
20 files changed
+363
-333
No files matched your search
@@ -1,10 +1,9 @@
|
||||
package crazypants.enderio.material;
|
||||
|
||||
import static crazypants.enderio.ModObject.itemBasicCapacitor;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.FurnaceRecipes;
|
||||
@@ -13,36 +12,36 @@ import net.minecraftforge.oredict.ShapedOreRecipe;
|
||||
import cpw.mods.fml.common.Loader;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import crazypants.enderio.Config;
|
||||
import crazypants.enderio.ModObject;
|
||||
import crazypants.enderio.EnderIO;
|
||||
|
||||
public class MaterialRecipes {
|
||||
|
||||
public static void registerOresInDictionary() {
|
||||
//Ore Dictionary Registeration
|
||||
OreDictionary.registerOre("dustCoal", new ItemStack(ModObject.itemPowderIngot.actualId, 1, PowderIngot.POWDER_COAL.ordinal()));
|
||||
OreDictionary.registerOre("dustIron", new ItemStack(ModObject.itemPowderIngot.actualId, 1, PowderIngot.POWDER_IRON.ordinal()));
|
||||
OreDictionary.registerOre("dustGold", new ItemStack(ModObject.itemPowderIngot.actualId, 1, PowderIngot.POWDER_GOLD.ordinal()));
|
||||
OreDictionary.registerOre("dustCopper", new ItemStack(ModObject.itemPowderIngot.actualId, 1, PowderIngot.POWDER_COPPER.ordinal()));
|
||||
OreDictionary.registerOre("dustTin", new ItemStack(ModObject.itemPowderIngot.actualId, 1, PowderIngot.POWDER_TIN.ordinal()));
|
||||
OreDictionary.registerOre("dustEnderPearl", new ItemStack(ModObject.itemPowderIngot.actualId, 1, PowderIngot.POWDER_ENDER.ordinal()));
|
||||
OreDictionary.registerOre("itemSilicon", new ItemStack(ModObject.itemMaterial.actualId, 1, Material.SILICON.ordinal()));
|
||||
OreDictionary.registerOre("gearStone", new ItemStack(ModObject.itemMachinePart.actualId, 1, MachinePart.BASIC_GEAR.ordinal()));
|
||||
OreDictionary.registerOre("dustCoal", new ItemStack(EnderIO.itemPowderIngot, 1, PowderIngot.POWDER_COAL.ordinal()));
|
||||
OreDictionary.registerOre("dustIron", new ItemStack(EnderIO.itemPowderIngot, 1, PowderIngot.POWDER_IRON.ordinal()));
|
||||
OreDictionary.registerOre("dustGold", new ItemStack(EnderIO.itemPowderIngot, 1, PowderIngot.POWDER_GOLD.ordinal()));
|
||||
OreDictionary.registerOre("dustCopper", new ItemStack(EnderIO.itemPowderIngot, 1, PowderIngot.POWDER_COPPER.ordinal()));
|
||||
OreDictionary.registerOre("dustTin", new ItemStack(EnderIO.itemPowderIngot, 1, PowderIngot.POWDER_TIN.ordinal()));
|
||||
OreDictionary.registerOre("dustEnderPearl", new ItemStack(EnderIO.itemPowderIngot, 1, PowderIngot.POWDER_ENDER.ordinal()));
|
||||
OreDictionary.registerOre("itemSilicon", new ItemStack(EnderIO.itemPowderIngot, 1, Material.SILICON.ordinal()));
|
||||
OreDictionary.registerOre("gearStone", new ItemStack(EnderIO.itemPowderIngot, 1, MachinePart.BASIC_GEAR.ordinal()));
|
||||
|
||||
int oreId = OreDictionary.getOreID("glass");
|
||||
ArrayList<ItemStack> ingots = OreDictionary.getOres(oreId);
|
||||
if(ingots.isEmpty()) {
|
||||
OreDictionary.registerOre("glass", Block.glass);
|
||||
OreDictionary.registerOre("glass", Blocks.glass);
|
||||
}
|
||||
ItemStack pureGlass = new ItemStack(ModObject.blockFusedQuartz.actualId, 1, BlockFusedQuartz.Type.GLASS.ordinal());
|
||||
ItemStack pureGlass = new ItemStack(EnderIO.blockFusedQuartz, 1, BlockFusedQuartz.Type.GLASS.ordinal());
|
||||
OreDictionary.registerOre("glass", pureGlass);
|
||||
OreDictionary.registerOre("glassHardened", new ItemStack(ModObject.blockFusedQuartz.actualId, 1, BlockFusedQuartz.Type.FUSED_QUARTZ.ordinal()));
|
||||
OreDictionary.registerOre("glassHardened", new ItemStack(EnderIO.blockFusedQuartz, 1, BlockFusedQuartz.Type.FUSED_QUARTZ.ordinal()));
|
||||
|
||||
//Glass stuff for compatability
|
||||
GameRegistry.addShapedRecipe(new ItemStack(Block.thinGlass), " ", "eee", "eee", 'e', pureGlass);
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(Block.glass), pureGlass);
|
||||
GameRegistry.addShapedRecipe(new ItemStack(Item.glassBottle), " ", "g g", " g ", 'g', pureGlass);
|
||||
GameRegistry.addShapedRecipe(new ItemStack(Blocks.glass_pane), " ", "eee", "eee", 'e', pureGlass);
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(Blocks.glass), pureGlass);
|
||||
GameRegistry.addShapedRecipe(new ItemStack(Items.glass_bottle), " ", "g g", " g ", 'g', pureGlass);
|
||||
|
||||
OreDictionary.registerOre("glass", Block.glass);
|
||||
OreDictionary.registerOre("glass", Blocks.glass);
|
||||
|
||||
}
|
||||
|
||||
@@ -67,72 +66,74 @@ public class MaterialRecipes {
|
||||
public static void addRecipes() {
|
||||
|
||||
//Common Ingredients
|
||||
ItemStack conduitBinder = new ItemStack(ModObject.itemMaterial.actualId, 4, Material.CONDUIT_BINDER.ordinal());
|
||||
ItemStack basicGear = new ItemStack(ModObject.itemMachinePart.actualId, 1, MachinePart.BASIC_GEAR.ordinal());
|
||||
ItemStack binderComposite = new ItemStack(ModObject.itemMaterial.actualId, 1, Material.BINDER_COMPOSITE.ordinal());
|
||||
ItemStack industrialBinder = new ItemStack(ModObject.itemMaterial.actualId, 1, Material.CONDUIT_BINDER.ordinal());
|
||||
ItemStack enderCapacitor = new ItemStack(itemBasicCapacitor.actualId, 1, 2);
|
||||
ItemStack fusedQuartzFrame = new ItemStack(ModObject.itemFusedQuartzFrame.actualId, 1, 0);
|
||||
ItemStack machineChassi = new ItemStack(ModObject.itemMachinePart.actualId, 1, MachinePart.MACHINE_CHASSI.ordinal());
|
||||
ItemStack activatedCapacitor = new ItemStack(itemBasicCapacitor.actualId, 1, 1);
|
||||
ItemStack phasedGold = new ItemStack(ModObject.itemAlloy.actualId, 1, Alloy.PHASED_GOLD.ordinal());
|
||||
ItemStack phasedIron = new ItemStack(ModObject.itemAlloy.actualId, 1, Alloy.PHASED_IRON.ordinal());
|
||||
ItemStack electricalSteel = new ItemStack(ModObject.itemAlloy.actualId, 1, Alloy.ELECTRICAL_STEEL.ordinal());
|
||||
ItemStack conduitBinder = new ItemStack(EnderIO.itemMaterial, 4, Material.CONDUIT_BINDER.ordinal());
|
||||
ItemStack basicGear = new ItemStack(EnderIO.itemMachinePart, 1, MachinePart.BASIC_GEAR.ordinal());
|
||||
ItemStack binderComposite = new ItemStack(EnderIO.itemMaterial, 1, Material.BINDER_COMPOSITE.ordinal());
|
||||
ItemStack industrialBinder = new ItemStack(EnderIO.itemMaterial, 1, Material.CONDUIT_BINDER.ordinal());
|
||||
|
||||
ItemStack fusedQuartzFrame = new ItemStack(EnderIO.itemFusedQuartzFrame, 1, 0);
|
||||
ItemStack machineChassi = new ItemStack(EnderIO.itemMachinePart, 1, MachinePart.MACHINE_CHASSI.ordinal());
|
||||
|
||||
ItemStack phasedGold = new ItemStack(EnderIO.itemAlloy, 1, Alloy.PHASED_GOLD.ordinal());
|
||||
ItemStack phasedIron = new ItemStack(EnderIO.itemAlloy, 1, Alloy.PHASED_IRON.ordinal());
|
||||
ItemStack electricalSteel = new ItemStack(EnderIO.itemAlloy, 1, Alloy.ELECTRICAL_STEEL.ordinal());
|
||||
|
||||
//Conduit Binder
|
||||
ItemStack cbc = binderComposite.copy();
|
||||
cbc.stackSize = 8;
|
||||
if(Config.useAlternateBinderRecipe) {
|
||||
GameRegistry.addShapedRecipe(cbc, "gcg", "sgs", "gcg", 'g', Block.gravel, 's', Block.sand, 'c', Item.clay);
|
||||
GameRegistry.addShapedRecipe(cbc, "gcg", "sgs", "gcg", 'g', Blocks.gravel, 's', Blocks.sand, 'c', Items.clay_ball);
|
||||
} else {
|
||||
GameRegistry.addShapedRecipe(cbc, "ggg", "scs", "ggg", 'g', Block.gravel, 's', Block.sand, 'c', Item.clay);
|
||||
GameRegistry.addShapedRecipe(cbc, "ggg", "scs", "ggg", 'g', Blocks.gravel, 's', Blocks.sand, 'c', Items.clay_ball);
|
||||
}
|
||||
FurnaceRecipes.smelting().addSmelting(binderComposite.itemID, binderComposite.getItemDamage(), conduitBinder, 0);
|
||||
FurnaceRecipes.smelting().func_151394_a(binderComposite, conduitBinder, 0);
|
||||
|
||||
//Nuggets
|
||||
ItemStack phasedIronNugget = new ItemStack(ModObject.itemMaterial.actualId, 9, Material.PHASED_IRON_NUGGET.ordinal());
|
||||
ItemStack phasedIronNugget = new ItemStack(EnderIO.itemMaterial, 9, Material.PHASED_IRON_NUGGET.ordinal());
|
||||
GameRegistry.addShapelessRecipe(phasedIronNugget, phasedIron);
|
||||
phasedIronNugget = phasedIronNugget.copy();
|
||||
phasedIronNugget.stackSize = 1;
|
||||
GameRegistry.addShapedRecipe(phasedIron, "eee", "eee", "eee", 'e', phasedIronNugget);
|
||||
|
||||
ItemStack vibrantNugget = new ItemStack(ModObject.itemMaterial.actualId, 9, Material.VIBRANT_NUGGET.ordinal());
|
||||
ItemStack vibrantNugget = new ItemStack(EnderIO.itemMaterial, 9, Material.VIBRANT_NUGGET.ordinal());
|
||||
GameRegistry.addShapelessRecipe(vibrantNugget, phasedGold);
|
||||
vibrantNugget = vibrantNugget.copy();
|
||||
vibrantNugget.stackSize = 1;
|
||||
GameRegistry.addShapedRecipe(phasedGold, "eee", "eee", "eee", 'e', vibrantNugget);
|
||||
|
||||
//Crystals
|
||||
ItemStack pulsCry = new ItemStack(ModObject.itemMaterial.actualId, 1, Material.PULSATING_CYSTAL.ordinal());
|
||||
GameRegistry.addShapedRecipe(pulsCry, "nnn", "ngn", "nnn", 'n', phasedIronNugget, 'g', Item.diamond);
|
||||
ItemStack pulsCry = new ItemStack(EnderIO.itemMaterial, 1, Material.PULSATING_CYSTAL.ordinal());
|
||||
GameRegistry.addShapedRecipe(pulsCry, "nnn", "ngn", "nnn", 'n', phasedIronNugget, 'g', Items.diamond);
|
||||
|
||||
ItemStack vibCry = new ItemStack(ModObject.itemMaterial.actualId, 1, Material.VIBRANT_CYSTAL.ordinal());
|
||||
GameRegistry.addShapedRecipe(vibCry, "nnn", "ngn", "nnn", 'n', vibrantNugget, 'g', Item.emerald);
|
||||
ItemStack vibCry = new ItemStack(EnderIO.itemMaterial, 1, Material.VIBRANT_CYSTAL.ordinal());
|
||||
GameRegistry.addShapedRecipe(vibCry, "nnn", "ngn", "nnn", 'n', vibrantNugget, 'g', Items.emerald);
|
||||
|
||||
//Smelting
|
||||
FurnaceRecipes.smelting().addSmelting(ModObject.itemPowderIngot.actualId, PowderIngot.POWDER_IRON.ordinal(), new ItemStack(Item.ingotIron), 0);
|
||||
FurnaceRecipes.smelting().addSmelting(ModObject.itemPowderIngot.actualId, PowderIngot.POWDER_GOLD.ordinal(), new ItemStack(Item.ingotGold), 0);
|
||||
FurnaceRecipes.smelting().func_151394_a(new ItemStack(EnderIO.itemPowderIngot, 1, PowderIngot.POWDER_IRON.ordinal()), new ItemStack(Items.iron_ingot), 0);
|
||||
FurnaceRecipes.smelting().func_151394_a(new ItemStack(EnderIO.itemPowderIngot, 1, PowderIngot.POWDER_GOLD.ordinal()), new ItemStack(Items.gold_ingot), 0);
|
||||
|
||||
//Ender Dusts
|
||||
ItemStack enderDust = new ItemStack(ModObject.itemPowderIngot.actualId, 1, PowderIngot.POWDER_ENDER.ordinal());
|
||||
GameRegistry.addShapedRecipe(new ItemStack(Item.enderPearl), "eee", "eee", "eee", 'e', enderDust);
|
||||
ItemStack enderDust = new ItemStack(EnderIO.itemPowderIngot, 1, PowderIngot.POWDER_ENDER.ordinal());
|
||||
GameRegistry.addShapedRecipe(new ItemStack(Items.ender_pearl), "eee", "eee", "eee", 'e', enderDust);
|
||||
|
||||
// Fused Quartz Frame
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(fusedQuartzFrame, "bsb", "s s", "bsb", 'b', conduitBinder, 's', "stickWood"));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(fusedQuartzFrame, "bsb", "s s", "bsb", 'b', conduitBinder, 's', "woodStick"));
|
||||
|
||||
// Machine Chassi
|
||||
GameRegistry.addShapedRecipe(machineChassi, "fif", "i i", "fif", 'f', Block.fenceIron, 'i', Item.ingotIron);
|
||||
GameRegistry.addShapedRecipe(machineChassi, "fif", "i i", "fif", 'f', Blocks.iron_bars, 'i', Items.iron_ingot);
|
||||
|
||||
// Basic Gear
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(basicGear, "scs", "c c", "scs", 's', "stickWood", 'c', Block.cobblestone));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(basicGear, "scs", "c c", "scs", 's', "woodStick", 'c', Block.cobblestone));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(basicGear, "scs", "c c", "scs", 's', "stickWood", 'c', Blocks.cobblestone));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(basicGear, "scs", "c c", "scs", 's', "woodStick", 'c', Blocks.cobblestone));
|
||||
|
||||
// Ender Capacitor
|
||||
//Ender Capacitor
|
||||
ItemStack enderCapacitor = new ItemStack(EnderIO.itemBasicCapacitor, 1, 2);
|
||||
ItemStack activatedCapacitor = new ItemStack(EnderIO.itemBasicCapacitor, 1, 1);
|
||||
if(Config.useHardRecipes) {
|
||||
GameRegistry.addShapedRecipe(enderCapacitor, "eee", "cgc", "eee", 'e', phasedGold, 'c', activatedCapacitor, 'g', Block.glowStone);
|
||||
GameRegistry.addShapedRecipe(enderCapacitor, "eee", "cgc", "eee", 'e', phasedGold, 'c', activatedCapacitor, 'g', Blocks.glowstone);
|
||||
} else {
|
||||
GameRegistry.addShapedRecipe(enderCapacitor, " e ", "cgc", " e ", 'e', phasedGold, 'c', activatedCapacitor, 'g', Block.glowStone);
|
||||
GameRegistry.addShapedRecipe(enderCapacitor, " e ", "cgc", " e ", 'e', phasedGold, 'c', activatedCapacitor, 'g', Blocks.glowstone);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -141,32 +142,32 @@ public class MaterialRecipes {
|
||||
int oreId = OreDictionary.getOreID("ingotCopper");
|
||||
ArrayList<ItemStack> ingots = OreDictionary.getOres(oreId);
|
||||
if(!ingots.isEmpty()) {
|
||||
FurnaceRecipes.smelting().addSmelting(ModObject.itemPowderIngot.actualId, PowderIngot.POWDER_COPPER.ordinal(), ingots.get(0), 0);
|
||||
FurnaceRecipes.smelting().func_151394_a(new ItemStack(EnderIO.itemPowderIngot, 1, PowderIngot.POWDER_COPPER.ordinal()), ingots.get(0), 0);
|
||||
}
|
||||
oreId = OreDictionary.getOreID("ingotTin");
|
||||
ingots = OreDictionary.getOres(oreId);
|
||||
if(!ingots.isEmpty()) {
|
||||
FurnaceRecipes.smelting().addSmelting(ModObject.itemPowderIngot.actualId, PowderIngot.POWDER_TIN.ordinal(), ingots.get(0), 0);
|
||||
FurnaceRecipes.smelting().func_151394_a(new ItemStack(EnderIO.itemPowderIngot, 1, PowderIngot.POWDER_TIN.ordinal()), ingots.get(0), 0);
|
||||
}
|
||||
|
||||
ItemStack capacitor = new ItemStack(itemBasicCapacitor.actualId, 1, 0);
|
||||
ItemStack capacitor = new ItemStack(EnderIO.itemBasicCapacitor, 1, 0);
|
||||
ArrayList<ItemStack> copperIngots = OreDictionary.getOres("ingotCopper");
|
||||
Item gold;
|
||||
if(Config.useHardRecipes) {
|
||||
gold = Item.ingotGold;
|
||||
gold = Items.gold_ingot;
|
||||
} else {
|
||||
gold = Item.goldNugget;
|
||||
gold = Items.gold_nugget;
|
||||
}
|
||||
if(copperIngots != null && !copperIngots.isEmpty()) {
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(capacitor, " gr", "gcg", "rg ", 'r', Item.redstone, 'g', gold, 'c', "ingotCopper"));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(capacitor, " gr", "gcg", "rg ", 'r', Items.redstone, 'g', gold, 'c', "ingotCopper"));
|
||||
} else {
|
||||
GameRegistry.
|
||||
addShapedRecipe(capacitor, " gr", "gig", "rg ", 'r', Item.redstone, 'g', gold, 'i', Item.ingotIron);
|
||||
addShapedRecipe(capacitor, " gr", "gig", "rg ", 'r', Items.redstone, 'g', gold, 'i', Items.iron_ingot);
|
||||
}
|
||||
|
||||
int dustCoal = OreDictionary.getOreID("dustCoal");
|
||||
ItemStack activatedCapacitor = new ItemStack(itemBasicCapacitor.actualId, 1, 1);
|
||||
ItemStack electricalSteel = new ItemStack(ModObject.itemAlloy.actualId, 1, Alloy.ELECTRICAL_STEEL.ordinal());
|
||||
ItemStack activatedCapacitor = new ItemStack(EnderIO.itemBasicCapacitor, 1, 1);
|
||||
ItemStack electricalSteel = new ItemStack(EnderIO.itemAlloy, 1, Alloy.ELECTRICAL_STEEL.ordinal());
|
||||
if(Config.useHardRecipes) {
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(activatedCapacitor, "eee", "cCc", "eee", 'e', electricalSteel, 'c', capacitor, 'C', "dustCoal"));
|
||||
} else {
|
||||
|
||||
Reference in new issue
Block a user