semtex, more work on new assembler recipes

This commit is contained in:
Bob 2020-08-08 14:50:35 +02:00
parent 8e30e3a0b0
commit 37585c16d2
12 changed files with 191 additions and 66 deletions

View File

@ -861,8 +861,8 @@ item.fuse.name=Sicherung
item.fusion_core.name=Fusionskern item.fusion_core.name=Fusionskern
item.fusion_core_infinite.name=Unendlicher Fusionskern item.fusion_core_infinite.name=Unendlicher Fusionskern
item.gadget_core.name=Plutoniumkern item.gadget_core.name=Plutoniumkern
item.gadget_explosive.name=Treibladung item.gadget_explosive.name=Sprenglinse erster Generation
item.gadget_explosive8.name=Verbundene Treibladung item.gadget_explosive8.name=Implosions-Treibladung erster Generation
item.gadget_kit.name=The Gadget Kit item.gadget_kit.name=The Gadget Kit
item.gadget_wireing.name=Kabelrolle item.gadget_wireing.name=Kabelrolle
item.gas_biogas.name=Biogastank item.gas_biogas.name=Biogastank
@ -1091,12 +1091,13 @@ item.ingot_polymer.name=Polymertafel
item.ingot_pu238.name=Pu238-Barren item.ingot_pu238.name=Pu238-Barren
item.ingot_pu239.name=Pu239-Barren item.ingot_pu239.name=Pu239-Barren
item.ingot_pu240.name=Pu240-Barren item.ingot_pu240.name=Pu240-Barren
item.ingot_red_copper.name=Minecraft Kupfer item.ingot_red_copper.name=Minecraft-Kupfer
item.ingot_reiium.name=Reiiumbarren item.ingot_reiium.name=Reiiumbarren
item.ingot_saturnite.name=Saturnitbarren item.ingot_saturnite.name=Saturnitbarren
item.ingot_schrabidium.name=Schrabidiumbarren item.ingot_schrabidium.name=Schrabidiumbarren
item.ingot_schrabidium_fuel.name=Schrabidiumkernbrennstoffbarren item.ingot_schrabidium_fuel.name=Schrabidiumkernbrennstoffbarren
item.ingot_schraranium.name=Schraraniumbarren item.ingot_schraranium.name=Schraraniumbarren
item.ingot_semtex.name=Semtextafel
item.ingot_solinium.name=Soliniumbarren item.ingot_solinium.name=Soliniumbarren
item.ingot_starmetal.name=§9Sternenmetallbarren§r item.ingot_starmetal.name=§9Sternenmetallbarren§r
item.ingot_steel.name=Stahlbarren item.ingot_steel.name=Stahlbarren
@ -1140,8 +1141,8 @@ item.magnet_circular.name=Flachmagnet
item.magnet_dee.name=Duantenmagnete item.magnet_dee.name=Duantenmagnete
item.magnetron.name=Magnetron item.magnetron.name=Magnetron
item.man_core.name=Plutoniumkern item.man_core.name=Plutoniumkern
item.man_explosive.name=Treibladung item.man_explosive.name=Sprendlinse
item.man_explosive8.name=Verbundene Treibladung item.man_explosive8.name=Implosions-Treibladung
item.man_igniter.name=Zünder item.man_igniter.name=Zünder
item.man_kit.name=Fat Man Kit item.man_kit.name=Fat Man Kit
item.mask_of_infamy.name=Maske der Schande item.mask_of_infamy.name=Maske der Schande
@ -1494,6 +1495,7 @@ item.powder_quartz.name=Quarzstaub
item.powder_red_copper.name=Roter Kupfer Staub item.powder_red_copper.name=Roter Kupfer Staub
item.powder_reiium.name=Reiiumstaub item.powder_reiium.name=Reiiumstaub
item.powder_schrabidium.name=Schrabidiumstaub item.powder_schrabidium.name=Schrabidiumstaub
item.powder_semtex_mix.name=Semtexmischung
item.powder_spark_mix.name=Sparkmischung item.powder_spark_mix.name=Sparkmischung
item.powder_steel.name=Stahlstaub item.powder_steel.name=Stahlstaub
item.powder_strontium.name=Strontiumstaub item.powder_strontium.name=Strontiumstaub

View File

@ -861,8 +861,8 @@ item.fuse.name=Fuse
item.fusion_core.name=Fusion Core item.fusion_core.name=Fusion Core
item.fusion_core_infinite.name=Infinite Fusion Core item.fusion_core_infinite.name=Infinite Fusion Core
item.gadget_core.name=Plutonium Core item.gadget_core.name=Plutonium Core
item.gadget_explosive.name=Propellant item.gadget_explosive.name=First Generation Explosive Lens
item.gadget_explosive8.name=Bundle of Propellant item.gadget_explosive8.name=Bundle of First Generation Implosion Propellant
item.gadget_kit.name=The Gadget Kit item.gadget_kit.name=The Gadget Kit
item.gadget_wireing.name=Wiring item.gadget_wireing.name=Wiring
item.gas_biogas.name=Biogas Tank item.gas_biogas.name=Biogas Tank
@ -1097,6 +1097,7 @@ item.ingot_saturnite.name=Saturnite Ingot
item.ingot_schrabidium.name=Schrabidium Ingot item.ingot_schrabidium.name=Schrabidium Ingot
item.ingot_schrabidium_fuel.name=Ingot of Schrabidium Fuel item.ingot_schrabidium_fuel.name=Ingot of Schrabidium Fuel
item.ingot_schraranium.name=Schraranium Ingot item.ingot_schraranium.name=Schraranium Ingot
item.ingot_semtex.name=Bar of Semtex
item.ingot_solinium.name=Solinium Ingot item.ingot_solinium.name=Solinium Ingot
item.ingot_starmetal.name=§9Starmetal Ingot§r item.ingot_starmetal.name=§9Starmetal Ingot§r
item.ingot_steel.name=Steel Ingot item.ingot_steel.name=Steel Ingot
@ -1140,8 +1141,8 @@ item.magnet_circular.name=Flat Magnet
item.magnet_dee.name=Dee Magnets item.magnet_dee.name=Dee Magnets
item.magnetron.name=Magnetron item.magnetron.name=Magnetron
item.man_core.name=Plutonium Core item.man_core.name=Plutonium Core
item.man_explosive.name=Propellant item.man_explosive.name=Explosive Lens
item.man_explosive8.name=Bundle of Propellant item.man_explosive8.name=Bundle of Implosion Propellant
item.man_igniter.name=Bomb Igniter item.man_igniter.name=Bomb Igniter
item.man_kit.name=Fat Man Kit item.man_kit.name=Fat Man Kit
item.mask_of_infamy.name=Mask of Infamy item.mask_of_infamy.name=Mask of Infamy
@ -1494,6 +1495,7 @@ item.powder_quartz.name=Quartz Powder
item.powder_red_copper.name=Red Copper Powder item.powder_red_copper.name=Red Copper Powder
item.powder_reiium.name=Reiium Powder item.powder_reiium.name=Reiium Powder
item.powder_schrabidium.name=Schrabidium Powder item.powder_schrabidium.name=Schrabidium Powder
item.powder_semtex_mix.name=Semtex Blend
item.powder_spark_mix.name=Spark Blend item.powder_spark_mix.name=Spark Blend
item.powder_steel.name=Steel Powder item.powder_steel.name=Steel Powder
item.powder_strontium.name=Strontium Powder item.powder_strontium.name=Strontium Powder

View File

@ -1,29 +1,24 @@
package com.hbm.inventory; package com.hbm.inventory;
import java.io.File; import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader; import java.io.FileReader;
import java.io.IOException;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import java.util.Collection; import java.util.Collections;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map.Entry;
import com.google.gson.Gson; import com.google.gson.Gson;
import com.google.gson.JsonArray; import com.google.gson.JsonArray;
import com.google.gson.JsonElement; import com.google.gson.JsonElement;
import com.google.gson.JsonIOException;
import com.google.gson.JsonObject; import com.google.gson.JsonObject;
import com.google.gson.JsonPrimitive;
import com.google.gson.JsonSyntaxException;
import com.hbm.interfaces.Untested; import com.hbm.interfaces.Untested;
import com.hbm.inventory.RecipesCommon.ComparableStack; import com.hbm.inventory.RecipesCommon.ComparableStack;
import com.hbm.inventory.RecipesCommon.OreDictStack; import com.hbm.inventory.RecipesCommon.OreDictStack;
import com.hbm.items.ModItems;
import com.hbm.main.MainRegistry; import com.hbm.main.MainRegistry;
import net.minecraft.block.Block; import net.minecraft.init.Items;
import net.minecraft.item.Item; import net.minecraft.item.Item;
import net.minecraftforge.oredict.OreDictionary; import net.minecraftforge.oredict.OreDictionary;
@ -35,6 +30,7 @@ public class AssemblerRecipes {
private static final Gson gson = new Gson(); private static final Gson gson = new Gson();
public static HashMap<ComparableStack, Object[]> recipes = new HashMap(); public static HashMap<ComparableStack, Object[]> recipes = new HashMap();
public static HashMap<ComparableStack, Integer> time = new HashMap(); public static HashMap<ComparableStack, Integer> time = new HashMap();
public static List<ComparableStack> recipeList = new ArrayList();
/** /**
* Pre-Init phase: Finds the recipe config (if exists) and checks if a template is present, if not it generates one. * Pre-Init phase: Finds the recipe config (if exists) and checks if a template is present, if not it generates one.
@ -71,10 +67,52 @@ public class AssemblerRecipes {
registerDefaults(); registerDefaults();
else else
loadJSONRecipes(); loadJSONRecipes();
generateList();
} }
private static void registerDefaults() { /**
* Generates an ordered list of outputs, used by the template item to generate subitems
*/
private static void generateList() {
List<ComparableStack> list = new ArrayList(recipes.keySet());
Collections.sort(list);
recipeList = list;
}
/**
* Registers regular recipes if there's no custom confiuration
*/
private static void registerDefaults() {
makeRecipe(new ComparableStack(ModItems.plate_iron, 2),
new Object[] {new OreDictStack("ingotIron", 3)},
20);
makeRecipe(new ComparableStack(ModItems.plate_gold, 2),
new Object[] {new OreDictStack("ingotGold", 3)},
20);
makeRecipe(new ComparableStack(ModItems.plate_titanium, 2),
new Object[] {new OreDictStack("ingotTitanium", 3)},
20);
makeRecipe(new ComparableStack(ModItems.plate_aluminium, 2),
new Object[] {new OreDictStack("ingotAluminum", 3)},
20);
makeRecipe(new ComparableStack(ModItems.plate_steel, 2),
new Object[] {new OreDictStack("ingotSteel", 3)},
20);
makeRecipe(new ComparableStack(ModItems.plate_lead, 2),
new Object[] {new OreDictStack("ingotLead", 3)},
20);
makeRecipe(new ComparableStack(ModItems.asbestos_cloth, 4),
new Object[] {new OreDictStack("ingotAsbestos", 2), new ComparableStack(Items.string, 6)},
20);
}
private static void makeRecipe(ComparableStack out, Object[] in, int duration) {
recipes.put(out, in);
time.put(out, duration);
} }
/* /*

View File

@ -41,20 +41,24 @@ public class CrystallizerRecipes {
recipes.put("oreBeryllium", new ItemStack(ModItems.crystal_beryllium)); recipes.put("oreBeryllium", new ItemStack(ModItems.crystal_beryllium));
recipes.put("oreLead", new ItemStack(ModItems.crystal_lead)); recipes.put("oreLead", new ItemStack(ModItems.crystal_lead));
recipes.put("oreSchrabidium", new ItemStack(ModItems.crystal_schrabidium)); recipes.put("oreSchrabidium", new ItemStack(ModItems.crystal_schrabidium));
recipes.put("oreLithium", new ItemStack(ModItems.crystal_lithium));
recipes.put("oreStarmetal", new ItemStack(ModItems.crystal_starmetal));
recipes.put(new ComparableStack(ModBlocks.ore_rare), new ItemStack(ModItems.crystal_rare)); recipes.put(new ComparableStack(ModBlocks.ore_rare), new ItemStack(ModItems.crystal_rare));
recipes.put(new ComparableStack(ModBlocks.ore_nether_fire), new ItemStack(ModItems.crystal_phosphorus)); recipes.put(new ComparableStack(ModBlocks.ore_nether_fire), new ItemStack(ModItems.crystal_phosphorus));
recipes.put(new ComparableStack(ModBlocks.ore_tikite), new ItemStack(ModItems.crystal_trixite)); recipes.put(new ComparableStack(ModBlocks.ore_tikite), new ItemStack(ModItems.crystal_trixite));
recipes.put("oreLithium", new ItemStack(ModItems.crystal_lithium)); recipes.put(new ComparableStack(ModBlocks.gravel_diamond), new ItemStack(ModItems.crystal_diamond));
recipes.put("oreStarmetal", new ItemStack(ModItems.crystal_starmetal)); recipes.put(new ComparableStack(ModItems.ingot_schraranium), new ItemStack(ModItems.crystal_schraranium));
recipes.put("sand", new ItemStack(ModItems.ingot_fiberglass)); recipes.put("sand", new ItemStack(ModItems.ingot_fiberglass));
recipes.put(new ComparableStack(Blocks.cobblestone), new ItemStack(ModBlocks.reinforced_stone)); recipes.put(new ComparableStack(Blocks.cobblestone), new ItemStack(ModBlocks.reinforced_stone));
recipes.put(new ComparableStack(ModBlocks.gravel_obsidian), new ItemStack(ModBlocks.brick_obsidian)); recipes.put(new ComparableStack(ModBlocks.gravel_obsidian), new ItemStack(ModBlocks.brick_obsidian));
recipes.put("blockRedstone", new ItemStack(ModItems.nugget_mercury)); recipes.put("blockRedstone", new ItemStack(ModItems.nugget_mercury));
recipes.put(new ComparableStack(ModBlocks.gravel_diamond), new ItemStack(ModItems.crystal_diamond));
recipes.put(new ComparableStack(ModItems.powder_diamond), new ItemStack(Items.diamond)); recipes.put(new ComparableStack(ModItems.powder_diamond), new ItemStack(Items.diamond));
recipes.put(new ComparableStack(ModItems.powder_emerald), new ItemStack(Items.emerald)); recipes.put(new ComparableStack(ModItems.powder_emerald), new ItemStack(Items.emerald));
recipes.put(new ComparableStack(ModItems.powder_lapis), new ItemStack(Items.dye, 1, 4)); recipes.put(new ComparableStack(ModItems.powder_lapis), new ItemStack(Items.dye, 1, 4));
recipes.put(new ComparableStack(ModItems.ingot_schraranium), new ItemStack(ModItems.crystal_schraranium)); recipes.put(new ComparableStack(ModItems.powder_semtex_mix), new ItemStack(ModItems.ingot_semtex));
} }
public static ItemStack getOutput(ItemStack stack) { public static ItemStack getOutput(ItemStack stack) {

View File

@ -39,7 +39,7 @@ public class RecipesCommon {
return clone; return clone;
} }
public static class ComparableStack { public static class ComparableStack implements Comparable<ComparableStack> {
Item item; Item item;
int stacksize; int stacksize;
@ -130,6 +130,21 @@ public class RecipesCommon {
return false; return false;
return true; return true;
} }
@Override
public int compareTo(ComparableStack comp) {
int thisID = Item.getIdFromItem(item);
int thatID = Item.getIdFromItem(comp.item);
if(thisID > thatID)
return 1;
if(thatID > thisID)
return -1;
return 0;
}
} }
public static class OreDictStack { public static class OreDictStack {

View File

@ -75,7 +75,8 @@ private TileEntityNukeCustom nukeBoy;
return null; return null;
} }
} else { } else {
return null; if (!this.mergeItemStack(var5, 0, 27, true))
return null;
} }
if (var5.stackSize == 0) if (var5.stackSize == 0)

View File

@ -138,6 +138,7 @@ public class ModItems {
public static Item ingot_solinium; public static Item ingot_solinium;
public static Item nugget_solinium; public static Item nugget_solinium;
public static Item ingot_phosphorus; public static Item ingot_phosphorus;
public static Item ingot_semtex;
public static Item ingot_australium; public static Item ingot_australium;
public static Item ingot_weidanium; public static Item ingot_weidanium;
@ -323,6 +324,7 @@ public class ModItems {
public static Item powder_lanthanium; public static Item powder_lanthanium;
public static Item powder_actinium; public static Item powder_actinium;
public static Item powder_desh; public static Item powder_desh;
public static Item powder_semtex_mix;
public static Item powder_desh_mix; public static Item powder_desh_mix;
public static Item powder_nitan_mix; public static Item powder_nitan_mix;
public static Item powder_spark_mix; public static Item powder_spark_mix;
@ -2021,6 +2023,7 @@ public class ModItems {
plate_gold = new Item().setUnlocalizedName("plate_gold").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":plate_gold"); plate_gold = new Item().setUnlocalizedName("plate_gold").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":plate_gold");
plate_advanced_alloy = new Item().setUnlocalizedName("plate_advanced_alloy").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":plate_advanced_alloy"); plate_advanced_alloy = new Item().setUnlocalizedName("plate_advanced_alloy").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":plate_advanced_alloy");
lithium = new Item().setUnlocalizedName("lithium").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":lithium"); lithium = new Item().setUnlocalizedName("lithium").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":lithium");
ingot_semtex = new ItemLemon(4, 5, true).setUnlocalizedName("ingot_semtex").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":ingot_semtex");
ingot_phosphorus = new ItemRadioactive(0F, true).setUnlocalizedName("ingot_phosphorus").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":ingot_phosphorus"); ingot_phosphorus = new ItemRadioactive(0F, true).setUnlocalizedName("ingot_phosphorus").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":ingot_phosphorus");
wire_advanced_alloy = new Item().setUnlocalizedName("wire_advanced_alloy").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":wire_advanced_alloy"); wire_advanced_alloy = new Item().setUnlocalizedName("wire_advanced_alloy").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":wire_advanced_alloy");
coil_advanced_alloy = new Item().setUnlocalizedName("coil_advanced_alloy").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":coil_advanced_alloy"); coil_advanced_alloy = new Item().setUnlocalizedName("coil_advanced_alloy").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":coil_advanced_alloy");
@ -2191,6 +2194,7 @@ public class ModItems {
powder_meteorite = new Item().setUnlocalizedName("powder_meteorite").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":powder_meteorite"); powder_meteorite = new Item().setUnlocalizedName("powder_meteorite").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":powder_meteorite");
powder_lanthanium = new ItemCustomLore().setUnlocalizedName("powder_lanthanium").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":powder_lanthanium"); powder_lanthanium = new ItemCustomLore().setUnlocalizedName("powder_lanthanium").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":powder_lanthanium");
powder_actinium = new ItemCustomLore().setUnlocalizedName("powder_actinium").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":powder_actinium"); powder_actinium = new ItemCustomLore().setUnlocalizedName("powder_actinium").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":powder_actinium");
powder_semtex_mix = new Item().setUnlocalizedName("powder_semtex_mix").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":powder_semtex_mix");
powder_desh_mix = new Item().setUnlocalizedName("powder_desh_mix").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":powder_desh_mix"); powder_desh_mix = new Item().setUnlocalizedName("powder_desh_mix").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":powder_desh_mix");
powder_nitan_mix = new Item().setUnlocalizedName("powder_nitan_mix").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":powder_nitan_mix"); powder_nitan_mix = new Item().setUnlocalizedName("powder_nitan_mix").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":powder_nitan_mix");
powder_spark_mix = new Item().setUnlocalizedName("powder_spark_mix").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":powder_spark_mix"); powder_spark_mix = new Item().setUnlocalizedName("powder_spark_mix").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":powder_spark_mix");
@ -4003,6 +4007,7 @@ public class ModItems {
//Dusts & Other //Dusts & Other
GameRegistry.registerItem(ingot_phosphorus, ingot_phosphorus.getUnlocalizedName()); GameRegistry.registerItem(ingot_phosphorus, ingot_phosphorus.getUnlocalizedName());
GameRegistry.registerItem(lithium, lithium.getUnlocalizedName()); GameRegistry.registerItem(lithium, lithium.getUnlocalizedName());
GameRegistry.registerItem(ingot_semtex, ingot_semtex.getUnlocalizedName());
GameRegistry.registerItem(solid_fuel, solid_fuel.getUnlocalizedName()); GameRegistry.registerItem(solid_fuel, solid_fuel.getUnlocalizedName());
GameRegistry.registerItem(rocket_fuel, rocket_fuel.getUnlocalizedName()); GameRegistry.registerItem(rocket_fuel, rocket_fuel.getUnlocalizedName());
GameRegistry.registerItem(ingot_fiberglass, ingot_fiberglass.getUnlocalizedName()); GameRegistry.registerItem(ingot_fiberglass, ingot_fiberglass.getUnlocalizedName());
@ -4065,6 +4070,7 @@ public class ModItems {
GameRegistry.registerItem(powder_asbestos, powder_asbestos.getUnlocalizedName()); GameRegistry.registerItem(powder_asbestos, powder_asbestos.getUnlocalizedName());
GameRegistry.registerItem(powder_magic, powder_magic.getUnlocalizedName()); GameRegistry.registerItem(powder_magic, powder_magic.getUnlocalizedName());
GameRegistry.registerItem(powder_cloud, powder_cloud.getUnlocalizedName()); GameRegistry.registerItem(powder_cloud, powder_cloud.getUnlocalizedName());
GameRegistry.registerItem(powder_semtex_mix, powder_semtex_mix.getUnlocalizedName());
GameRegistry.registerItem(powder_desh_mix, powder_desh_mix.getUnlocalizedName()); GameRegistry.registerItem(powder_desh_mix, powder_desh_mix.getUnlocalizedName());
GameRegistry.registerItem(powder_desh, powder_desh.getUnlocalizedName()); GameRegistry.registerItem(powder_desh, powder_desh.getUnlocalizedName());
GameRegistry.registerItem(powder_nitan_mix, powder_nitan_mix.getUnlocalizedName()); GameRegistry.registerItem(powder_nitan_mix, powder_nitan_mix.getUnlocalizedName());

View File

@ -202,6 +202,12 @@ public class ItemLemon extends ItemFood {
list.add("What if he didn't?"); list.add("What if he didn't?");
list.add("What if the world was made of pudding?"); list.add("What if the world was made of pudding?");
} }
if(this == ModItems.ingot_semtex) {
list.add("Semtex H Plastic Explosive");
list.add("Performant explosive for many applications.");
list.add("Edible");
}
} }

View File

@ -1,10 +1,15 @@
package com.hbm.items.machine; package com.hbm.items.machine;
import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import java.util.List; import java.util.List;
import java.util.Random;
import com.hbm.blocks.ModBlocks; import com.hbm.blocks.ModBlocks;
import com.hbm.interfaces.Spaghetti; import com.hbm.interfaces.Spaghetti;
import com.hbm.inventory.MachineRecipes; import com.hbm.inventory.AssemblerRecipes;
import com.hbm.inventory.RecipesCommon.ComparableStack;
import com.hbm.inventory.RecipesCommon.OreDictStack;
import com.hbm.items.ModItems; import com.hbm.items.ModItems;
import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.Side;
@ -16,6 +21,7 @@ import net.minecraft.init.Items;
import net.minecraft.item.Item; import net.minecraft.item.Item;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.util.StatCollector; import net.minecraft.util.StatCollector;
import net.minecraftforge.oredict.OreDictionary;
@Spaghetti("death") @Spaghetti("death")
public class ItemAssemblyTemplate extends Item { public class ItemAssemblyTemplate extends Item {
@ -733,7 +739,7 @@ public class ItemAssemblyTemplate extends Item {
public String getItemStackDisplayName(ItemStack stack) public String getItemStackDisplayName(ItemStack stack)
{ {
String s = ("" + StatCollector.translateToLocal(this.getUnlocalizedName() + ".name")).trim(); String s = ("" + StatCollector.translateToLocal(this.getUnlocalizedName() + ".name")).trim();
ItemStack out = MachineRecipes.getOutputFromTempate(stack); ItemStack out = stack.getItemDamage() < AssemblerRecipes.recipeList.size() ? AssemblerRecipes.recipeList.get(stack.getItemDamage()).toStack() : null;
String s1 = ("" + StatCollector.translateToLocal((out != null ? out.getUnlocalizedName() : "") + ".name")).trim(); String s1 = ("" + StatCollector.translateToLocal((out != null ? out.getUnlocalizedName() : "") + ".name")).trim();
if (s1 != null) if (s1 != null)
@ -746,12 +752,13 @@ public class ItemAssemblyTemplate extends Item {
@Override @Override
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public void getSubItems(Item item, CreativeTabs tabs, List list) public void getSubItems(Item item, CreativeTabs tabs, List list) {
{
for (int i = 0; i < EnumAssemblyTemplate.values().length; ++i) int count = AssemblerRecipes.recipeList.size();
{
for(int i = 0; i < count; i++) {
list.add(new ItemStack(item, 1, i)); list.add(new ItemStack(item, 1, i));
} }
} }
public static int getProcessTime(ItemStack stack) { public static int getProcessTime(ItemStack stack) {
@ -759,7 +766,20 @@ public class ItemAssemblyTemplate extends Item {
if(!(stack.getItem() instanceof ItemAssemblyTemplate)) if(!(stack.getItem() instanceof ItemAssemblyTemplate))
return 100; return 100;
int i = stack.getItemDamage(); int i = stack.getItemDamage();
if(i < 0 || i >= AssemblerRecipes.recipeList.size())
return 100;
ComparableStack out = AssemblerRecipes.recipeList.get(i);
Integer time = AssemblerRecipes.time.get(out);
if(time != null)
return time;
else
return 100;
/*int i = stack.getItemDamage();
EnumAssemblyTemplate enum1 = EnumAssemblyTemplate.getEnum(i); EnumAssemblyTemplate enum1 = EnumAssemblyTemplate.getEnum(i);
if(enum1.time != 0) if(enum1.time != 0)
@ -1108,7 +1128,7 @@ public class ItemAssemblyTemplate extends Item {
return 150; return 150;
case LR_CORE: case LR_CORE:
return 250;*/ return 250;*/
case LF_MAGNET: /*case LF_MAGNET:
return 150; return 150;
case LF_CENTER: case LF_CENTER:
return 200; return 200;
@ -1312,37 +1332,63 @@ public class ItemAssemblyTemplate extends Item {
return 1000; return 1000;
default: default:
return 100; return 100;
} }*/
} }
@Override @Override
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean bool) public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean bool) {
{
if(!(stack.getItem() instanceof ItemAssemblyTemplate)) if(!(stack.getItem() instanceof ItemAssemblyTemplate))
return; return;
List<ItemStack> stacks = MachineRecipes.getRecipeFromTempate(stack);
ItemStack out = MachineRecipes.getOutputFromTempate(stack);
list.add("[CREATED USING TEMPLATE FOLDER]");
list.add("");
try {
list.add("Output:");
list.add(out.stackSize + "x " + out.getDisplayName());
list.add("Inputs:");
for(int i = 0; i < stacks.size(); i++) { int i = stack.getItemDamage();
if(stacks.get(i) != null)
list.add(stacks.get(i).stackSize + "x " + stacks.get(i).getDisplayName()); if(i < 0 || i >= AssemblerRecipes.recipeList.size()) {
} list.add("I AM ERROR");
list.add("Production time:"); return;
list.add(Math.floor((float)(getProcessTime(stack)) / 20 * 100) / 100 + " seconds");
} catch(Exception e) {
list.add("###INVALID###");
list.add("0x334077-0x6A298F-0xDF3795-0x334077");
} }
ComparableStack out = AssemblerRecipes.recipeList.get(i);
if(out == null) {
list.add("I AM ERROR");
return;
}
Object[] in = AssemblerRecipes.recipes.get(out);
if(in == null) {
list.add("I AM ERROR");
return;
}
ItemStack output = out.toStack();
list.add("Output:");
list.add(output.stackSize + "x " + output.getDisplayName());
list.add("Inputs:");
Random rand = new Random(System.currentTimeMillis() / 1000);
for(Object o : in) {
if(o instanceof ComparableStack) {
ItemStack input = ((ComparableStack)o).toStack();
list.add(input.stackSize + "x " + input.getDisplayName());
} else if(o instanceof OreDictStack) {
OreDictStack input = (OreDictStack) o;
ArrayList<ItemStack> ores = OreDictionary.getOres(input.name);
if(ores.size() > 0) {
ItemStack inStack = ores.get(rand.nextInt(ores.size()));
list.add(inStack.stackSize + "x " + inStack.getDisplayName());
}
}
}
list.add("Production time:");
list.add(Math.floor((float)(getProcessTime(stack)) / 20 * 100) / 100 + " seconds");
} }
/*@Override /*@Override

View File

@ -58,8 +58,6 @@ public class CraftingManager {
GameRegistry.addShapelessRecipe(new ItemStack(ModItems.circuit_gold, 2), new Object[] { ModItems.circuit_targeting_tier4 }); GameRegistry.addShapelessRecipe(new ItemStack(ModItems.circuit_gold, 2), new Object[] { ModItems.circuit_targeting_tier4 });
GameRegistry.addShapelessRecipe(new ItemStack(ModItems.circuit_schrabidium, 2), new Object[] { ModItems.circuit_targeting_tier5 }); GameRegistry.addShapelessRecipe(new ItemStack(ModItems.circuit_schrabidium, 2), new Object[] { ModItems.circuit_targeting_tier5 });
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(Items.gunpowder, 3), new Object[] { "sulfur", "saltpeter", Items.coal }));
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(Items.gunpowder, 3), new Object[] { "sulfur", "saltpeter", new ItemStack(Items.coal, 1, 1) }));
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(Items.gunpowder, 3), new Object[] { "dustSulfur", "dustSaltpeter", Items.coal })); GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(Items.gunpowder, 3), new Object[] { "dustSulfur", "dustSaltpeter", Items.coal }));
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(Items.gunpowder, 3), new Object[] { "dustSulfur", "dustSaltpeter", new ItemStack(Items.coal, 1, 1) })); GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(Items.gunpowder, 3), new Object[] { "dustSulfur", "dustSaltpeter", new ItemStack(Items.coal, 1, 1) }));
@ -823,6 +821,8 @@ public class CraftingManager {
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.ammo_4gauge_slug, 12), new Object[] { " I ", "GCL", " P ", 'I', "ingotLead", 'G', ModItems.ballistite, 'C', ModItems.casing_50, 'P', ModItems.primer_50, 'L', ModItems.plate_polymer })); GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.ammo_4gauge_slug, 12), new Object[] { " I ", "GCL", " P ", 'I', "ingotLead", 'G', ModItems.ballistite, 'C', ModItems.casing_50, 'P', ModItems.primer_50, 'L', ModItems.plate_polymer }));
GameRegistry.addRecipe(new ItemStack(ModItems.ammo_4gauge_explosive, 4), new Object[] { " I ", "GCL", " P ", 'I', Blocks.tnt, 'G', ModItems.cordite, 'C', ModItems.casing_50, 'P', ModItems.primer_50, 'L', ModItems.plate_polymer }); GameRegistry.addRecipe(new ItemStack(ModItems.ammo_4gauge_explosive, 4), new Object[] { " I ", "GCL", " P ", 'I', Blocks.tnt, 'G', ModItems.cordite, 'C', ModItems.casing_50, 'P', ModItems.primer_50, 'L', ModItems.plate_polymer });
GameRegistry.addRecipe(new ItemStack(ModItems.ammo_4gauge_explosive, 4), new Object[] { " I ", "GCL", " P ", 'I', Blocks.tnt, 'G', ModItems.ballistite, 'C', ModItems.casing_50, 'P', ModItems.primer_50, 'L', ModItems.plate_polymer }); GameRegistry.addRecipe(new ItemStack(ModItems.ammo_4gauge_explosive, 4), new Object[] { " I ", "GCL", " P ", 'I', Blocks.tnt, 'G', ModItems.ballistite, 'C', ModItems.casing_50, 'P', ModItems.primer_50, 'L', ModItems.plate_polymer });
GameRegistry.addRecipe(new ItemStack(ModItems.ammo_4gauge_explosive, 6), new Object[] { " I ", "GCL", " P ", 'I', ModItems.ingot_semtex, 'G', ModItems.cordite, 'C', ModItems.casing_50, 'P', ModItems.primer_50, 'L', ModItems.plate_polymer });
GameRegistry.addRecipe(new ItemStack(ModItems.ammo_4gauge_explosive, 6), new Object[] { " I ", "GCL", " P ", 'I', ModItems.ingot_semtex, 'G', ModItems.ballistite, 'C', ModItems.casing_50, 'P', ModItems.primer_50, 'L', ModItems.plate_polymer });
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.ammo_20gauge, 12), new Object[] { " I ", "GCL", " P ", 'I', ModItems.pellet_buckshot, 'G', ModItems.cordite, 'C', ModItems.casing_buckshot, 'P', ModItems.primer_buckshot, 'L', "plateCopper" })); GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.ammo_20gauge, 12), new Object[] { " I ", "GCL", " P ", 'I', ModItems.pellet_buckshot, 'G', ModItems.cordite, 'C', ModItems.casing_buckshot, 'P', ModItems.primer_buckshot, 'L', "plateCopper" }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.ammo_20gauge, 12), new Object[] { " I ", "GCL", " P ", 'I', ModItems.pellet_buckshot, 'G', ModItems.ballistite, 'C', ModItems.casing_buckshot, 'P', ModItems.primer_buckshot, 'L', "plateCopper" })); GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.ammo_20gauge, 12), new Object[] { " I ", "GCL", " P ", 'I', ModItems.pellet_buckshot, 'G', ModItems.ballistite, 'C', ModItems.casing_buckshot, 'P', ModItems.primer_buckshot, 'L', "plateCopper" }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.ammo_20gauge_slug, 12), new Object[] { " I ", "GCL", " P ", 'I', "ingotLead", 'G', ModItems.cordite, 'C', ModItems.casing_buckshot, 'P', ModItems.primer_buckshot, 'L', "plateCopper" })); GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.ammo_20gauge_slug, 12), new Object[] { " I ", "GCL", " P ", 'I', "ingotLead", 'G', ModItems.cordite, 'C', ModItems.casing_buckshot, 'P', ModItems.primer_buckshot, 'L', "plateCopper" }));
@ -853,7 +853,7 @@ public class CraftingManager {
GameRegistry.addRecipe(new ItemStack(ModItems.ammo_44_pip, 1), new Object[] { " B ", "BAB", " B ", 'A', ModItems.ammo_44, 'B', ModItems.powder_magic }); GameRegistry.addRecipe(new ItemStack(ModItems.ammo_44_pip, 1), new Object[] { " B ", "BAB", " B ", 'A', ModItems.ammo_44, 'B', ModItems.powder_magic });
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.ammo_44_bj, 1), new Object[] { " C ", "BAB", " C ", 'A', ModItems.ammo_44, 'B', ModItems.powder_magic, 'C', "dustDesh" })); GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.ammo_44_bj, 1), new Object[] { " C ", "BAB", " C ", 'A', ModItems.ammo_44, 'B', ModItems.powder_magic, 'C', "dustDesh" }));
GameRegistry.addRecipe(new ItemStack(ModItems.ammo_44_silver, 1), new Object[] { " C ", "BAB", " C ", 'A', ModItems.ammo_44, 'B', ModItems.powder_magic, 'C', ModItems.ingot_starmetal }); GameRegistry.addRecipe(new ItemStack(ModItems.ammo_44_silver, 1), new Object[] { " C ", "BAB", " C ", 'A', ModItems.ammo_44, 'B', ModItems.powder_magic, 'C', ModItems.ingot_starmetal });
GameRegistry.addRecipe(new ItemStack(ModItems.ammo_5mm_explosive, 8), new Object[] { "BBB", "BAB", "BBB", 'B', ModItems.ammo_5mm, 'A', Blocks.tnt }); GameRegistry.addRecipe(new ItemStack(ModItems.ammo_5mm_explosive, 8), new Object[] { "BBB", "BAB", "BBB", 'B', ModItems.ammo_5mm, 'A', ModItems.ingot_semtex });
GameRegistry.addRecipe(new ItemStack(ModItems.ammo_5mm_du, 8), new Object[] { "BBB", "BAB", "BBB", 'B', ModItems.ammo_5mm, 'A', ModItems.ingot_u238 }); GameRegistry.addRecipe(new ItemStack(ModItems.ammo_5mm_du, 8), new Object[] { "BBB", "BAB", "BBB", 'B', ModItems.ammo_5mm, 'A', ModItems.ingot_u238 });
GameRegistry.addRecipe(new ItemStack(ModItems.ammo_5mm_star, 4), new Object[] { " B ", "BAB", " B ", 'B', ModItems.ammo_5mm_du, 'A', ModItems.ingot_starmetal }); GameRegistry.addRecipe(new ItemStack(ModItems.ammo_5mm_star, 4), new Object[] { " B ", "BAB", " B ", 'B', ModItems.ammo_5mm_du, 'A', ModItems.ingot_starmetal });
GameRegistry.addRecipe(new ItemStack(ModItems.ammo_9mm_ap, 8), new Object[] { "BBB", "BAB", "BBB", 'B', ModItems.ammo_9mm, 'A', ModItems.ingot_dura_steel }); GameRegistry.addRecipe(new ItemStack(ModItems.ammo_9mm_ap, 8), new Object[] { "BBB", "BAB", "BBB", 'B', ModItems.ammo_9mm, 'A', ModItems.ingot_dura_steel });
@ -861,7 +861,7 @@ public class CraftingManager {
GameRegistry.addRecipe(new ItemStack(ModItems.ammo_22lr_ap, 8), new Object[] { "BBB", "BAB", "BBB", 'B', ModItems.ammo_22lr, 'A', ModItems.ingot_dura_steel }); GameRegistry.addRecipe(new ItemStack(ModItems.ammo_22lr_ap, 8), new Object[] { "BBB", "BAB", "BBB", 'B', ModItems.ammo_22lr, 'A', ModItems.ingot_dura_steel });
GameRegistry.addRecipe(new ItemStack(ModItems.ammo_50bmg_incendiary, 8), new Object[] { "BBB", "BAB", "BBB", 'B', ModItems.ammo_50bmg, 'A', ModItems.powder_fire }); GameRegistry.addRecipe(new ItemStack(ModItems.ammo_50bmg_incendiary, 8), new Object[] { "BBB", "BAB", "BBB", 'B', ModItems.ammo_50bmg, 'A', ModItems.powder_fire });
GameRegistry.addRecipe(new ItemStack(ModItems.ammo_50bmg_phosphorus, 8), new Object[] { "BBB", "BAB", "BBB", 'B', ModItems.ammo_50bmg, 'A', ModItems.ingot_phosphorus }); GameRegistry.addRecipe(new ItemStack(ModItems.ammo_50bmg_phosphorus, 8), new Object[] { "BBB", "BAB", "BBB", 'B', ModItems.ammo_50bmg, 'A', ModItems.ingot_phosphorus });
GameRegistry.addRecipe(new ItemStack(ModItems.ammo_50bmg_explosive, 8), new Object[] { "BBB", "BAB", "BBB", 'B', ModItems.ammo_50bmg, 'A', Blocks.tnt }); GameRegistry.addRecipe(new ItemStack(ModItems.ammo_50bmg_explosive, 8), new Object[] { "BBB", "BAB", "BBB", 'B', ModItems.ammo_50bmg, 'A', ModItems.ingot_semtex });
GameRegistry.addRecipe(new ItemStack(ModItems.ammo_50bmg_ap, 8), new Object[] { "BBB", "BAB", "BBB", 'B', ModItems.ammo_50bmg, 'A', ModItems.ingot_dura_steel }); GameRegistry.addRecipe(new ItemStack(ModItems.ammo_50bmg_ap, 8), new Object[] { "BBB", "BAB", "BBB", 'B', ModItems.ammo_50bmg, 'A', ModItems.ingot_dura_steel });
GameRegistry.addRecipe(new ItemStack(ModItems.ammo_50bmg_du, 8), new Object[] { "BBB", "BAB", "BBB", 'B', ModItems.ammo_50bmg, 'A', ModItems.ingot_u238 }); GameRegistry.addRecipe(new ItemStack(ModItems.ammo_50bmg_du, 8), new Object[] { "BBB", "BAB", "BBB", 'B', ModItems.ammo_50bmg, 'A', ModItems.ingot_u238 });
GameRegistry.addRecipe(new ItemStack(ModItems.ammo_50bmg_star, 4), new Object[] { " B ", "BAB", " B ", 'B', ModItems.ammo_50bmg_du, 'A', ModItems.ingot_starmetal }); GameRegistry.addRecipe(new ItemStack(ModItems.ammo_50bmg_star, 4), new Object[] { " B ", "BAB", " B ", 'B', ModItems.ammo_50bmg_du, 'A', ModItems.ingot_starmetal });
@ -889,8 +889,9 @@ public class CraftingManager {
GameRegistry.addRecipe(new ItemStack(ModItems.ammo_folly_nuclear, 1), new Object[] { " B ", "EEE", " S ", 'B', ModItems.folly_bullet_nuclear, 'E', ModBlocks.det_charge, 'S', ModItems.folly_shell }); GameRegistry.addRecipe(new ItemStack(ModItems.ammo_folly_nuclear, 1), new Object[] { " B ", "EEE", " S ", 'B', ModItems.folly_bullet_nuclear, 'E', ModBlocks.det_charge, 'S', ModItems.folly_shell });
GameRegistry.addRecipe(new ItemStack(ModItems.ammo_folly_du, 1), new Object[] { " B ", "EEE", " S ", 'B', ModItems.folly_bullet_du, 'E', ModBlocks.det_charge, 'S', ModItems.folly_shell }); GameRegistry.addRecipe(new ItemStack(ModItems.ammo_folly_du, 1), new Object[] { " B ", "EEE", " S ", 'B', ModItems.folly_bullet_du, 'E', ModBlocks.det_charge, 'S', ModItems.folly_shell });
GameRegistry.addRecipe(new ItemStack(ModItems.ammo_rocket, 2), new Object[] { " T ", "GCG", " P ", 'T', Blocks.tnt, 'G', ModItems.rocket_fuel, 'C', ModItems.casing_50, 'P', ModItems.primer_50 }); GameRegistry.addRecipe(new ItemStack(ModItems.ammo_rocket, 1), new Object[] { " T ", "GCG", " P ", 'T', Blocks.tnt, 'G', ModItems.rocket_fuel, 'C', ModItems.casing_50, 'P', ModItems.primer_50 });
GameRegistry.addRecipe(new ItemStack(ModItems.ammo_rocket_he, 1), new Object[] { "G", "R", "G", 'G', Items.gunpowder, 'R', ModItems.ammo_rocket }); GameRegistry.addRecipe(new ItemStack(ModItems.ammo_rocket, 2), new Object[] { " T ", "GCG", " P ", 'T', ModItems.ingot_semtex, 'G', ModItems.rocket_fuel, 'C', ModItems.casing_50, 'P', ModItems.primer_50 });
GameRegistry.addRecipe(new ItemStack(ModItems.ammo_rocket_he, 1), new Object[] { "G", "R", 'G', ModItems.ingot_semtex, 'R', ModItems.ammo_rocket });
GameRegistry.addRecipe(new ItemStack(ModItems.ammo_rocket_incendiary, 1), new Object[] { "G", "R", 'G', ModItems.powder_fire, 'R', ModItems.ammo_rocket }); GameRegistry.addRecipe(new ItemStack(ModItems.ammo_rocket_incendiary, 1), new Object[] { "G", "R", 'G', ModItems.powder_fire, 'R', ModItems.ammo_rocket });
GameRegistry.addRecipe(new ItemStack(ModItems.ammo_rocket_phosphorus, 1), new Object[] { "G", "R", 'G', ModItems.ingot_phosphorus, 'R', ModItems.ammo_rocket }); GameRegistry.addRecipe(new ItemStack(ModItems.ammo_rocket_phosphorus, 1), new Object[] { "G", "R", 'G', ModItems.ingot_phosphorus, 'R', ModItems.ammo_rocket });
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.ammo_rocket_emp, 1), new Object[] { "G", "R", 'G', "dustDiamond", 'R', ModItems.ammo_rocket })); GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.ammo_rocket_emp, 1), new Object[] { "G", "R", 'G', "dustDiamond", 'R', ModItems.ammo_rocket }));
@ -906,7 +907,7 @@ public class CraftingManager {
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.ammo_grenade, 2), new Object[] { " T ", "GCI", " P ", 'T', Items.gunpowder, 'G', ModItems.ballistite, 'C', ModItems.casing_50, 'P', ModItems.primer_50, 'I', "plateIron" })); GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.ammo_grenade, 2), new Object[] { " T ", "GCI", " P ", 'T', Items.gunpowder, 'G', ModItems.ballistite, 'C', ModItems.casing_50, 'P', ModItems.primer_50, 'I', "plateIron" }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.ammo_grenade_tracer, 2), new Object[] { " T ", "GCI", " P ", 'T', "dustLapis", 'G', ModItems.cordite, 'C', ModItems.casing_50, 'P', ModItems.primer_50, 'I', "plateIron" })); GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.ammo_grenade_tracer, 2), new Object[] { " T ", "GCI", " P ", 'T', "dustLapis", 'G', ModItems.cordite, 'C', ModItems.casing_50, 'P', ModItems.primer_50, 'I', "plateIron" }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.ammo_grenade_tracer, 2), new Object[] { " T ", "GCI", " P ", 'T', "dustLapis", 'G', ModItems.ballistite, 'C', ModItems.casing_50, 'P', ModItems.primer_50, 'I', "plateIron" })); GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.ammo_grenade_tracer, 2), new Object[] { " T ", "GCI", " P ", 'T', "dustLapis", 'G', ModItems.ballistite, 'C', ModItems.casing_50, 'P', ModItems.primer_50, 'I', "plateIron" }));
GameRegistry.addRecipe(new ItemStack(ModItems.ammo_grenade_he, 2), new Object[] { "GIG", 'G', ModItems.ammo_grenade, 'I', Blocks.tnt }); GameRegistry.addRecipe(new ItemStack(ModItems.ammo_grenade_he, 2), new Object[] { "GIG", 'G', ModItems.ammo_grenade, 'I', ModItems.ingot_semtex });
GameRegistry.addRecipe(new ItemStack(ModItems.ammo_grenade_incendiary, 2), new Object[] { "GIG", 'G', ModItems.ammo_grenade, 'I', ModItems.powder_fire }); GameRegistry.addRecipe(new ItemStack(ModItems.ammo_grenade_incendiary, 2), new Object[] { "GIG", 'G', ModItems.ammo_grenade, 'I', ModItems.powder_fire });
GameRegistry.addRecipe(new ItemStack(ModItems.ammo_grenade_phosphorus, 2), new Object[] { "GIG", 'G', ModItems.ammo_grenade, 'I', ModItems.ingot_phosphorus }); GameRegistry.addRecipe(new ItemStack(ModItems.ammo_grenade_phosphorus, 2), new Object[] { "GIG", 'G', ModItems.ammo_grenade, 'I', ModItems.ingot_phosphorus });
GameRegistry.addRecipe(new ItemStack(ModItems.ammo_grenade_toxic, 2), new Object[] { "GIG", 'G', ModItems.ammo_grenade, 'I', ModItems.powder_poison }); GameRegistry.addRecipe(new ItemStack(ModItems.ammo_grenade_toxic, 2), new Object[] { "GIG", 'G', ModItems.ammo_grenade, 'I', ModItems.powder_poison });
@ -1076,9 +1077,10 @@ public class CraftingManager {
GameRegistry.addRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.flame_war), 1), new Object[] { "WHW", "CTP", "WOW", 'W', Item.getItemFromBlock(Blocks.planks), 'T', Item.getItemFromBlock(Blocks.tnt), 'H', ModItems.flame_pony, 'C', ModItems.flame_conspiracy, 'P', ModItems.flame_politics, 'O', ModItems.flame_opinion }); GameRegistry.addRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.flame_war), 1), new Object[] { "WHW", "CTP", "WOW", 'W', Item.getItemFromBlock(Blocks.planks), 'T', Item.getItemFromBlock(Blocks.tnt), 'H', ModItems.flame_pony, 'C', ModItems.flame_conspiracy, 'P', ModItems.flame_politics, 'O', ModItems.flame_opinion });
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.det_cord, 8), new Object[] { "TNT", "NGN", "TNT", 'T', "plateIron", 'N', "dustNiter", 'G', Items.gunpowder })); GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.det_cord, 8), new Object[] { "TNT", "NGN", "TNT", 'T', "plateIron", 'N', "dustNiter", 'G', Items.gunpowder }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.det_charge, 1), new Object[] { "PDP", "DTD", "PDP", 'P', "plateSteel", 'D', ModBlocks.det_cord, 'T', Blocks.tnt })); GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.det_charge, 1), new Object[] { "PDP", "DTD", "PDP", 'P', "plateSteel", 'D', ModBlocks.det_cord, 'T', ModItems.ingot_semtex }));
GameRegistry.addRecipe(new ItemStack(ModBlocks.det_nuke, 1), new Object[] { "PDP", "DCD", "PDP", 'P', ModItems.plate_desh, 'D', ModBlocks.det_charge, 'C', ModItems.man_core }); GameRegistry.addRecipe(new ItemStack(ModBlocks.det_nuke, 1), new Object[] { "PDP", "DCD", "PDP", 'P', ModItems.plate_desh, 'D', ModBlocks.det_charge, 'C', ModItems.man_core });
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.det_miner, 3), new Object[] { "FFF", "ITI", "ITI", 'F', Items.flint, 'I', "plateIron", 'T', Blocks.tnt })); GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.det_miner, 3), new Object[] { "FFF", "ITI", "ITI", 'F', Items.flint, 'I', "plateIron", 'T', Blocks.tnt }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.det_miner, 12), new Object[] { "FFF", "ITI", "ITI", 'F', Items.flint, 'I', "plateSteel", 'T', ModItems.ingot_semtex }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.emp_bomb), 1), new Object[] { "LML", "LCL", "LML", 'L', "plateLead", 'M', ModItems.magnetron, 'C', ModItems.circuit_gold })); GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.emp_bomb), 1), new Object[] { "LML", "LCL", "LML", 'L', "plateLead", 'M', ModItems.magnetron, 'C', ModItems.circuit_gold }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gadget_explosive8, 1), new Object[] { "EEE", "EPE", "EEE", 'E', ModItems.gadget_explosive, 'P', "plateAluminum" })); GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gadget_explosive8, 1), new Object[] { "EEE", "EPE", "EEE", 'E', ModItems.gadget_explosive, 'P', "plateAluminum" }));
@ -1305,6 +1307,7 @@ public class CraftingManager {
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModItems.powder_spark_mix, 5), new Object[] { "dustDesh", "dustEuphemium", ModItems.powder_meteorite, ModItems.powder_power, ModItems.powder_nitan_mix })); GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModItems.powder_spark_mix, 5), new Object[] { "dustDesh", "dustEuphemium", ModItems.powder_meteorite, ModItems.powder_power, ModItems.powder_nitan_mix }));
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModItems.powder_meteorite, 5), new Object[] { "dustIron", "dustCopper", "dustLithium", "dustTungsten", "dustUranium" })); GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModItems.powder_meteorite, 5), new Object[] { "dustIron", "dustCopper", "dustLithium", "dustTungsten", "dustUranium" }));
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModItems.powder_thermite, 4), new Object[] { "dustIron", "dustIron", "dustIron", "dustAluminum" })); GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModItems.powder_thermite, 4), new Object[] { "dustIron", "dustIron", "dustIron", "dustAluminum" }));
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModItems.powder_semtex_mix, 1), new Object[] { ModItems.rocket_fuel, ModItems.cordite, "dustSaltpeter" }));
GameRegistry.addRecipe(new ItemStack(ModItems.canister_petroil, 9), new Object[] { "RRR", "RLR", "RRR", 'R', ModItems.canister_reoil, 'L', ModItems.canister_canola }); GameRegistry.addRecipe(new ItemStack(ModItems.canister_petroil, 9), new Object[] { "RRR", "RLR", "RRR", 'R', ModItems.canister_reoil, 'L', ModItems.canister_canola });
@ -1425,8 +1428,8 @@ public class CraftingManager {
GameRegistry.addRecipe(new ItemStack(ModBlocks.vent_chlorine_seal), new Object[] { "ISI", "SCS", "ISI", 'I', ModItems.ingot_saturnite, 'S', ModItems.ingot_starmetal, 'C', ModItems.chlorine_pinwheel }); GameRegistry.addRecipe(new ItemStack(ModBlocks.vent_chlorine_seal), new Object[] { "ISI", "SCS", "ISI", 'I', ModItems.ingot_saturnite, 'S', ModItems.ingot_starmetal, 'C', ModItems.chlorine_pinwheel });
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.vent_cloud), new Object[] { "IGI", "ICI", "IDI", 'I', "plateIron", 'G', Blocks.iron_bars, 'C', ModItems.grenade_cloud, 'D', Blocks.dispenser })); GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.vent_cloud), new Object[] { "IGI", "ICI", "IDI", 'I', "plateIron", 'G', Blocks.iron_bars, 'C', ModItems.grenade_cloud, 'D', Blocks.dispenser }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.vent_pink_cloud), new Object[] { "IGI", "ICI", "IDI", 'I', "plateIron", 'G', Blocks.iron_bars, 'C', ModItems.grenade_pink_cloud, 'D', Blocks.dispenser })); GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.vent_pink_cloud), new Object[] { "IGI", "ICI", "IDI", 'I', "plateIron", 'G', Blocks.iron_bars, 'C', ModItems.grenade_pink_cloud, 'D', Blocks.dispenser }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.mine_ap, 4), new Object[] { "C", "P", "T", 'C', ModItems.circuit_targeting_tier2, 'P', "plateIron", 'T', Blocks.tnt })); GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.mine_ap, 4), new Object[] { "C", "P", "T", 'C', ModItems.circuit_targeting_tier2, 'P', "plateIron", 'T', ModItems.ingot_semtex }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.mine_he, 1), new Object[] { " C ", "PTP", 'C', ModItems.circuit_targeting_tier2, 'P', "plateSteel", 'T', Blocks.tnt })); GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.mine_he, 1), new Object[] { " C ", "PTP", 'C', ModItems.circuit_targeting_tier2, 'P', "plateSteel", 'T', ModItems.ingot_semtex }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.mine_shrap, 2), new Object[] { "LLL", " C ", "PTP", 'C', ModItems.circuit_targeting_tier2, 'P', "plateSteel", 'T', ModBlocks.det_cord, 'L', ModItems.pellet_buckshot })); GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.mine_shrap, 2), new Object[] { "LLL", " C ", "PTP", 'C', ModItems.circuit_targeting_tier2, 'P', "plateSteel", 'T', ModBlocks.det_cord, 'L', ModItems.pellet_buckshot }));
GameRegistry.addRecipe(new ItemStack(ModBlocks.mine_fat, 1), new Object[] { "CDN", 'C', ModItems.circuit_targeting_tier2, 'D', ModItems.ducttape, 'N', ModItems.gun_fatman_ammo }); GameRegistry.addRecipe(new ItemStack(ModBlocks.mine_fat, 1), new Object[] { "CDN", 'C', ModItems.circuit_targeting_tier2, 'D', ModItems.ducttape, 'N', ModItems.gun_fatman_ammo });
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.defuser, 1), new Object[] { " PS", "P P", " P ", 'P', "ingotPolymer", 'S', "plateSteel" })); GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.defuser, 1), new Object[] { " PS", "P P", " P ", 'P', "ingotPolymer", 'S', "plateSteel" }));

View File

@ -1071,6 +1071,7 @@ public class MainRegistry
CentrifugeRecipes.register(); CentrifugeRecipes.register();
BreederRecipes.registerFuels(); BreederRecipes.registerFuels();
BreederRecipes.registerRecipes(); BreederRecipes.registerRecipes();
AssemblerRecipes.loadRecipes();
TileEntityNukeCustom.registerBombItems(); TileEntityNukeCustom.registerBombItems();

View File

@ -184,6 +184,7 @@ public class TileEntityNukeCustom extends TileEntity implements ISidedInventory
entries.put(new ComparableStack(Items.gunpowder), new CustomNukeEntry(EnumBombType.TNT, 0.8F)); entries.put(new ComparableStack(Items.gunpowder), new CustomNukeEntry(EnumBombType.TNT, 0.8F));
entries.put(new ComparableStack(Blocks.tnt), new CustomNukeEntry(EnumBombType.TNT, 4F)); entries.put(new ComparableStack(Blocks.tnt), new CustomNukeEntry(EnumBombType.TNT, 4F));
entries.put(new ComparableStack(ModBlocks.det_cord), new CustomNukeEntry(EnumBombType.TNT, 1.5F)); entries.put(new ComparableStack(ModBlocks.det_cord), new CustomNukeEntry(EnumBombType.TNT, 1.5F));
entries.put(new ComparableStack(ModItems.ingot_semtex), new CustomNukeEntry(EnumBombType.TNT, 8F));
entries.put(new ComparableStack(ModBlocks.det_charge), new CustomNukeEntry(EnumBombType.TNT, 15F)); entries.put(new ComparableStack(ModBlocks.det_charge), new CustomNukeEntry(EnumBombType.TNT, 15F));
entries.put(new ComparableStack(ModItems.canister_fuel), new CustomNukeEntry(EnumBombType.TNT, 0.5F)); entries.put(new ComparableStack(ModItems.canister_fuel), new CustomNukeEntry(EnumBombType.TNT, 0.5F));
entries.put(new ComparableStack(ModItems.canister_napalm), new CustomNukeEntry(EnumBombType.TNT, 2.5F)); entries.put(new ComparableStack(ModItems.canister_napalm), new CustomNukeEntry(EnumBombType.TNT, 2.5F));