mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
new press recipe handler, desh stamps
This commit is contained in:
parent
77eefbb1a7
commit
47dec982ee
@ -47,7 +47,6 @@ public class AssemblerRecipeHandler extends TemplateRecipeHandler {
|
||||
|
||||
@Override
|
||||
public List<PositionedStack> getIngredients() {
|
||||
|
||||
return getCycledIngredients(cycleticks / 48, input);
|
||||
}
|
||||
|
||||
|
||||
@ -3,22 +3,33 @@ package com.hbm.handler.nei;
|
||||
import java.awt.Rectangle;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.hbm.interfaces.Untested;
|
||||
import com.hbm.inventory.RecipesCommon.AStack;
|
||||
import com.hbm.inventory.RecipesCommon.ComparableStack;
|
||||
import com.hbm.inventory.RecipesCommon.OreDictStack;
|
||||
import com.hbm.inventory.gui.GUIMachineEPress;
|
||||
import com.hbm.inventory.gui.GUIMachinePress;
|
||||
import com.hbm.inventory.recipes.MachineRecipes;
|
||||
import com.hbm.inventory.recipes.PressRecipes;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.machine.ItemStamp;
|
||||
import com.hbm.items.machine.ItemStamp.StampType;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.util.Tuple.Pair;
|
||||
|
||||
import codechicken.nei.NEIServerUtils;
|
||||
import codechicken.nei.PositionedStack;
|
||||
import codechicken.nei.recipe.TemplateRecipeHandler;
|
||||
import net.minecraft.client.gui.inventory.GuiContainer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
@Untested
|
||||
public class PressRecipeHandler extends TemplateRecipeHandler {
|
||||
|
||||
public LinkedList<RecipeTransferRect> transferRectsRec = new LinkedList<RecipeTransferRect>();
|
||||
@ -29,31 +40,17 @@ public class PressRecipeHandler extends TemplateRecipeHandler {
|
||||
public class SmeltingSet extends TemplateRecipeHandler.CachedRecipe {
|
||||
PositionedStack input;
|
||||
PositionedStack result;
|
||||
PositionedStack stamp;
|
||||
|
||||
public ArrayList<Fuel> fuels = new ArrayList<Fuel>();
|
||||
|
||||
public SmeltingSet(List<ItemStack> stamp, ItemStack input, ItemStack result) {
|
||||
input.stackSize = 1;
|
||||
this.input = new PositionedStack(input, 83 - 35, 5 + 36 + 1);
|
||||
public SmeltingSet(Object stamp, AStack input, ItemStack result) {
|
||||
this.input = new PositionedStack(input.extractForNEI(), 83 - 35, 5 + 36 + 1);
|
||||
this.result = new PositionedStack(result, 83 + 28, 5 + 18 + 1);
|
||||
|
||||
if(stamp.isEmpty())
|
||||
fuels.add(new Fuel(new ItemStack(ModItems.nothing)));
|
||||
else
|
||||
for(ItemStack sta : stamp)
|
||||
fuels.add(new Fuel(sta));
|
||||
this.stamp = new PositionedStack(stamp, 83 - 35, 6, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PositionedStack> getIngredients() {
|
||||
return getCycledIngredients(cycleticks / 48, Arrays.asList(new PositionedStack[] { input }));
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PositionedStack> getOtherStacks() {
|
||||
List<PositionedStack> stacks = new ArrayList<PositionedStack>();
|
||||
stacks.add(fuels.get((cycleticks / 24) % fuels.size()).stack);
|
||||
return stacks;
|
||||
return getCycledIngredients(cycleticks / 48, Arrays.asList(input, stamp));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -62,15 +59,6 @@ public class PressRecipeHandler extends TemplateRecipeHandler {
|
||||
}
|
||||
}
|
||||
|
||||
public static class Fuel {
|
||||
public Fuel(ItemStack ingred) {
|
||||
|
||||
this.stack = new PositionedStack(ingred, 83 - 35, 6, false);
|
||||
}
|
||||
|
||||
public PositionedStack stack;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRecipeName() {
|
||||
return "Press";
|
||||
@ -84,9 +72,11 @@ public class PressRecipeHandler extends TemplateRecipeHandler {
|
||||
@Override
|
||||
public void loadCraftingRecipes(String outputId, Object... results) {
|
||||
if((outputId.equals("pressing")) && getClass() == PressRecipeHandler.class) {
|
||||
Map<Object[], Object> recipes = MachineRecipes.instance().getPressRecipes();
|
||||
for(Map.Entry<Object[], Object> recipe : recipes.entrySet()) {
|
||||
this.arecipes.add(new SmeltingSet((List<ItemStack>) recipe.getKey()[0], (ItemStack) recipe.getKey()[1], (ItemStack) recipe.getValue()));
|
||||
|
||||
HashMap<Pair<AStack, StampType>, ItemStack> recipes = PressRecipes.recipes;
|
||||
|
||||
for(Map.Entry<Pair<AStack, StampType>, ItemStack> recipe : recipes.entrySet()) {
|
||||
this.arecipes.add(new SmeltingSet(ItemStamp.stamps.get(recipe.getKey().getValue()), recipe.getKey().getKey(), recipe.getValue()));
|
||||
}
|
||||
} else {
|
||||
super.loadCraftingRecipes(outputId, results);
|
||||
@ -95,10 +85,12 @@ public class PressRecipeHandler extends TemplateRecipeHandler {
|
||||
|
||||
@Override
|
||||
public void loadCraftingRecipes(ItemStack result) {
|
||||
Map<Object[], Object> recipes = MachineRecipes.instance().getPressRecipes();
|
||||
for(Map.Entry<Object[], Object> recipe : recipes.entrySet()) {
|
||||
if(NEIServerUtils.areStacksSameType((ItemStack) recipe.getValue(), result))
|
||||
this.arecipes.add(new SmeltingSet((List<ItemStack>) recipe.getKey()[0], (ItemStack) recipe.getKey()[1], (ItemStack) recipe.getValue()));
|
||||
|
||||
HashMap<Pair<AStack, StampType>, ItemStack> recipes = PressRecipes.recipes;
|
||||
|
||||
for(Map.Entry<Pair<AStack, StampType>, ItemStack> recipe : recipes.entrySet()) {
|
||||
if(NEIServerUtils.areStacksSameType(recipe.getValue(), result))
|
||||
this.arecipes.add(new SmeltingSet(ItemStamp.stamps.get(recipe.getKey().getValue()), recipe.getKey().getKey(), recipe.getValue()));
|
||||
}
|
||||
}
|
||||
|
||||
@ -113,19 +105,17 @@ public class PressRecipeHandler extends TemplateRecipeHandler {
|
||||
|
||||
@Override
|
||||
public void loadUsageRecipes(ItemStack ingredient) {
|
||||
Map<Object[], Object> recipes = MachineRecipes.instance().getPressRecipes();
|
||||
for(Map.Entry<Object[], Object> recipe : recipes.entrySet()) {
|
||||
|
||||
boolean b = false;
|
||||
for(int i = 0; i < ((List<ItemStack>) recipe.getKey()[0]).size(); i++) {
|
||||
if(NEIServerUtils.areStacksSameType(((List<ItemStack>) recipe.getKey()[0]).get(i), ingredient)) {
|
||||
b = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if(b || NEIServerUtils.areStacksSameType(ingredient, (ItemStack) recipe.getKey()[1]))
|
||||
this.arecipes.add(new SmeltingSet((List<ItemStack>) recipe.getKey()[0], (ItemStack) recipe.getKey()[1], (ItemStack) recipe.getValue()));
|
||||
|
||||
HashMap<Pair<AStack, StampType>, ItemStack> recipes = PressRecipes.recipes;
|
||||
|
||||
for(Map.Entry<Pair<AStack, StampType>, ItemStack> recipe : recipes.entrySet()) {
|
||||
AStack in = recipe.getKey().getKey();
|
||||
StampType stamp = recipe.getKey().getValue();
|
||||
|
||||
if(in.matchesRecipe(ingredient, true))
|
||||
this.arecipes.add(new SmeltingSet(ItemStamp.stamps.get(recipe.getKey().getValue()), new ComparableStack(ingredient), recipe.getValue()));
|
||||
else if(ingredient.getItem() instanceof ItemStamp && ((ItemStamp)ingredient.getItem()).type == stamp)
|
||||
this.arecipes.add(new SmeltingSet(ingredient, recipe.getKey().getKey(), recipe.getValue()));
|
||||
}
|
||||
}
|
||||
|
||||
@ -137,23 +127,15 @@ public class PressRecipeHandler extends TemplateRecipeHandler {
|
||||
|
||||
@Override
|
||||
public void loadTransferRects() {
|
||||
// transferRectsRec = new LinkedList<RecipeTransferRect>();
|
||||
transferRectsGui = new LinkedList<RecipeTransferRect>();
|
||||
// guiRec = new LinkedList<Class<? extends GuiContainer>>();
|
||||
guiGui = new LinkedList<Class<? extends GuiContainer>>();
|
||||
|
||||
transferRects.add(new RecipeTransferRect(new Rectangle(74 + 6, 23, 24, 18), "pressing"));
|
||||
transferRectsGui.add(new RecipeTransferRect(new Rectangle(74 + 6 + 18, 23, 24, 18), "pressing"));
|
||||
// guiRec.add(GuiRecipe.class);
|
||||
guiGui.add(GUIMachinePress.class);
|
||||
guiGui.add(GUIMachineEPress.class);
|
||||
RecipeTransferRectHandler.registerRectsToGuis(getRecipeTransferRectGuis(), transferRects);
|
||||
// RecipeTransferRectHandler.registerRectsToGuis(guiRec,
|
||||
// transferRectsRec);
|
||||
RecipeTransferRectHandler.registerRectsToGuis(guiGui, transferRectsGui);
|
||||
|
||||
// for(Class<? extends GuiContainer> r : getRecipeTransferRectGuis())
|
||||
// System.out.println(r.toString());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -13,6 +13,8 @@ import com.hbm.inventory.recipes.MachineRecipes;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.machine.ItemCassette;
|
||||
import com.hbm.items.machine.ItemChemistryTemplate;
|
||||
import com.hbm.items.machine.ItemStamp;
|
||||
import com.hbm.items.machine.ItemStamp.StampType;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.packet.ItemFolderPacket;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
@ -52,12 +54,12 @@ public class GUIScreenTemplateFolder extends GuiScreen {
|
||||
if(player.getHeldItem().getItem() == ModItems.template_folder) {
|
||||
|
||||
// Stamps
|
||||
for(Item i : MachineRecipes.stamps_plate)
|
||||
allStacks.add(new ItemStack(i));
|
||||
for(Item i : MachineRecipes.stamps_wire)
|
||||
allStacks.add(new ItemStack(i));
|
||||
for(Item i : MachineRecipes.stamps_circuit)
|
||||
allStacks.add(new ItemStack(i));
|
||||
for(ItemStack i : ItemStamp.stamps.get(StampType.PLATE))
|
||||
allStacks.add(i.copy());
|
||||
for(ItemStack i : ItemStamp.stamps.get(StampType.WIRE))
|
||||
allStacks.add(i.copy());
|
||||
for(ItemStack i : ItemStamp.stamps.get(StampType.CIRCUIT))
|
||||
allStacks.add(i.copy());
|
||||
// Tracks
|
||||
for(int i = 1; i < ItemCassette.TrackType.values().length; i++)
|
||||
allStacks.add(new ItemStack(ModItems.siren_track, 1, i));
|
||||
|
||||
@ -261,279 +261,6 @@ public class MachineRecipes {
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public static List<Item> stamps_flat = new ArrayList<Item>() {{
|
||||
add(ModItems.stamp_stone_flat);
|
||||
add(ModItems.stamp_iron_flat);
|
||||
add(ModItems.stamp_steel_flat);
|
||||
add(ModItems.stamp_titanium_flat);
|
||||
add(ModItems.stamp_obsidian_flat);
|
||||
add(ModItems.stamp_schrabidium_flat);
|
||||
}};
|
||||
|
||||
public static List<Item> stamps_plate = new ArrayList<Item>() {{
|
||||
add(ModItems.stamp_stone_plate);
|
||||
add(ModItems.stamp_iron_plate);
|
||||
add(ModItems.stamp_steel_plate);
|
||||
add(ModItems.stamp_titanium_plate);
|
||||
add(ModItems.stamp_obsidian_plate);
|
||||
add(ModItems.stamp_schrabidium_plate);
|
||||
}};
|
||||
|
||||
public static List<Item> stamps_wire = new ArrayList<Item>() {{
|
||||
add(ModItems.stamp_stone_wire);
|
||||
add(ModItems.stamp_iron_wire);
|
||||
add(ModItems.stamp_steel_wire);
|
||||
add(ModItems.stamp_titanium_wire);
|
||||
add(ModItems.stamp_obsidian_wire);
|
||||
add(ModItems.stamp_schrabidium_wire);
|
||||
}};
|
||||
|
||||
public static List<Item> stamps_circuit = new ArrayList<Item>() {{
|
||||
add(ModItems.stamp_stone_circuit);
|
||||
add(ModItems.stamp_iron_circuit);
|
||||
add(ModItems.stamp_steel_circuit);
|
||||
add(ModItems.stamp_titanium_circuit);
|
||||
add(ModItems.stamp_obsidian_circuit);
|
||||
add(ModItems.stamp_schrabidium_circuit);
|
||||
}};
|
||||
|
||||
|
||||
public static ItemStack getPressResultNN(ItemStack stamp, ItemStack input) {
|
||||
return getPressResult(input, stamp) == null ? new ItemStack(ModItems.nothing) : getPressResult(input, stamp);
|
||||
}
|
||||
|
||||
public static ItemStack getPressResultNN(Item stamp, Item input) {
|
||||
return getPressResult(new ItemStack(input), new ItemStack(stamp)) == null ? new ItemStack(ModItems.nothing) : getPressResult(new ItemStack(input), new ItemStack(stamp));
|
||||
}
|
||||
|
||||
public static ItemStack getPressResult(ItemStack input, ItemStack stamp) {
|
||||
|
||||
if(input == null || stamp == null)
|
||||
return null;
|
||||
|
||||
if(stamps_flat.contains(stamp.getItem())) {
|
||||
|
||||
if(mODE(input, "dustCoal"))
|
||||
return new ItemStack(Items.coal);
|
||||
if(mODE(input, "dustQuartz"))
|
||||
return new ItemStack(Items.quartz);
|
||||
if(mODE(input, "dustNetherQuartz"))
|
||||
return new ItemStack(Items.quartz);
|
||||
if(mODE(input, "dustLapis"))
|
||||
return new ItemStack(Items.dye, 1, 4);
|
||||
if(mODE(input, "dustDiamond"))
|
||||
return new ItemStack(Items.diamond);
|
||||
if(mODE(input, "dustEmerald"))
|
||||
return new ItemStack(Items.emerald);
|
||||
if(input.getItem() == ModItems.pellet_coal)
|
||||
return new ItemStack(Items.diamond);
|
||||
if(input.getItem() == ModItems.biomass)
|
||||
return new ItemStack(ModItems.biomass_compressed);
|
||||
if(input.getItem() == ModItems.powder_lignite)
|
||||
return new ItemStack(ModItems.briquette_lignite);
|
||||
if(input.getItem() == ModItems.coke)
|
||||
return new ItemStack(ModItems.ingot_graphite);
|
||||
|
||||
if(input.getItem() == ModItems.meteorite_sword_reforged)
|
||||
return new ItemStack(ModItems.meteorite_sword_hardened);
|
||||
}
|
||||
|
||||
if(stamps_plate.contains(stamp.getItem())) {
|
||||
|
||||
if(mODE(input, "ingotIron"))
|
||||
return new ItemStack(ModItems.plate_iron);
|
||||
if(mODE(input, "ingotGold"))
|
||||
return new ItemStack(ModItems.plate_gold);
|
||||
if(mODE(input, "ingotTitanium"))
|
||||
return new ItemStack(ModItems.plate_titanium);
|
||||
if(mODE(input, "ingotAluminum"))
|
||||
return new ItemStack(ModItems.plate_aluminium);
|
||||
if(mODE(input, "ingotSteel"))
|
||||
return new ItemStack(ModItems.plate_steel);
|
||||
if(mODE(input, "ingotLead"))
|
||||
return new ItemStack(ModItems.plate_lead);
|
||||
if(mODE(input, "ingotCopper"))
|
||||
return new ItemStack(ModItems.plate_copper);
|
||||
if(mODE(input, "ingotAdvanced"))
|
||||
return new ItemStack(ModItems.plate_advanced_alloy);
|
||||
if(mODE(input, "ingotAdvancedAlloy"))
|
||||
return new ItemStack(ModItems.plate_advanced_alloy);
|
||||
if(mODE(input, "ingotSchrabidium"))
|
||||
return new ItemStack(ModItems.plate_schrabidium);
|
||||
if(mODE(input, "ingotCMBSteel"))
|
||||
return new ItemStack(ModItems.plate_combine_steel);
|
||||
if(mODE(input, "ingotSaturnite"))
|
||||
return new ItemStack(ModItems.plate_saturnite);
|
||||
|
||||
}
|
||||
|
||||
if(stamps_wire.contains(stamp.getItem())) {
|
||||
|
||||
if(mODE(input, "ingotAluminum"))
|
||||
return new ItemStack(ModItems.wire_aluminium, 8);
|
||||
if(mODE(input, "ingotCopper"))
|
||||
return new ItemStack(ModItems.wire_copper, 8);
|
||||
if(mODE(input, "ingotTungsten"))
|
||||
return new ItemStack(ModItems.wire_tungsten, 8);
|
||||
if(mODE(input, "ingotMingrade"))
|
||||
return new ItemStack(ModItems.wire_red_copper, 8);
|
||||
if(mODE(input, "ingotGold"))
|
||||
return new ItemStack(ModItems.wire_gold, 8);
|
||||
if(mODE(input, "ingotSchrabidium"))
|
||||
return new ItemStack(ModItems.wire_schrabidium, 8);
|
||||
if(mODE(input, "ingotAdvanced"))
|
||||
return new ItemStack(ModItems.wire_advanced_alloy, 8);
|
||||
if(mODE(input, "ingotAdvancedAlloy"))
|
||||
return new ItemStack(ModItems.wire_advanced_alloy, 8);
|
||||
if(mODE(input, "ingotMagnetizedTungsten"))
|
||||
return new ItemStack(ModItems.wire_magnetized_tungsten, 8);
|
||||
}
|
||||
|
||||
if(stamps_circuit.contains(stamp.getItem())) {
|
||||
|
||||
if(input.getItem() == ModItems.circuit_raw)
|
||||
return new ItemStack(ModItems.circuit_aluminium);
|
||||
if(input.getItem() == ModItems.circuit_bismuth_raw)
|
||||
return new ItemStack(ModItems.circuit_bismuth);
|
||||
if(input.getItem() == ModItems.circuit_tantalium_raw)
|
||||
return new ItemStack(ModItems.circuit_tantalium);
|
||||
}
|
||||
|
||||
if(stamp.getItem() == ModItems.stamp_357) {
|
||||
|
||||
if(input.getItem() == ModItems.assembly_iron)
|
||||
return new ItemStack(ModItems.gun_revolver_iron_ammo);
|
||||
if(input.getItem() == ModItems.assembly_steel)
|
||||
return new ItemStack(ModItems.gun_revolver_ammo);
|
||||
if(input.getItem() == ModItems.assembly_lead)
|
||||
return new ItemStack(ModItems.gun_revolver_lead_ammo);
|
||||
if(input.getItem() == ModItems.assembly_gold)
|
||||
return new ItemStack(ModItems.gun_revolver_gold_ammo);
|
||||
if(input.getItem() == ModItems.assembly_schrabidium)
|
||||
return new ItemStack(ModItems.gun_revolver_schrabidium_ammo);
|
||||
if(input.getItem() == ModItems.assembly_nightmare)
|
||||
return new ItemStack(ModItems.gun_revolver_nightmare_ammo);
|
||||
if(input.getItem() == ModItems.assembly_desh)
|
||||
return new ItemStack(ModItems.ammo_357_desh);
|
||||
|
||||
if(mODE(input, "ingotSteel"))
|
||||
return new ItemStack(ModItems.gun_revolver_cursed_ammo);
|
||||
}
|
||||
|
||||
if(stamp.getItem() == ModItems.stamp_44) {
|
||||
|
||||
if(input.getItem() == ModItems.assembly_nopip)
|
||||
return new ItemStack(ModItems.ammo_44);
|
||||
}
|
||||
|
||||
if(stamp.getItem() == ModItems.stamp_9) {
|
||||
|
||||
if(input.getItem() == ModItems.assembly_smg)
|
||||
return new ItemStack(ModItems.ammo_9mm);
|
||||
if(input.getItem() == ModItems.assembly_uzi)
|
||||
return new ItemStack(ModItems.ammo_22lr);
|
||||
if(mODE(input, "ingotGold"))
|
||||
return new ItemStack(ModItems.ammo_566_gold);
|
||||
if(input.getItem() == ModItems.assembly_lacunae)
|
||||
return new ItemStack(ModItems.ammo_5mm);
|
||||
if(input.getItem() == ModItems.assembly_556)
|
||||
return new ItemStack(ModItems.ammo_556);
|
||||
}
|
||||
|
||||
if(stamp.getItem() == ModItems.stamp_50) {
|
||||
|
||||
if(input.getItem() == ModItems.assembly_calamity)
|
||||
return new ItemStack(ModItems.ammo_50bmg);
|
||||
if(input.getItem() == ModItems.assembly_actionexpress)
|
||||
return new ItemStack(ModItems.ammo_50ae);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public static Map<Object[], Object> getPressRecipes() {
|
||||
Map<Object[], Object> recipes = new HashMap<Object[], Object>();
|
||||
|
||||
List<ItemStack> i_stamps_flat = new ArrayList<ItemStack>();
|
||||
for(Item i : stamps_flat)
|
||||
i_stamps_flat.add(new ItemStack(i));
|
||||
List<ItemStack> i_stamps_plate = new ArrayList<ItemStack>();
|
||||
for(Item i : stamps_plate)
|
||||
i_stamps_plate.add(new ItemStack(i));
|
||||
List<ItemStack> i_stamps_wire = new ArrayList<ItemStack>();
|
||||
for(Item i : stamps_wire)
|
||||
i_stamps_wire.add(new ItemStack(i));
|
||||
List<ItemStack> i_stamps_circuit = new ArrayList<ItemStack>();
|
||||
for(Item i : stamps_circuit)
|
||||
i_stamps_circuit.add(new ItemStack(i));
|
||||
|
||||
List<ItemStack> i_stamps_357 = new ArrayList<ItemStack>();
|
||||
i_stamps_357.add(new ItemStack(ModItems.stamp_357));
|
||||
List<ItemStack> i_stamps_44 = new ArrayList<ItemStack>();
|
||||
i_stamps_44.add(new ItemStack(ModItems.stamp_44));
|
||||
List<ItemStack> i_stamps_9 = new ArrayList<ItemStack>();
|
||||
i_stamps_9.add(new ItemStack(ModItems.stamp_9));
|
||||
List<ItemStack> i_stamps_50 = new ArrayList<ItemStack>();
|
||||
i_stamps_50.add(new ItemStack(ModItems.stamp_50));
|
||||
|
||||
recipes.put(new Object[] { i_stamps_flat, new ItemStack(ModItems.powder_coal) }, getPressResultNN(stamps_flat.get(0), ModItems.powder_coal));
|
||||
recipes.put(new Object[] { i_stamps_flat, new ItemStack(ModItems.powder_quartz) }, getPressResultNN(stamps_flat.get(0), ModItems.powder_quartz));
|
||||
recipes.put(new Object[] { i_stamps_flat, new ItemStack(ModItems.powder_lapis) }, getPressResultNN(stamps_flat.get(0), ModItems.powder_lapis));
|
||||
recipes.put(new Object[] { i_stamps_flat, new ItemStack(ModItems.powder_diamond) }, getPressResultNN(stamps_flat.get(0), ModItems.powder_diamond));
|
||||
recipes.put(new Object[] { i_stamps_flat, new ItemStack(ModItems.powder_emerald) }, getPressResultNN(stamps_flat.get(0), ModItems.powder_emerald));
|
||||
recipes.put(new Object[] { i_stamps_flat, new ItemStack(ModItems.pellet_coal) }, getPressResultNN(stamps_flat.get(0), ModItems.pellet_coal));
|
||||
recipes.put(new Object[] { i_stamps_flat, new ItemStack(ModItems.biomass) }, getPressResultNN(stamps_flat.get(0), ModItems.biomass));
|
||||
recipes.put(new Object[] { i_stamps_flat, new ItemStack(ModItems.powder_lignite) }, getPressResultNN(stamps_flat.get(0), ModItems.powder_lignite));
|
||||
recipes.put(new Object[] { i_stamps_flat, new ItemStack(ModItems.coke) }, getPressResultNN(stamps_flat.get(0), ModItems.coke));
|
||||
|
||||
recipes.put(new Object[] { i_stamps_plate, new ItemStack(Items.iron_ingot) }, getPressResultNN(stamps_plate.get(0), Items.iron_ingot));
|
||||
recipes.put(new Object[] { i_stamps_plate, new ItemStack(Items.gold_ingot) }, getPressResultNN(stamps_plate.get(0), Items.gold_ingot));
|
||||
recipes.put(new Object[] { i_stamps_plate, new ItemStack(ModItems.ingot_titanium) }, getPressResultNN(stamps_plate.get(0), ModItems.ingot_titanium));
|
||||
recipes.put(new Object[] { i_stamps_plate, new ItemStack(ModItems.ingot_aluminium) }, getPressResultNN(stamps_plate.get(0), ModItems.ingot_aluminium));
|
||||
recipes.put(new Object[] { i_stamps_plate, new ItemStack(ModItems.ingot_steel) }, getPressResultNN(stamps_plate.get(0), ModItems.ingot_steel));
|
||||
recipes.put(new Object[] { i_stamps_plate, new ItemStack(ModItems.ingot_lead) }, getPressResultNN(stamps_plate.get(0), ModItems.ingot_lead));
|
||||
recipes.put(new Object[] { i_stamps_plate, new ItemStack(ModItems.ingot_copper) }, getPressResultNN(stamps_plate.get(0), ModItems.ingot_copper));
|
||||
recipes.put(new Object[] { i_stamps_plate, new ItemStack(ModItems.ingot_advanced_alloy) }, getPressResultNN(stamps_plate.get(0), ModItems.ingot_advanced_alloy));
|
||||
recipes.put(new Object[] { i_stamps_plate, new ItemStack(ModItems.ingot_schrabidium) }, getPressResultNN(stamps_plate.get(0), ModItems.ingot_schrabidium));
|
||||
recipes.put(new Object[] { i_stamps_plate, new ItemStack(ModItems.ingot_combine_steel) }, getPressResultNN(stamps_plate.get(0), ModItems.ingot_combine_steel));
|
||||
recipes.put(new Object[] { i_stamps_plate, new ItemStack(ModItems.ingot_saturnite) }, getPressResultNN(stamps_plate.get(0), ModItems.ingot_saturnite));
|
||||
|
||||
recipes.put(new Object[] { i_stamps_wire, new ItemStack(ModItems.ingot_aluminium) }, getPressResultNN(stamps_wire.get(0), ModItems.ingot_aluminium));
|
||||
recipes.put(new Object[] { i_stamps_wire, new ItemStack(ModItems.ingot_copper) }, getPressResultNN(stamps_wire.get(0), ModItems.ingot_copper));
|
||||
recipes.put(new Object[] { i_stamps_wire, new ItemStack(ModItems.ingot_tungsten) }, getPressResultNN(stamps_wire.get(0), ModItems.ingot_tungsten));
|
||||
recipes.put(new Object[] { i_stamps_wire, new ItemStack(ModItems.ingot_red_copper) }, getPressResultNN(stamps_wire.get(0), ModItems.ingot_red_copper));
|
||||
recipes.put(new Object[] { i_stamps_wire, new ItemStack(Items.gold_ingot) }, getPressResultNN(stamps_wire.get(0), Items.gold_ingot));
|
||||
recipes.put(new Object[] { i_stamps_wire, new ItemStack(ModItems.ingot_schrabidium) }, getPressResultNN(stamps_wire.get(0), ModItems.ingot_schrabidium));
|
||||
recipes.put(new Object[] { i_stamps_wire, new ItemStack(ModItems.ingot_advanced_alloy) }, getPressResultNN(stamps_wire.get(0), ModItems.ingot_advanced_alloy));
|
||||
recipes.put(new Object[] { i_stamps_wire, new ItemStack(ModItems.ingot_magnetized_tungsten) }, getPressResultNN(stamps_wire.get(0), ModItems.ingot_magnetized_tungsten));
|
||||
|
||||
recipes.put(new Object[] { i_stamps_circuit, new ItemStack(ModItems.circuit_raw) }, getPressResultNN(stamps_circuit.get(0), ModItems.circuit_raw));
|
||||
recipes.put(new Object[] { i_stamps_circuit, new ItemStack(ModItems.circuit_bismuth_raw) }, getPressResultNN(stamps_circuit.get(0), ModItems.circuit_bismuth_raw));
|
||||
recipes.put(new Object[] { i_stamps_circuit, new ItemStack(ModItems.circuit_tantalium_raw) }, getPressResultNN(stamps_circuit.get(0), ModItems.circuit_tantalium_raw));
|
||||
|
||||
recipes.put(new Object[] { i_stamps_357, new ItemStack(ModItems.assembly_iron) }, getPressResultNN(i_stamps_357.get(0).getItem(), ModItems.assembly_iron));
|
||||
recipes.put(new Object[] { i_stamps_357, new ItemStack(ModItems.assembly_steel) }, getPressResultNN(i_stamps_357.get(0).getItem(), ModItems.assembly_steel));
|
||||
recipes.put(new Object[] { i_stamps_357, new ItemStack(ModItems.assembly_lead) }, getPressResultNN(i_stamps_357.get(0).getItem(), ModItems.assembly_lead));
|
||||
recipes.put(new Object[] { i_stamps_357, new ItemStack(ModItems.assembly_gold) }, getPressResultNN(i_stamps_357.get(0).getItem(), ModItems.assembly_gold));
|
||||
recipes.put(new Object[] { i_stamps_357, new ItemStack(ModItems.assembly_schrabidium) }, getPressResultNN(i_stamps_357.get(0).getItem(), ModItems.assembly_schrabidium));
|
||||
recipes.put(new Object[] { i_stamps_357, new ItemStack(ModItems.ingot_steel) }, getPressResultNN(i_stamps_357.get(0).getItem(), ModItems.ingot_steel));
|
||||
recipes.put(new Object[] { i_stamps_357, new ItemStack(ModItems.assembly_nightmare) }, getPressResultNN(i_stamps_357.get(0).getItem(), ModItems.assembly_nightmare));
|
||||
recipes.put(new Object[] { i_stamps_357, new ItemStack(ModItems.assembly_desh) }, getPressResultNN(i_stamps_357.get(0).getItem(), ModItems.assembly_desh));
|
||||
|
||||
recipes.put(new Object[] { i_stamps_44, new ItemStack(ModItems.assembly_nopip) }, getPressResultNN(i_stamps_44.get(0).getItem(), ModItems.assembly_nopip));
|
||||
|
||||
recipes.put(new Object[] { i_stamps_9, new ItemStack(ModItems.assembly_smg) }, getPressResultNN(i_stamps_9.get(0).getItem(), ModItems.assembly_smg));
|
||||
recipes.put(new Object[] { i_stamps_9, new ItemStack(ModItems.assembly_uzi) }, getPressResultNN(i_stamps_9.get(0).getItem(), ModItems.assembly_uzi));
|
||||
recipes.put(new Object[] { i_stamps_9, new ItemStack(ModItems.assembly_lacunae) }, getPressResultNN(i_stamps_9.get(0).getItem(), ModItems.assembly_lacunae));
|
||||
recipes.put(new Object[] { i_stamps_9, new ItemStack(Items.gold_ingot) }, getPressResultNN(i_stamps_9.get(0).getItem(), Items.gold_ingot));
|
||||
recipes.put(new Object[] { i_stamps_9, new ItemStack(ModItems.assembly_556) }, getPressResultNN(i_stamps_9.get(0).getItem(), ModItems.assembly_556));
|
||||
|
||||
recipes.put(new Object[] { i_stamps_50, new ItemStack(ModItems.assembly_actionexpress) }, getPressResultNN(i_stamps_50.get(0).getItem(), ModItems.assembly_actionexpress));
|
||||
recipes.put(new Object[] { i_stamps_50, new ItemStack(ModItems.assembly_calamity) }, getPressResultNN(i_stamps_50.get(0).getItem(), ModItems.assembly_calamity));
|
||||
|
||||
return recipes;
|
||||
}
|
||||
|
||||
public static ItemStack getCyclotronOutput(ItemStack part, ItemStack item) {
|
||||
|
||||
|
||||
101
src/main/java/com/hbm/inventory/recipes/PressRecipes.java
Normal file
101
src/main/java/com/hbm/inventory/recipes/PressRecipes.java
Normal file
@ -0,0 +1,101 @@
|
||||
package com.hbm.inventory.recipes;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
import static com.hbm.inventory.OreDictManager.*;
|
||||
import com.hbm.inventory.RecipesCommon.AStack;
|
||||
import com.hbm.inventory.RecipesCommon.ComparableStack;
|
||||
import com.hbm.inventory.RecipesCommon.OreDictStack;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.machine.ItemStamp;
|
||||
import com.hbm.items.machine.ItemStamp.StampType;
|
||||
import com.hbm.util.Tuple.Pair;
|
||||
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class PressRecipes {
|
||||
|
||||
public static HashMap<Pair<AStack, StampType>, ItemStack> recipes = new HashMap();
|
||||
|
||||
public static ItemStack getOutput(ItemStack ingredient, ItemStack stamp) {
|
||||
|
||||
if(ingredient == null || stamp == null)
|
||||
return null;
|
||||
|
||||
if(!(stamp.getItem() instanceof ItemStamp))
|
||||
return null;
|
||||
|
||||
StampType type = ((ItemStamp) stamp.getItem()).type;
|
||||
|
||||
Pair<AStack, StampType> key = new Pair<AStack, StampType>(new ComparableStack(ingredient), type);
|
||||
return recipes.get(key);
|
||||
}
|
||||
|
||||
public static void register() {
|
||||
|
||||
makeRecipe(StampType.FLAT, new OreDictStack(COAL.dust()), Items.coal);
|
||||
makeRecipe(StampType.FLAT, new OreDictStack(NETHERQUARTZ.dust()), Items.quartz);
|
||||
makeRecipe(StampType.FLAT, new OreDictStack(LAPIS.dust()), new ItemStack(Items.dye, 1, 4));
|
||||
makeRecipe(StampType.FLAT, new OreDictStack(DIAMOND.dust()), Items.diamond);
|
||||
makeRecipe(StampType.FLAT, new OreDictStack(EMERALD.dust()), Items.emerald);
|
||||
makeRecipe(StampType.FLAT, new ComparableStack(ModItems.pellet_coal), Items.diamond);
|
||||
makeRecipe(StampType.FLAT, new ComparableStack(ModItems.biomass), ModItems.biomass_compressed);
|
||||
makeRecipe(StampType.FLAT, new ComparableStack(ModItems.powder_lignite), ModItems.briquette_lignite);
|
||||
makeRecipe(StampType.FLAT, new ComparableStack(ModItems.coke), ModItems.ingot_graphite);
|
||||
makeRecipe(StampType.FLAT, new ComparableStack(ModItems.meteorite_sword_reforged), ModItems.meteorite_sword_hardened);
|
||||
|
||||
makeRecipe(StampType.PLATE, new OreDictStack(IRON.ingot()), ModItems.plate_iron);
|
||||
makeRecipe(StampType.PLATE, new OreDictStack(GOLD.ingot()), ModItems.plate_gold);
|
||||
makeRecipe(StampType.PLATE, new OreDictStack(TI.ingot()), ModItems.plate_titanium);
|
||||
makeRecipe(StampType.PLATE, new OreDictStack(AL.ingot()), ModItems.plate_aluminium);
|
||||
makeRecipe(StampType.PLATE, new OreDictStack(STEEL.ingot()), ModItems.plate_steel);
|
||||
makeRecipe(StampType.PLATE, new OreDictStack(PB.ingot()), ModItems.plate_lead);
|
||||
makeRecipe(StampType.PLATE, new OreDictStack(CU.ingot()), ModItems.plate_copper);
|
||||
makeRecipe(StampType.PLATE, new OreDictStack(ALLOY.ingot()), ModItems.plate_advanced_alloy);
|
||||
makeRecipe(StampType.PLATE, new OreDictStack(SA326.ingot()), ModItems.plate_schrabidium);
|
||||
makeRecipe(StampType.PLATE, new OreDictStack(CMB.ingot()), ModItems.plate_combine_steel);
|
||||
makeRecipe(StampType.PLATE, new OreDictStack(BIGMT.ingot()), ModItems.plate_saturnite);
|
||||
|
||||
makeRecipe(StampType.WIRE, new OreDictStack(AL.ingot()), new ItemStack(ModItems.wire_aluminium, 8));
|
||||
makeRecipe(StampType.WIRE, new OreDictStack(CU.ingot()), new ItemStack(ModItems.wire_copper, 8));
|
||||
makeRecipe(StampType.WIRE, new OreDictStack(W.ingot()), new ItemStack(ModItems.wire_tungsten, 8));
|
||||
makeRecipe(StampType.WIRE, new OreDictStack(MINGRADE.ingot()), new ItemStack(ModItems.wire_red_copper, 8));
|
||||
makeRecipe(StampType.WIRE, new OreDictStack(GOLD.ingot()), new ItemStack(ModItems.wire_gold, 8));
|
||||
makeRecipe(StampType.WIRE, new OreDictStack(SA326.ingot()), new ItemStack(ModItems.wire_schrabidium, 8));
|
||||
makeRecipe(StampType.WIRE, new OreDictStack(ALLOY.ingot()), new ItemStack(ModItems.wire_advanced_alloy, 8));
|
||||
makeRecipe(StampType.WIRE, new OreDictStack(MAGTUNG.ingot()), new ItemStack(ModItems.wire_magnetized_tungsten, 8));
|
||||
|
||||
makeRecipe(StampType.PLATE, new ComparableStack(ModItems.circuit_raw), ModItems.circuit_aluminium);
|
||||
makeRecipe(StampType.PLATE, new ComparableStack(ModItems.circuit_bismuth_raw), ModItems.circuit_bismuth);
|
||||
makeRecipe(StampType.PLATE, new ComparableStack(ModItems.circuit_tantalium_raw), ModItems.circuit_tantalium);
|
||||
|
||||
makeRecipe(StampType.C357, new ComparableStack(ModItems.assembly_iron), ModItems.gun_revolver_iron_ammo);
|
||||
makeRecipe(StampType.C357, new ComparableStack(ModItems.assembly_steel), ModItems.gun_revolver_ammo);
|
||||
makeRecipe(StampType.C357, new ComparableStack(ModItems.assembly_lead), ModItems.gun_revolver_lead_ammo);
|
||||
makeRecipe(StampType.C357, new ComparableStack(ModItems.assembly_gold), ModItems.gun_revolver_gold_ammo);
|
||||
makeRecipe(StampType.C357, new ComparableStack(ModItems.assembly_schrabidium), ModItems.gun_revolver_schrabidium_ammo);
|
||||
makeRecipe(StampType.C357, new ComparableStack(ModItems.assembly_nightmare), ModItems.gun_revolver_nightmare_ammo);
|
||||
makeRecipe(StampType.C357, new ComparableStack(ModItems.assembly_desh), ModItems.ammo_357_desh);
|
||||
makeRecipe(StampType.C357, new OreDictStack(STEEL.ingot()), ModItems.gun_revolver_cursed_ammo);
|
||||
|
||||
makeRecipe(StampType.C44, new ComparableStack(ModItems.assembly_nopip), ModItems.ammo_44);
|
||||
|
||||
makeRecipe(StampType.C9, new ComparableStack(ModItems.assembly_smg), ModItems.ammo_9mm);
|
||||
makeRecipe(StampType.C9, new ComparableStack(ModItems.assembly_uzi), ModItems.ammo_22lr);
|
||||
makeRecipe(StampType.C9, new OreDictStack(GOLD.ingot()), ModItems.ammo_566_gold);
|
||||
makeRecipe(StampType.C9, new ComparableStack(ModItems.assembly_lacunae), ModItems.ammo_5mm);
|
||||
makeRecipe(StampType.C9, new ComparableStack(ModItems.assembly_556), ModItems.ammo_556);
|
||||
|
||||
makeRecipe(StampType.C50, new ComparableStack(ModItems.assembly_calamity), ModItems.ammo_50bmg);
|
||||
makeRecipe(StampType.C50, new ComparableStack(ModItems.assembly_actionexpress), ModItems.ammo_50ae);
|
||||
}
|
||||
|
||||
public static void makeRecipe(StampType type, AStack in, Item out) {
|
||||
recipes.put(new Pair<AStack, StampType>(in, type), new ItemStack(out));
|
||||
}
|
||||
public static void makeRecipe(StampType type, AStack in, ItemStack out) {
|
||||
recipes.put(new Pair<AStack, StampType>(in, type), out);
|
||||
}
|
||||
}
|
||||
@ -13,6 +13,7 @@ import com.hbm.items.food.*;
|
||||
import com.hbm.items.machine.*;
|
||||
import com.hbm.items.machine.ItemMachineUpgrade.UpgradeType;
|
||||
import com.hbm.items.machine.ItemRBMKRod.EnumBurnFunc;
|
||||
import com.hbm.items.machine.ItemStamp.StampType;
|
||||
import com.hbm.items.special.*;
|
||||
import com.hbm.items.tool.*;
|
||||
import com.hbm.items.tool.ItemToolAbility.EnumToolType;
|
||||
@ -647,6 +648,10 @@ public class ModItems {
|
||||
public static Item stamp_schrabidium_plate;
|
||||
public static Item stamp_schrabidium_wire;
|
||||
public static Item stamp_schrabidium_circuit;
|
||||
public static Item stamp_desh_flat;
|
||||
public static Item stamp_desh_plate;
|
||||
public static Item stamp_desh_wire;
|
||||
public static Item stamp_desh_circuit;
|
||||
|
||||
public static Item stamp_357;
|
||||
public static Item stamp_44;
|
||||
@ -3105,34 +3110,38 @@ public class ModItems {
|
||||
inf_water = new Item().setUnlocalizedName("inf_water").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":inf_water");
|
||||
inf_water_mk2 = new Item().setUnlocalizedName("inf_water_mk2").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":inf_water_mk2");
|
||||
|
||||
stamp_stone_flat = new ItemStamp(10).setUnlocalizedName("stamp_stone_flat").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":stamp_stone_flat");
|
||||
stamp_stone_plate = new ItemStamp(10).setUnlocalizedName("stamp_stone_plate").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":stamp_stone_plate");
|
||||
stamp_stone_wire = new ItemStamp(10).setUnlocalizedName("stamp_stone_wire").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":stamp_stone_wire");
|
||||
stamp_stone_circuit = new ItemStamp(10).setUnlocalizedName("stamp_stone_circuit").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":stamp_stone_circuit");
|
||||
stamp_iron_flat = new ItemStamp(50).setUnlocalizedName("stamp_iron_flat").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":stamp_iron_flat");
|
||||
stamp_iron_plate = new ItemStamp(50).setUnlocalizedName("stamp_iron_plate").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":stamp_iron_plate");
|
||||
stamp_iron_wire = new ItemStamp(50).setUnlocalizedName("stamp_iron_wire").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":stamp_iron_wire");
|
||||
stamp_iron_circuit = new ItemStamp(50).setUnlocalizedName("stamp_iron_circuit").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":stamp_iron_circuit");
|
||||
stamp_steel_flat = new ItemStamp(100).setUnlocalizedName("stamp_steel_flat").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":stamp_steel_flat");
|
||||
stamp_steel_plate = new ItemStamp(100).setUnlocalizedName("stamp_steel_plate").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":stamp_steel_plate");
|
||||
stamp_steel_wire = new ItemStamp(100).setUnlocalizedName("stamp_steel_wire").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":stamp_steel_wire");
|
||||
stamp_steel_circuit = new ItemStamp(100).setUnlocalizedName("stamp_steel_circuit").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":stamp_steel_circuit");
|
||||
stamp_titanium_flat = new ItemStamp(150).setUnlocalizedName("stamp_titanium_flat").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":stamp_titanium_flat");
|
||||
stamp_titanium_plate = new ItemStamp(150).setUnlocalizedName("stamp_titanium_plate").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":stamp_titanium_plate");
|
||||
stamp_titanium_wire = new ItemStamp(150).setUnlocalizedName("stamp_titanium_wire").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":stamp_titanium_wire");
|
||||
stamp_titanium_circuit = new ItemStamp(150).setUnlocalizedName("stamp_titanium_circuit").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":stamp_titanium_circuit");
|
||||
stamp_obsidian_flat = new ItemStamp(170).setUnlocalizedName("stamp_obsidian_flat").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":stamp_obsidian_flat");
|
||||
stamp_obsidian_plate = new ItemStamp(170).setUnlocalizedName("stamp_obsidian_plate").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":stamp_obsidian_plate");
|
||||
stamp_obsidian_wire = new ItemStamp(170).setUnlocalizedName("stamp_obsidian_wire").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":stamp_obsidian_wire");
|
||||
stamp_obsidian_circuit = new ItemStamp(170).setUnlocalizedName("stamp_obsidian_circuit").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":stamp_obsidian_circuit");
|
||||
stamp_schrabidium_flat = new ItemStamp(3000).setUnlocalizedName("stamp_schrabidium_flat").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":stamp_schrabidium_flat");
|
||||
stamp_schrabidium_plate = new ItemStamp(3000).setUnlocalizedName("stamp_schrabidium_plate").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":stamp_schrabidium_plate");
|
||||
stamp_schrabidium_wire = new ItemStamp(3000).setUnlocalizedName("stamp_schrabidium_wire").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":stamp_schrabidium_wire");
|
||||
stamp_schrabidium_circuit = new ItemStamp(3000).setUnlocalizedName("stamp_schrabidium_circuit").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":stamp_schrabidium_circuit");
|
||||
stamp_357 = new ItemStamp(1000).setUnlocalizedName("stamp_357").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":stamp_357");
|
||||
stamp_44 = new ItemStamp(1000).setUnlocalizedName("stamp_44").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":stamp_44");
|
||||
stamp_9 = new ItemStamp(1000).setUnlocalizedName("stamp_9").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":stamp_9");
|
||||
stamp_50 = new ItemStamp(1000).setUnlocalizedName("stamp_50").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":stamp_50");
|
||||
stamp_stone_flat = new ItemStamp(10, StampType.FLAT).setUnlocalizedName("stamp_stone_flat").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":stamp_stone_flat");
|
||||
stamp_stone_plate = new ItemStamp(10, StampType.PLATE).setUnlocalizedName("stamp_stone_plate").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":stamp_stone_plate");
|
||||
stamp_stone_wire = new ItemStamp(10, StampType.WIRE).setUnlocalizedName("stamp_stone_wire").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":stamp_stone_wire");
|
||||
stamp_stone_circuit = new ItemStamp(10, StampType.CIRCUIT).setUnlocalizedName("stamp_stone_circuit").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":stamp_stone_circuit");
|
||||
stamp_iron_flat = new ItemStamp(50, StampType.FLAT).setUnlocalizedName("stamp_iron_flat").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":stamp_iron_flat");
|
||||
stamp_iron_plate = new ItemStamp(50, StampType.PLATE).setUnlocalizedName("stamp_iron_plate").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":stamp_iron_plate");
|
||||
stamp_iron_wire = new ItemStamp(50, StampType.WIRE).setUnlocalizedName("stamp_iron_wire").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":stamp_iron_wire");
|
||||
stamp_iron_circuit = new ItemStamp(50, StampType.CIRCUIT).setUnlocalizedName("stamp_iron_circuit").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":stamp_iron_circuit");
|
||||
stamp_steel_flat = new ItemStamp(100, StampType.FLAT).setUnlocalizedName("stamp_steel_flat").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":stamp_steel_flat");
|
||||
stamp_steel_plate = new ItemStamp(100, StampType.PLATE).setUnlocalizedName("stamp_steel_plate").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":stamp_steel_plate");
|
||||
stamp_steel_wire = new ItemStamp(100, StampType.WIRE).setUnlocalizedName("stamp_steel_wire").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":stamp_steel_wire");
|
||||
stamp_steel_circuit = new ItemStamp(100, StampType.CIRCUIT).setUnlocalizedName("stamp_steel_circuit").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":stamp_steel_circuit");
|
||||
stamp_titanium_flat = new ItemStamp(150, StampType.FLAT).setUnlocalizedName("stamp_titanium_flat").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":stamp_titanium_flat");
|
||||
stamp_titanium_plate = new ItemStamp(150, StampType.PLATE).setUnlocalizedName("stamp_titanium_plate").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":stamp_titanium_plate");
|
||||
stamp_titanium_wire = new ItemStamp(150, StampType.WIRE).setUnlocalizedName("stamp_titanium_wire").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":stamp_titanium_wire");
|
||||
stamp_titanium_circuit = new ItemStamp(150, StampType.CIRCUIT).setUnlocalizedName("stamp_titanium_circuit").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":stamp_titanium_circuit");
|
||||
stamp_obsidian_flat = new ItemStamp(170, StampType.FLAT).setUnlocalizedName("stamp_obsidian_flat").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":stamp_obsidian_flat");
|
||||
stamp_obsidian_plate = new ItemStamp(170, StampType.PLATE).setUnlocalizedName("stamp_obsidian_plate").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":stamp_obsidian_plate");
|
||||
stamp_obsidian_wire = new ItemStamp(170, StampType.WIRE).setUnlocalizedName("stamp_obsidian_wire").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":stamp_obsidian_wire");
|
||||
stamp_obsidian_circuit = new ItemStamp(170, StampType.CIRCUIT).setUnlocalizedName("stamp_obsidian_circuit").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":stamp_obsidian_circuit");
|
||||
stamp_schrabidium_flat = new ItemStamp(3000, StampType.FLAT).setUnlocalizedName("stamp_schrabidium_flat").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":stamp_schrabidium_flat");
|
||||
stamp_schrabidium_plate = new ItemStamp(3000, StampType.PLATE).setUnlocalizedName("stamp_schrabidium_plate").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":stamp_schrabidium_plate");
|
||||
stamp_schrabidium_wire = new ItemStamp(3000, StampType.WIRE).setUnlocalizedName("stamp_schrabidium_wire").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":stamp_schrabidium_wire");
|
||||
stamp_schrabidium_circuit = new ItemStamp(3000, StampType.CIRCUIT).setUnlocalizedName("stamp_schrabidium_circuit").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":stamp_schrabidium_circuit");
|
||||
stamp_desh_flat = new ItemStamp(0, StampType.FLAT).setUnlocalizedName("stamp_desh_flat").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":stamp_desh_flat");
|
||||
stamp_desh_plate = new ItemStamp(0, StampType.PLATE).setUnlocalizedName("stamp_desh_plate").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":stamp_desh_plate");
|
||||
stamp_desh_wire = new ItemStamp(0, StampType.WIRE).setUnlocalizedName("stamp_desh_wire").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":stamp_desh_wire");
|
||||
stamp_desh_circuit = new ItemStamp(0, StampType.CIRCUIT).setUnlocalizedName("stamp_desh_circuit").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":stamp_desh_circuit");
|
||||
stamp_357 = new ItemStamp(1000, StampType.C357).setUnlocalizedName("stamp_357").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":stamp_357");
|
||||
stamp_44 = new ItemStamp(1000, StampType.C44).setUnlocalizedName("stamp_44").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":stamp_44");
|
||||
stamp_9 = new ItemStamp(1000, StampType.C9).setUnlocalizedName("stamp_9").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":stamp_9");
|
||||
stamp_50 = new ItemStamp(1000, StampType.C50).setUnlocalizedName("stamp_50").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":stamp_50");
|
||||
|
||||
blades_aluminium = new ItemBlades(20).setUnlocalizedName("blades_aluminium").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":blades_aluminium");
|
||||
blades_gold = new ItemBlades(30).setUnlocalizedName("blades_gold").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":blades_gold");
|
||||
@ -6218,6 +6227,10 @@ public class ModItems {
|
||||
GameRegistry.registerItem(stamp_schrabidium_plate, stamp_schrabidium_plate.getUnlocalizedName());
|
||||
GameRegistry.registerItem(stamp_schrabidium_wire, stamp_schrabidium_wire.getUnlocalizedName());
|
||||
GameRegistry.registerItem(stamp_schrabidium_circuit, stamp_schrabidium_circuit.getUnlocalizedName());
|
||||
GameRegistry.registerItem(stamp_desh_flat, stamp_desh_flat.getUnlocalizedName());
|
||||
GameRegistry.registerItem(stamp_desh_plate, stamp_desh_plate.getUnlocalizedName());
|
||||
GameRegistry.registerItem(stamp_desh_wire, stamp_desh_wire.getUnlocalizedName());
|
||||
GameRegistry.registerItem(stamp_desh_circuit, stamp_desh_circuit.getUnlocalizedName());
|
||||
GameRegistry.registerItem(stamp_357, stamp_357.getUnlocalizedName());
|
||||
GameRegistry.registerItem(stamp_44, stamp_44.getUnlocalizedName());
|
||||
GameRegistry.registerItem(stamp_9, stamp_9.getUnlocalizedName());
|
||||
|
||||
@ -1,5 +1,7 @@
|
||||
package com.hbm.items.machine;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.items.ModItems;
|
||||
@ -9,33 +11,38 @@ import net.minecraft.item.ItemStack;
|
||||
|
||||
public class ItemStamp extends Item {
|
||||
|
||||
public ItemStamp(int dura)
|
||||
{
|
||||
public StampType type;
|
||||
public static final HashMap<StampType, List<ItemStack>> stamps = new HashMap();
|
||||
|
||||
public ItemStamp(int dura, StampType type) {
|
||||
this.setMaxDamage(dura);
|
||||
this.type = type;
|
||||
|
||||
List<ItemStack> list = stamps.get(type);
|
||||
|
||||
if(list == null)
|
||||
list = new ArrayList();
|
||||
|
||||
list.add(new ItemStack(this));
|
||||
stamps.put(type, list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean bool)
|
||||
{
|
||||
if(this == ModItems.stamp_iron_circuit ||
|
||||
this == ModItems.stamp_iron_plate ||
|
||||
this == ModItems.stamp_iron_wire ||
|
||||
this == ModItems.stamp_obsidian_circuit ||
|
||||
this == ModItems.stamp_obsidian_plate ||
|
||||
this == ModItems.stamp_obsidian_wire ||
|
||||
this == ModItems.stamp_schrabidium_circuit ||
|
||||
this == ModItems.stamp_schrabidium_plate ||
|
||||
this == ModItems.stamp_schrabidium_wire ||
|
||||
this == ModItems.stamp_steel_circuit ||
|
||||
this == ModItems.stamp_steel_plate ||
|
||||
this == ModItems.stamp_steel_wire ||
|
||||
this == ModItems.stamp_titanium_circuit ||
|
||||
this == ModItems.stamp_titanium_plate ||
|
||||
this == ModItems.stamp_titanium_wire ||
|
||||
this == ModItems.stamp_stone_circuit ||
|
||||
this == ModItems.stamp_stone_plate ||
|
||||
this == ModItems.stamp_stone_wire)
|
||||
list.add("[CREATED USING TEMPLATE FOLDER]");
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean bool) {
|
||||
if(this.type == StampType.PLATE || this.type == StampType.WIRE || this.type == StampType.CIRCUIT)
|
||||
list.add("[CREATED USING TEMPLATE FOLDER]");
|
||||
}
|
||||
|
||||
//TODO: give UFFR one (1) good boy token
|
||||
public static enum StampType {
|
||||
FLAT,
|
||||
PLATE,
|
||||
WIRE,
|
||||
CIRCUIT,
|
||||
//DISC,
|
||||
C357,
|
||||
C44,
|
||||
C50,
|
||||
C9;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -2,6 +2,7 @@ package com.hbm.tileentity.machine;
|
||||
|
||||
import com.hbm.interfaces.IConsumer;
|
||||
import com.hbm.inventory.recipes.MachineRecipes;
|
||||
import com.hbm.inventory.recipes.PressRecipes;
|
||||
import com.hbm.items.machine.ItemStamp;
|
||||
import com.hbm.lib.Library;
|
||||
import com.hbm.packet.AuxElectricityPacket;
|
||||
@ -209,7 +210,7 @@ public class TileEntityMachineEPress extends TileEntity implements ISidedInvento
|
||||
int speed = 25;
|
||||
|
||||
if(slots[1] != null && slots[2] != null) {
|
||||
ItemStack stack = MachineRecipes.getPressResult(slots[2].copy(), slots[1].copy());
|
||||
ItemStack stack = PressRecipes.getOutput(slots[2], slots[1]);
|
||||
if(stack != null &&
|
||||
(slots[3] == null ||
|
||||
(slots[3].getItem() == stack.getItem() &&
|
||||
@ -230,9 +231,11 @@ public class TileEntityMachineEPress extends TileEntity implements ISidedInvento
|
||||
if(slots[2].stackSize <= 0)
|
||||
slots[2] = null;
|
||||
|
||||
slots[1].setItemDamage(slots[1].getItemDamage() + 1);
|
||||
if(slots[1].getItemDamage() >= slots[1].getMaxDamage())
|
||||
slots[1] = null;
|
||||
if(slots[1].getMaxDamage() != 0) {
|
||||
slots[1].setItemDamage(slots[1].getItemDamage() + 1);
|
||||
if(slots[1].getItemDamage() >= slots[1].getMaxDamage())
|
||||
slots[1] = null;
|
||||
}
|
||||
|
||||
this.worldObj.playSoundEffect(this.xCoord, this.yCoord, this.zCoord, "hbm:block.pressOperate", 1.5F, 1.0F);
|
||||
}
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
package com.hbm.tileentity.machine;
|
||||
|
||||
import com.hbm.inventory.recipes.MachineRecipes;
|
||||
import com.hbm.inventory.recipes.PressRecipes;
|
||||
import com.hbm.items.machine.ItemStamp;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
import com.hbm.packet.TEPressPacket;
|
||||
@ -232,7 +233,7 @@ public class TileEntityMachinePress extends TileEntity implements ISidedInventor
|
||||
int speed = power * 25 / maxPower;
|
||||
|
||||
if(slots[1] != null && slots[2] != null) {
|
||||
ItemStack stack = MachineRecipes.getPressResult(slots[2].copy(), slots[1].copy());
|
||||
ItemStack stack = PressRecipes.getOutput(slots[2], slots[1]);
|
||||
if(stack != null &&
|
||||
(slots[3] == null ||
|
||||
(slots[3].getItem() == stack.getItem() &&
|
||||
@ -251,9 +252,11 @@ public class TileEntityMachinePress extends TileEntity implements ISidedInventor
|
||||
if(slots[2].stackSize <= 0)
|
||||
slots[2] = null;
|
||||
|
||||
slots[1].setItemDamage(slots[1].getItemDamage() + 1);
|
||||
if(slots[1].getItemDamage() >= slots[1].getMaxDamage())
|
||||
slots[1] = null;
|
||||
if(slots[1].getMaxDamage() != 0) {
|
||||
slots[1].setItemDamage(slots[1].getItemDamage() + 1);
|
||||
if(slots[1].getItemDamage() >= slots[1].getMaxDamage())
|
||||
slots[1] = null;
|
||||
}
|
||||
|
||||
this.worldObj.playSoundEffect(this.xCoord, this.yCoord, this.zCoord, "hbm:block.pressOperate", 1.5F, 1.0F);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user