Update to 1.12: Recipes
The recipe book is quite inconsistent about NBT...
This commit is contained in:
parent
d0472b45b9
commit
9ee44021bc
|
@ -27,6 +27,7 @@ import malte0811.industrialWires.blocks.converter.TileEntityMechICtoIE;
|
||||||
import malte0811.industrialWires.blocks.converter.TileEntityMechIEtoIC;
|
import malte0811.industrialWires.blocks.converter.TileEntityMechIEtoIC;
|
||||||
import malte0811.industrialWires.blocks.wire.*;
|
import malte0811.industrialWires.blocks.wire.*;
|
||||||
import malte0811.industrialWires.controlpanel.PanelUtils;
|
import malte0811.industrialWires.controlpanel.PanelUtils;
|
||||||
|
import malte0811.industrialWires.crafting.Recipes;
|
||||||
import malte0811.industrialWires.items.ItemIC2Coil;
|
import malte0811.industrialWires.items.ItemIC2Coil;
|
||||||
import malte0811.industrialWires.items.ItemKey;
|
import malte0811.industrialWires.items.ItemKey;
|
||||||
import malte0811.industrialWires.items.ItemPanelComponent;
|
import malte0811.industrialWires.items.ItemPanelComponent;
|
||||||
|
@ -34,12 +35,11 @@ import malte0811.industrialWires.network.MessageGUIInteract;
|
||||||
import malte0811.industrialWires.network.MessageItemSync;
|
import malte0811.industrialWires.network.MessageItemSync;
|
||||||
import malte0811.industrialWires.network.MessagePanelInteract;
|
import malte0811.industrialWires.network.MessagePanelInteract;
|
||||||
import malte0811.industrialWires.network.MessageTileSyncIW;
|
import malte0811.industrialWires.network.MessageTileSyncIW;
|
||||||
import malte0811.industrialWires.wires.IC2Wiretype;
|
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.creativetab.CreativeTabs;
|
import net.minecraft.creativetab.CreativeTabs;
|
||||||
import net.minecraft.item.Item;
|
import net.minecraft.item.Item;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraftforge.common.MinecraftForge;
|
import net.minecraft.item.crafting.IRecipe;
|
||||||
import net.minecraftforge.event.RegistryEvent;
|
import net.minecraftforge.event.RegistryEvent;
|
||||||
import net.minecraftforge.fml.common.Mod;
|
import net.minecraftforge.fml.common.Mod;
|
||||||
import net.minecraftforge.fml.common.Mod.EventHandler;
|
import net.minecraftforge.fml.common.Mod.EventHandler;
|
||||||
|
@ -137,9 +137,13 @@ public class IndustrialWires {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SubscribeEvent
|
||||||
|
public static void registerRecipes(RegistryEvent.Register<IRecipe> event) {
|
||||||
|
Recipes.addRecipes(event.getRegistry());
|
||||||
|
}
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void init(FMLInitializationEvent e) {
|
public void init(FMLInitializationEvent e) {
|
||||||
Recipes.addRecipes();
|
|
||||||
|
|
||||||
ExtraIC2Compat.addToolConmpat();
|
ExtraIC2Compat.addToolConmpat();
|
||||||
|
|
||||||
|
|
|
@ -1,180 +0,0 @@
|
||||||
/*
|
|
||||||
* This file is part of Industrial Wires.
|
|
||||||
* Copyright (C) 2016-2017 malte0811
|
|
||||||
*
|
|
||||||
* Industrial Wires is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* Industrial Wires is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with Industrial Wires. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package malte0811.industrialWires;
|
|
||||||
|
|
||||||
import blusunrize.immersiveengineering.api.tool.AssemblerHandler;
|
|
||||||
import blusunrize.immersiveengineering.common.IEContent;
|
|
||||||
import blusunrize.immersiveengineering.common.blocks.metal.BlockTypes_Connector;
|
|
||||||
import blusunrize.immersiveengineering.common.blocks.metal.BlockTypes_MetalDecoration0;
|
|
||||||
import blusunrize.immersiveengineering.common.blocks.stone.BlockTypes_StoneDecoration;
|
|
||||||
import ic2.api.item.IC2Items;
|
|
||||||
import malte0811.industrialWires.blocks.controlpanel.BlockTypes_Panel;
|
|
||||||
import malte0811.industrialWires.controlpanel.PanelUtils;
|
|
||||||
import malte0811.industrialWires.crafting.*;
|
|
||||||
import malte0811.industrialWires.wires.IC2Wiretype;
|
|
||||||
import net.minecraft.init.Blocks;
|
|
||||||
import net.minecraft.init.Items;
|
|
||||||
import net.minecraft.item.ItemStack;
|
|
||||||
import net.minecraft.item.crafting.IRecipe;
|
|
||||||
import net.minecraft.util.NonNullList;
|
|
||||||
import net.minecraftforge.fml.common.registry.GameRegistry;
|
|
||||||
import net.minecraftforge.oredict.RecipeSorter;
|
|
||||||
import net.minecraftforge.oredict.ShapedOreRecipe;
|
|
||||||
import net.minecraftforge.oredict.ShapelessOreRecipe;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import static malte0811.industrialWires.IndustrialWires.*;
|
|
||||||
|
|
||||||
public class Recipes {
|
|
||||||
public static void addRecipes() {
|
|
||||||
/*addCustomRecipes();
|
|
||||||
addConnectors();
|
|
||||||
if (mechConv != null) {
|
|
||||||
addMechConverters();
|
|
||||||
}
|
|
||||||
addJacobs();
|
|
||||||
registerPanels();*/
|
|
||||||
}
|
|
||||||
|
|
||||||
/* private static void addConnectors() {
|
|
||||||
ItemStack glassCable = IC2Items.getItem("cable", "type:glass,insulation:0");
|
|
||||||
//CONNECTORS
|
|
||||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ic2conn, 4, 0), " t ", "rtr", "rtr", 't', "ingotTin", 'r', "itemRubber"));
|
|
||||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ic2conn, 4, 2), " c ", "rcr", "rcr", 'c', "ingotCopper", 'r', "itemRubber"));
|
|
||||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ic2conn, 4, 4), " g ", "rgr", "rgr", 'g', "ingotGold", 'r', "itemRubber"));
|
|
||||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ic2conn, 4, 6), " i ", "rir", "rir", 'i', "ingotIron", 'r', "itemRubber"));
|
|
||||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ic2conn, 4, 8), " c ", "rcr", "rcr", 'c', glassCable, 'r', "itemRubber"));
|
|
||||||
//RELAYS
|
|
||||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ic2conn, 4, 1), " t ", "rtr", 't', "ingotTin", 'r', "itemRubber"));
|
|
||||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ic2conn, 4, 3), " c ", "rcr", 'c', "ingotCopper", 'r', "itemRubber"));
|
|
||||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ic2conn, 4, 5), " g ", "rgr", 'g', "ingotGold", 'r', "itemRubber"));
|
|
||||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ic2conn, 4, 7), " i ", "gig", "gig", 'i', "ingotIron", 'g', new ItemStack(IEContent.blockStoneDecoration, 1, BlockTypes_StoneDecoration.INSULATING_GLASS.getMeta())));
|
|
||||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ic2conn, 2, 9), " c ", "grg", "grg", 'r', "itemRubber", 'c', glassCable, 'g', new ItemStack(IEContent.blockStoneDecoration, 1, BlockTypes_StoneDecoration.INSULATING_GLASS.getMeta())));
|
|
||||||
}
|
|
||||||
|
|
||||||
private static void addMechConverters() {
|
|
||||||
ItemStack shaftIron = IC2Items.getItem("crafting", "iron_shaft");
|
|
||||||
ItemStack shaftSteel = IC2Items.getItem("crafting", "steel_shaft");
|
|
||||||
ItemStack ironMechComponent = new ItemStack(IEContent.itemMaterial, 1, 8);
|
|
||||||
ItemStack steelMechComponent = new ItemStack(IEContent.itemMaterial, 1, 9);
|
|
||||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(mechConv, 1, 0), " s ", "ici", "mum", 's', "stickIron",
|
|
||||||
'i', "ingotIron", 'c', new ItemStack(IEContent.blockMetalDecoration0, 1, BlockTypes_MetalDecoration0.COIL_LV.getMeta()),
|
|
||||||
'u', "ingotCopper", 'm', ironMechComponent));
|
|
||||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(mechConv, 1, 2), "iIi", "sbS", "mrm", 's', "blockSheetmetalIron",
|
|
||||||
'i', "plateIron", 'I', shaftIron,
|
|
||||||
'b', "ingotBronze", 'm', steelMechComponent,
|
|
||||||
'S', "blockSheetmetalSteel", 'r', "stickSteel"));
|
|
||||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(mechConv, 1, 1), "mrm", "sbS", "iIi", 's', "blockSheetmetalIron",
|
|
||||||
'i', "plateSteel", 'I', shaftSteel,
|
|
||||||
'b', "ingotBronze", 'm', ironMechComponent,
|
|
||||||
'S', "blockSheetmetalSteel", 'r', "stickIron"));
|
|
||||||
}
|
|
||||||
|
|
||||||
private static void addCustomRecipes() {
|
|
||||||
RecipeSorter.register("industrialwires:key_ring", RecipeKeyRing.class, RecipeSorter.Category.SHAPELESS, "after:forge:shapelessore");
|
|
||||||
RecipeSorter.register("industrialwires:key_lock", RecipeKeyLock.class, RecipeSorter.Category.SHAPELESS, "after:forge:shapelessore");
|
|
||||||
RecipeSorter.register("industrialwires:cmp_copy", RecipeComponentCopy.class, RecipeSorter.Category.SHAPED, "after:forge:shapelessore");
|
|
||||||
RecipeSorter.register("industrialwires:coilLength", RecipeCoilLength.class, RecipeSorter.Category.SHAPELESS, "after:forge:shapelessore");
|
|
||||||
RecipeSorter.register("industrialwires:init_pc", RecipeInitPC.class, RecipeSorter.Category.SHAPED, "after:forge:shapedore");
|
|
||||||
GameRegistry.addRecipe(new RecipeKeyLock());
|
|
||||||
GameRegistry.addRecipe(new RecipeKeyRing());
|
|
||||||
GameRegistry.addRecipe(new RecipeComponentCopy());
|
|
||||||
for (int i = 0; i < IC2Wiretype.IC2_TYPES.length; i++) {
|
|
||||||
GameRegistry.addRecipe(new RecipeCoilLength(i));
|
|
||||||
}
|
|
||||||
AssemblerHandler.registerRecipeAdapter(RecipeCoilLength.class, new AllRecipeAdapter<>());
|
|
||||||
AssemblerHandler.registerRecipeAdapter(RecipeComponentCopy.class, new AllRecipeAdapter<>());
|
|
||||||
AssemblerHandler.registerRecipeAdapter(RecipeKeyLock.class, new AllRecipeAdapter<>());
|
|
||||||
AssemblerHandler.registerRecipeAdapter(RecipeKeyRing.class, new AllRecipeAdapter<>());
|
|
||||||
}
|
|
||||||
private static void registerPanels() {
|
|
||||||
// CONTROL PANELS
|
|
||||||
ItemStack drillHeadIron = new ItemStack(IEContent.itemDrillhead, 1, 1);
|
|
||||||
ItemStack motor = IC2Items.getItem("crafting", "electric_motor");
|
|
||||||
ItemStack advAlloy = IC2Items.getItem("crafting", "alloy");
|
|
||||||
ItemStack coil = IC2Items.getItem("crafting", "coil");
|
|
||||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(panel, 1, BlockTypes_Panel.CREATOR.ordinal()),
|
|
||||||
"rmr", "rdr", "rar", 'r', "stickSteel", 'm', motor, 'd', drillHeadIron, 'a', advAlloy));
|
|
||||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(panel, 4, BlockTypes_Panel.DUMMY.ordinal()),
|
|
||||||
" r ", "rmr", " r ", 'r', "dustRedstone", 'm', PanelUtils.getPanelBase()));
|
|
||||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(panel, 1, BlockTypes_Panel.RS_WIRE.ordinal()),
|
|
||||||
"c", "d", 'd', new ItemStack(panel, 1, BlockTypes_Panel.DUMMY.ordinal()), 'c',
|
|
||||||
new ItemStack(IEContent.blockConnectors, 1, BlockTypes_Connector.CONNECTOR_REDSTONE.ordinal())));
|
|
||||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(panel, 1, BlockTypes_Panel.UNFINISHED.ordinal()),
|
|
||||||
"ppp", "www", "ppp", 'p', "plateIron", 'w', "wireCopper"));
|
|
||||||
// PANEL COMPONENTS
|
|
||||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(panelComponent, 1, 0),
|
|
||||||
"dustGlowstone", Blocks.STONE_BUTTON, "wireCopper"));
|
|
||||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(panelComponent, 4, 1),
|
|
||||||
"paper", "plateIron"));
|
|
||||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(panelComponent, 1, 2),
|
|
||||||
"dustGlowstone", "dustRedstone", "wireCopper"));
|
|
||||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(panelComponent, 1, 3),
|
|
||||||
Blocks.STONE_BUTTON, new ItemStack(IEContent.itemWireCoil, 1, 2), "wireCopper"));
|
|
||||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(panelComponent, 1, 4),
|
|
||||||
"r", "g", "c", 'r', "itemRubber", 'g', "ingotHOPGraphite", 'c', coil));
|
|
||||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(panelComponent, 1, 5),
|
|
||||||
"stickIron", Blocks.LEVER, "wireCopper"));
|
|
||||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(panelComponent, 1, 6),
|
|
||||||
"aaa", "asa", 'a', "plateAluminum", 's', new ItemStack(panelComponent, 2, 5)));
|
|
||||||
GameRegistry.addRecipe(new RecipeInitPC(new ItemStack(panelComponent, 1, 7),
|
|
||||||
"rdr", " w ", 'r', "stickSteel", 'd', Items.IRON_DOOR, 'w', "wireCopper"));
|
|
||||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(key, 1, 0),
|
|
||||||
"rrp", 'r', "stickSteel", 'p', "plateSteel"));
|
|
||||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(panelComponent, 1, 8),
|
|
||||||
"wireCopper", new ItemStack(IEContent.itemTool, 1, 2)));
|
|
||||||
}
|
|
||||||
private static void addJacobs() {
|
|
||||||
ItemStack mvTransformer = IC2Items.getItem("te", "mv_transformer");
|
|
||||||
ItemStack copperCable = IC2Items.getItem("cable", "type:copper,insulation:0");
|
|
||||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(jacobsLadder, 1, 0), "c c", " h ", "sts", 'c', copperCable, 'h', Blocks.HARDENED_CLAY,
|
|
||||||
's', "ingotSteel", 't', mvTransformer));
|
|
||||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(jacobsLadder, 1, 1), "c c", "h h", "sts", 'c', "ingotCopper", 'h', Blocks.HARDENED_CLAY,
|
|
||||||
's', "ingotSteel", 't', new ItemStack(IEContent.blockConnectors, 1, BlockTypes_Connector.TRANSFORMER.ordinal())));
|
|
||||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(jacobsLadder, 1, 2), "c c", "hhh", "sts", 'c', "blockCopper", 'h', Blocks.HARDENED_CLAY,
|
|
||||||
's', "ingotSteel", 't', new ItemStack(IEContent.blockConnectors, 1, BlockTypes_Connector.TRANSFORMER_HV.ordinal())));
|
|
||||||
}
|
|
||||||
private static class AllRecipeAdapter<T extends IRecipe> implements AssemblerHandler.IRecipeAdapter<T> {
|
|
||||||
@Override
|
|
||||||
public AssemblerHandler.RecipeQuery[] getQueriedInputs(T recipe, NonNullList<ItemStack> in) {
|
|
||||||
List<AssemblerHandler.RecipeQuery> ret = new ArrayList<>();
|
|
||||||
for (int i = 0; i < in.size() - 1; i++) {
|
|
||||||
boolean added = false;
|
|
||||||
for (AssemblerHandler.RecipeQuery aRet : ret) {
|
|
||||||
if (ItemStack.areItemStacksEqual((ItemStack) aRet.query, in.get(i))) {
|
|
||||||
aRet.querySize++;
|
|
||||||
added = true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (!added) {
|
|
||||||
ret.add(new AssemblerHandler.RecipeQuery(in.get(i), 1));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return ret.toArray(new AssemblerHandler.RecipeQuery[ret.size()]);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public AssemblerHandler.RecipeQuery[] getQueriedInputs(T arg0) {
|
|
||||||
return new AssemblerHandler.RecipeQuery[0];
|
|
||||||
}
|
|
||||||
}*/
|
|
||||||
}
|
|
|
@ -18,7 +18,6 @@
|
||||||
|
|
||||||
package malte0811.industrialWires.blocks.controlpanel;
|
package malte0811.industrialWires.blocks.controlpanel;
|
||||||
|
|
||||||
import blusunrize.immersiveengineering.common.util.IELogger;
|
|
||||||
import malte0811.industrialWires.IndustrialWires;
|
import malte0811.industrialWires.IndustrialWires;
|
||||||
import malte0811.industrialWires.blocks.IBlockBoundsIW;
|
import malte0811.industrialWires.blocks.IBlockBoundsIW;
|
||||||
import malte0811.industrialWires.blocks.INetGUI;
|
import malte0811.industrialWires.blocks.INetGUI;
|
||||||
|
@ -94,7 +93,7 @@ public class TileEntityPanelCreator extends TileEntityIWBase implements INetGUI,
|
||||||
p.inventory.markDirty();
|
p.inventory.markDirty();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
IELogger.info("(IndustrialWires) Failed to load panel component send by " + p.getDisplayNameString());
|
IndustrialWires.logger.info("(IndustrialWires) Failed to load panel component send by " + p.getDisplayNameString());
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case REMOVE:
|
case REMOVE:
|
||||||
|
|
|
@ -30,7 +30,6 @@ import net.minecraft.entity.player.EntityPlayerMP;
|
||||||
import net.minecraft.nbt.NBTTagCompound;
|
import net.minecraft.nbt.NBTTagCompound;
|
||||||
import net.minecraft.util.math.AxisAlignedBB;
|
import net.minecraft.util.math.AxisAlignedBB;
|
||||||
import net.minecraft.util.math.Vec3d;
|
import net.minecraft.util.math.Vec3d;
|
||||||
import net.minecraftforge.fml.common.FMLLog;
|
|
||||||
import net.minecraftforge.fml.relauncher.Side;
|
import net.minecraftforge.fml.relauncher.Side;
|
||||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||||
import org.apache.logging.log4j.Level;
|
import org.apache.logging.log4j.Level;
|
||||||
|
@ -153,7 +152,7 @@ public abstract class PanelComponent {
|
||||||
ret.readFromNBT(nbt);
|
ret.readFromNBT(nbt);
|
||||||
return ret;
|
return ret;
|
||||||
} else {
|
} else {
|
||||||
FMLLog.log(IndustrialWires.MODID, Level.WARN, "Unknown panel component: " + type);
|
IndustrialWires.logger.warn("Unknown panel component: " + type);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,27 +17,34 @@
|
||||||
*/
|
*/
|
||||||
package malte0811.industrialWires.crafting;
|
package malte0811.industrialWires.crafting;
|
||||||
|
|
||||||
|
import blusunrize.immersiveengineering.api.ApiUtils;
|
||||||
|
import it.unimi.dsi.fastutil.ints.IntArrayList;
|
||||||
|
import it.unimi.dsi.fastutil.ints.IntList;
|
||||||
import malte0811.industrialWires.IndustrialWires;
|
import malte0811.industrialWires.IndustrialWires;
|
||||||
import malte0811.industrialWires.items.ItemIC2Coil;
|
import malte0811.industrialWires.items.ItemIC2Coil;
|
||||||
import net.minecraft.inventory.InventoryCrafting;
|
import net.minecraft.inventory.InventoryCrafting;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.item.crafting.IRecipe;
|
import net.minecraft.item.crafting.IRecipe;
|
||||||
|
import net.minecraft.item.crafting.Ingredient;
|
||||||
import net.minecraft.util.NonNullList;
|
import net.minecraft.util.NonNullList;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
import net.minecraftforge.common.crafting.IngredientNBT;
|
||||||
import net.minecraftforge.oredict.OreDictionary;
|
import net.minecraftforge.oredict.OreDictionary;
|
||||||
import net.minecraftforge.registries.IForgeRegistryEntry;
|
import net.minecraftforge.registries.IForgeRegistryEntry;
|
||||||
|
|
||||||
import javax.annotation.Nonnull;
|
import javax.annotation.Nonnull;
|
||||||
|
import javax.annotation.Nullable;
|
||||||
|
import java.util.Random;
|
||||||
|
|
||||||
public class RecipeCoilLength extends IForgeRegistryEntry.Impl<IRecipe> implements IRecipe {
|
public class RecipeCoilLength extends IForgeRegistryEntry.Impl<IRecipe> implements IRecipe {
|
||||||
public final ItemStack coil;
|
public final ItemStack coil;
|
||||||
public final ItemStack cable;
|
public final Ingredient cable;
|
||||||
private final int maxLength;
|
private final int maxLength;
|
||||||
|
|
||||||
public RecipeCoilLength(int meta) {
|
public RecipeCoilLength(ItemStack coil, Ingredient cable) {
|
||||||
coil = new ItemStack(IndustrialWires.coil, 1, meta);
|
this.coil = coil;
|
||||||
cable = ItemIC2Coil.getUninsulatedCable(coil);
|
this.cable = cable;
|
||||||
maxLength = ItemIC2Coil.getMaxWireLength(coil);
|
maxLength = ItemIC2Coil.getMaxWireLength(this.coil);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -62,7 +69,7 @@ public class RecipeCoilLength extends IForgeRegistryEntry.Impl<IRecipe> implemen
|
||||||
@Nonnull
|
@Nonnull
|
||||||
@Override
|
@Override
|
||||||
public ItemStack getRecipeOutput() {
|
public ItemStack getRecipeOutput() {
|
||||||
return ItemStack.EMPTY;
|
return coil;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Nonnull
|
@Nonnull
|
||||||
|
@ -79,7 +86,7 @@ public class RecipeCoilLength extends IForgeRegistryEntry.Impl<IRecipe> implemen
|
||||||
ret.set(i, currStack);
|
ret.set(i, currStack);
|
||||||
ItemIC2Coil.setLength(currStack, -length);
|
ItemIC2Coil.setLength(currStack, -length);
|
||||||
}
|
}
|
||||||
} else if (OreDictionary.itemMatches(curr, cable, false)) {
|
} else if (isCable(curr)) {
|
||||||
length--;
|
length--;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -92,7 +99,7 @@ public class RecipeCoilLength extends IForgeRegistryEntry.Impl<IRecipe> implemen
|
||||||
ItemStack curr = inv.getStackInSlot(i);
|
ItemStack curr = inv.getStackInSlot(i);
|
||||||
if (OreDictionary.itemMatches(curr, coil, false)) {
|
if (OreDictionary.itemMatches(curr, coil, false)) {
|
||||||
cableLength += ItemIC2Coil.getLength(curr);
|
cableLength += ItemIC2Coil.getLength(curr);
|
||||||
} else if (OreDictionary.itemMatches(curr, cable, false)) {
|
} else if (isCable(curr)) {
|
||||||
cableLength++;
|
cableLength++;
|
||||||
} else if (!curr.isEmpty()) {
|
} else if (!curr.isEmpty()) {
|
||||||
return -1;
|
return -1;
|
||||||
|
@ -100,4 +107,59 @@ public class RecipeCoilLength extends IForgeRegistryEntry.Impl<IRecipe> implemen
|
||||||
}
|
}
|
||||||
return cableLength;
|
return cableLength;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Nonnull
|
||||||
|
@Override
|
||||||
|
public NonNullList<Ingredient> getIngredients() {
|
||||||
|
Random r = new Random();
|
||||||
|
NonNullList<Ingredient> ret = NonNullList.withSize(9, Ingredient.EMPTY);
|
||||||
|
for (int i = 0;i<ret.size();i++) {
|
||||||
|
ItemStack[] types = new ItemStack[cable.getMatchingStacks().length+1];
|
||||||
|
int length = types.length;
|
||||||
|
int cablePos = 0;
|
||||||
|
if (r.nextBoolean()) {
|
||||||
|
types[length-1] = coil;
|
||||||
|
} else {
|
||||||
|
types[0] = coil;
|
||||||
|
cablePos = 1;
|
||||||
|
}
|
||||||
|
System.arraycopy(cable.getMatchingStacks(), 0, types, cablePos, length-1);
|
||||||
|
ret.set(i, new UnmatchedIngredient(types));
|
||||||
|
}
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
private boolean isCable(ItemStack stack) {
|
||||||
|
for (ItemStack curr:cable.getMatchingStacks()) {
|
||||||
|
if (ItemStack.areItemsEqual(stack, curr) && ItemStack.areItemStackTagsEqual(stack, curr)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
//There is probably a better way to do this...
|
||||||
|
private static class UnmatchedIngredient extends Ingredient {
|
||||||
|
public UnmatchedIngredient(ItemStack[] in) {
|
||||||
|
super(in);
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public boolean apply(@Nullable ItemStack input) {
|
||||||
|
IndustrialWires.logger.info(input);
|
||||||
|
if (input == null)
|
||||||
|
return false;
|
||||||
|
for (ItemStack stack:getMatchingStacks()) {
|
||||||
|
if (ItemStack.areItemsEqual(stack, input) && ItemStack.areItemStackTagsEqual(stack, input)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Nonnull
|
||||||
|
@Override
|
||||||
|
public IntList getValidItemStacksPacked() {
|
||||||
|
return new IntArrayList(0);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -107,4 +107,9 @@ public class RecipeComponentCopy extends IForgeRegistryEntry.Impl<IRecipe> imple
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isHidden() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -24,14 +24,16 @@ import net.minecraft.inventory.InventoryCrafting;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.util.ResourceLocation;
|
import net.minecraft.util.ResourceLocation;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
import net.minecraftforge.common.crafting.CraftingHelper;
|
||||||
|
import net.minecraftforge.common.crafting.CraftingHelper.ShapedPrimer;
|
||||||
import net.minecraftforge.oredict.ShapedOreRecipe;
|
import net.minecraftforge.oredict.ShapedOreRecipe;
|
||||||
|
|
||||||
import javax.annotation.Nonnull;
|
import javax.annotation.Nonnull;
|
||||||
|
|
||||||
public class RecipeInitPC extends ShapedOreRecipe {
|
public class RecipeInitPC extends ShapedOreRecipe {
|
||||||
|
|
||||||
public RecipeInitPC(ResourceLocation group, ItemStack result, Object... recipe) {
|
public RecipeInitPC(ShapedOreRecipe factory) {
|
||||||
super(group, result, recipe);
|
super(factory.getRegistryName(), factory.getRecipeOutput(), primerFromRecipe(factory));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Nonnull
|
@Nonnull
|
||||||
|
@ -45,8 +47,12 @@ public class RecipeInitPC extends ShapedOreRecipe {
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
private static ShapedPrimer primerFromRecipe(ShapedOreRecipe recipe) {
|
||||||
public boolean matches(InventoryCrafting inv, World world) {
|
ShapedPrimer ret = new ShapedPrimer();
|
||||||
return super.matches(inv, world);
|
ret.height = recipe.getHeight();
|
||||||
|
ret.width = recipe.getWidth();
|
||||||
|
ret.input = recipe.getIngredients();
|
||||||
|
ret.mirrored = true;
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,6 +26,7 @@ import malte0811.industrialWires.items.ItemPanelComponent;
|
||||||
import net.minecraft.inventory.InventoryCrafting;
|
import net.minecraft.inventory.InventoryCrafting;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.item.crafting.IRecipe;
|
import net.minecraft.item.crafting.IRecipe;
|
||||||
|
import net.minecraft.item.crafting.Ingredient;
|
||||||
import net.minecraft.util.NonNullList;
|
import net.minecraft.util.NonNullList;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import net.minecraftforge.registries.IForgeRegistryEntry;
|
import net.minecraftforge.registries.IForgeRegistryEntry;
|
||||||
|
@ -110,4 +111,13 @@ public class RecipeKeyLock extends IForgeRegistryEntry.Impl<IRecipe> implements
|
||||||
}
|
}
|
||||||
return ItemStack.EMPTY;
|
return ItemStack.EMPTY;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Nonnull
|
||||||
|
@Override
|
||||||
|
public NonNullList<Ingredient> getIngredients() {
|
||||||
|
NonNullList<Ingredient> ret = NonNullList.withSize(2, Ingredient.EMPTY);
|
||||||
|
ret.set(0, Ingredient.fromStacks(new ItemStack(IndustrialWires.key, 1, 0)));
|
||||||
|
ret.set(1, Ingredient.fromStacks(new ItemStack(IndustrialWires.panelComponent, 1, 7)));
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -22,6 +22,7 @@ import malte0811.industrialWires.IndustrialWires;
|
||||||
import net.minecraft.inventory.InventoryCrafting;
|
import net.minecraft.inventory.InventoryCrafting;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.item.crafting.IRecipe;
|
import net.minecraft.item.crafting.IRecipe;
|
||||||
|
import net.minecraft.item.crafting.Ingredient;
|
||||||
import net.minecraft.nbt.NBTTagCompound;
|
import net.minecraft.nbt.NBTTagCompound;
|
||||||
import net.minecraft.nbt.NBTTagList;
|
import net.minecraft.nbt.NBTTagList;
|
||||||
import net.minecraft.util.NonNullList;
|
import net.minecraft.util.NonNullList;
|
||||||
|
@ -29,53 +30,58 @@ import net.minecraft.world.World;
|
||||||
import net.minecraftforge.registries.IForgeRegistryEntry;
|
import net.minecraftforge.registries.IForgeRegistryEntry;
|
||||||
|
|
||||||
import javax.annotation.Nonnull;
|
import javax.annotation.Nonnull;
|
||||||
import javax.annotation.Nullable;
|
|
||||||
|
|
||||||
import static malte0811.industrialWires.items.ItemKey.*;
|
import static malte0811.industrialWires.items.ItemKey.*;
|
||||||
|
|
||||||
public class RecipeKeyRing extends IForgeRegistryEntry.Impl<IRecipe> implements IRecipe {
|
public class RecipeKeyRing extends IForgeRegistryEntry.Impl<IRecipe> implements IRecipe {
|
||||||
|
|
||||||
|
private final boolean addToRing;
|
||||||
|
public RecipeKeyRing(boolean add) {
|
||||||
|
addToRing = add;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean matches(@Nonnull InventoryCrafting inv, @Nonnull World worldIn) {
|
public boolean matches(@Nonnull InventoryCrafting inv, @Nonnull World worldIn) {
|
||||||
return getType(inv) != null;
|
return isValid(inv);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Nonnull
|
@Nonnull
|
||||||
@Override
|
@Override
|
||||||
public ItemStack getCraftingResult(@Nonnull InventoryCrafting inv) {
|
public ItemStack getCraftingResult(@Nonnull InventoryCrafting inv) {
|
||||||
Boolean recipeType = getType(inv);
|
if (isValid(inv)) {
|
||||||
if (recipeType==Boolean.TRUE) {//add key to ring
|
if (addToRing) {//add key to ring
|
||||||
ItemStack ring = inv.getStackInSlot(getRingPos(inv)).copy();
|
ItemStack ring = inv.getStackInSlot(getRingPos(inv)).copy();
|
||||||
NBTTagCompound nbt = ring.getTagCompound();
|
NBTTagCompound nbt = ring.getTagCompound();
|
||||||
ItemStack key = inv.getStackInSlot(getKeyPos(inv));
|
ItemStack key = inv.getStackInSlot(getKeyPos(inv));
|
||||||
NBTTagCompound keyNBT = key.getTagCompound();
|
NBTTagCompound keyNBT = key.getTagCompound();
|
||||||
if (nbt==null) {
|
if (nbt == null) {
|
||||||
nbt = new NBTTagCompound();
|
nbt = new NBTTagCompound();
|
||||||
ring.setTagCompound(nbt);
|
ring.setTagCompound(nbt);
|
||||||
}
|
|
||||||
if (!nbt.hasKey(RING_KEYS)) {
|
|
||||||
nbt.setTag(RING_KEYS, new NBTTagList());
|
|
||||||
}
|
|
||||||
if (keyNBT!=null) {
|
|
||||||
NBTTagList keys = nbt.getTagList(RING_KEYS, 10);
|
|
||||||
if (keys.tagCount()>= IWConfig.maxKeysOnRing) {
|
|
||||||
return ItemStack.EMPTY;
|
|
||||||
}
|
}
|
||||||
keys.appendTag(keyNBT.copy());
|
if (!nbt.hasKey(RING_KEYS)) {
|
||||||
nbt.setInteger(LOCK_ID, keyNBT.getInteger(LOCK_ID));
|
nbt.setTag(RING_KEYS, new NBTTagList());
|
||||||
nbt.setString(NAME, keyNBT.getString(NAME));
|
}
|
||||||
}
|
if (keyNBT != null) {
|
||||||
return ring;
|
NBTTagList keys = nbt.getTagList(RING_KEYS, 10);
|
||||||
} else {//remove key from ring
|
if (keys.tagCount() >= IWConfig.maxKeysOnRing) {
|
||||||
ItemStack ring = inv.getStackInSlot(getRingPos(inv)).copy();
|
return ItemStack.EMPTY;
|
||||||
NBTTagCompound nbt = ring.getTagCompound();
|
}
|
||||||
ItemStack key = new ItemStack(IndustrialWires.key, 1, 1);
|
keys.appendTag(keyNBT.copy());
|
||||||
if (nbt!=null) {
|
nbt.setInteger(LOCK_ID, keyNBT.getInteger(LOCK_ID));
|
||||||
NBTTagList keys = nbt.getTagList(RING_KEYS, 10);
|
nbt.setString(NAME, keyNBT.getString(NAME));
|
||||||
if (keys.tagCount()>0) {
|
}
|
||||||
NBTTagCompound first = keys.getCompoundTagAt(keys.tagCount()-1);
|
return ring;
|
||||||
key.setTagCompound(first);
|
} else {//remove key from ring
|
||||||
return key;
|
ItemStack ring = inv.getStackInSlot(getRingPos(inv)).copy();
|
||||||
|
NBTTagCompound nbt = ring.getTagCompound();
|
||||||
|
ItemStack key = new ItemStack(IndustrialWires.key, 1, 1);
|
||||||
|
if (nbt != null) {
|
||||||
|
NBTTagList keys = nbt.getTagList(RING_KEYS, 10);
|
||||||
|
if (keys.tagCount() > 0) {
|
||||||
|
NBTTagCompound first = keys.getCompoundTagAt(keys.tagCount() - 1);
|
||||||
|
key.setTagCompound(first);
|
||||||
|
return key;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -91,14 +97,14 @@ public class RecipeKeyRing extends IForgeRegistryEntry.Impl<IRecipe> implements
|
||||||
@Nonnull
|
@Nonnull
|
||||||
@Override
|
@Override
|
||||||
public ItemStack getRecipeOutput() {
|
public ItemStack getRecipeOutput() {
|
||||||
return ItemStack.EMPTY;
|
return new ItemStack(IndustrialWires.key, 1, addToRing?2:1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Nonnull
|
@Nonnull
|
||||||
@Override
|
@Override
|
||||||
public NonNullList<ItemStack> getRemainingItems(@Nonnull InventoryCrafting inv) {
|
public NonNullList<ItemStack> getRemainingItems(@Nonnull InventoryCrafting inv) {
|
||||||
NonNullList<ItemStack> ret = NonNullList.withSize(inv.getSizeInventory(), ItemStack.EMPTY);
|
NonNullList<ItemStack> ret = NonNullList.withSize(inv.getSizeInventory(), ItemStack.EMPTY);
|
||||||
if (getType(inv)==Boolean.FALSE) {
|
if (!addToRing) {
|
||||||
int ringId = getRingPos(inv);
|
int ringId = getRingPos(inv);
|
||||||
ItemStack ring = inv.getStackInSlot(ringId).copy();
|
ItemStack ring = inv.getStackInSlot(ringId).copy();
|
||||||
NBTTagCompound nbt = ring.getTagCompound();
|
NBTTagCompound nbt = ring.getTagCompound();
|
||||||
|
@ -119,8 +125,7 @@ public class RecipeKeyRing extends IForgeRegistryEntry.Impl<IRecipe> implements
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Nullable
|
private boolean isValid(@Nonnull InventoryCrafting inv) {
|
||||||
private Boolean getType(@Nonnull InventoryCrafting inv) {
|
|
||||||
boolean hasRing = false;
|
boolean hasRing = false;
|
||||||
boolean hasKey = false;
|
boolean hasKey = false;
|
||||||
for (int i = 0;i<inv.getSizeInventory();i++) {
|
for (int i = 0;i<inv.getSizeInventory();i++) {
|
||||||
|
@ -133,12 +138,16 @@ public class RecipeKeyRing extends IForgeRegistryEntry.Impl<IRecipe> implements
|
||||||
hasRing = true;
|
hasRing = true;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
return null;
|
return false;
|
||||||
} else if (!here.isEmpty()) {
|
} else if (!here.isEmpty()) {
|
||||||
return null;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return hasRing?hasKey:null;
|
if (addToRing) {
|
||||||
|
return hasKey&&hasRing;
|
||||||
|
} else {
|
||||||
|
return hasKey&&!hasRing;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private int getRingPos(@Nonnull InventoryCrafting inv) {
|
private int getRingPos(@Nonnull InventoryCrafting inv) {
|
||||||
|
@ -159,4 +168,16 @@ public class RecipeKeyRing extends IForgeRegistryEntry.Impl<IRecipe> implements
|
||||||
}
|
}
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Nonnull
|
||||||
|
@Override
|
||||||
|
public NonNullList<Ingredient> getIngredients() {
|
||||||
|
if (addToRing) {
|
||||||
|
NonNullList<Ingredient> ret = NonNullList.withSize(2, Ingredient.fromStacks(new ItemStack(IndustrialWires.key, 1, 1)));;
|
||||||
|
ret.set(1, Ingredient.fromStacks(new ItemStack(IndustrialWires.key, 1, 2)));
|
||||||
|
return ret;
|
||||||
|
} else {
|
||||||
|
return NonNullList.withSize(1, Ingredient.fromStacks(new ItemStack(IndustrialWires.key, 1, 2)));
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -0,0 +1,69 @@
|
||||||
|
/*
|
||||||
|
* This file is part of Industrial Wires.
|
||||||
|
* Copyright (C) 2016-2017 malte0811
|
||||||
|
*
|
||||||
|
* Industrial Wires is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* Industrial Wires is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with Industrial Wires. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package malte0811.industrialWires.crafting;
|
||||||
|
|
||||||
|
import blusunrize.immersiveengineering.api.tool.AssemblerHandler;
|
||||||
|
import ic2.api.item.IC2Items;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.item.crafting.IRecipe;
|
||||||
|
import net.minecraft.util.NonNullList;
|
||||||
|
import net.minecraftforge.registries.IForgeRegistry;
|
||||||
|
|
||||||
|
import java.util.*;
|
||||||
|
|
||||||
|
import static malte0811.industrialWires.IndustrialWires.MODID;
|
||||||
|
|
||||||
|
public class Recipes {
|
||||||
|
public static void addRecipes(IForgeRegistry<IRecipe> registry) {
|
||||||
|
registry.register(new RecipeKeyRing(true).setRegistryName(MODID, "add_key_ring"));
|
||||||
|
registry.register(new RecipeKeyRing(false).setRegistryName(MODID, "remove_key_ring"));
|
||||||
|
registry.register(new RecipeKeyLock().setRegistryName(MODID, "key_lock"));
|
||||||
|
registry.register(new RecipeComponentCopy().setRegistryName(MODID, "component_copy"));
|
||||||
|
AssemblerHandler.registerRecipeAdapter(RecipeCoilLength.class, new Recipes.AllRecipeAdapter<>());
|
||||||
|
AssemblerHandler.registerRecipeAdapter(RecipeComponentCopy.class, new Recipes.AllRecipeAdapter<>());
|
||||||
|
AssemblerHandler.registerRecipeAdapter(RecipeKeyLock.class, new Recipes.AllRecipeAdapter<>());
|
||||||
|
AssemblerHandler.registerRecipeAdapter(RecipeKeyRing.class, new Recipes.AllRecipeAdapter<>());
|
||||||
|
AssemblerHandler.registerRecipeAdapter(RecipeInitPC.class, new Recipes.AllRecipeAdapter<>());
|
||||||
|
}
|
||||||
|
private static class AllRecipeAdapter<T extends IRecipe> implements AssemblerHandler.IRecipeAdapter<T> {
|
||||||
|
@Override
|
||||||
|
public AssemblerHandler.RecipeQuery[] getQueriedInputs(T recipe, NonNullList<ItemStack> in) {
|
||||||
|
List<AssemblerHandler.RecipeQuery> ret = new ArrayList<>();
|
||||||
|
for (int i = 0; i < in.size() - 1; i++) {
|
||||||
|
boolean added = false;
|
||||||
|
for (AssemblerHandler.RecipeQuery aRet : ret) {
|
||||||
|
if (ItemStack.areItemStacksEqual((ItemStack) aRet.query, in.get(i))) {
|
||||||
|
aRet.querySize++;
|
||||||
|
added = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!added) {
|
||||||
|
ret.add(new AssemblerHandler.RecipeQuery(in.get(i), 1));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return ret.toArray(new AssemblerHandler.RecipeQuery[ret.size()]);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public AssemblerHandler.RecipeQuery[] getQueriedInputs(T arg0) {
|
||||||
|
return new AssemblerHandler.RecipeQuery[0];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,20 @@
|
||||||
|
package malte0811.industrialWires.crafting.factories;
|
||||||
|
|
||||||
|
import com.google.gson.JsonObject;
|
||||||
|
import ic2.api.item.IC2Items;
|
||||||
|
import malte0811.industrialWires.IndustrialWires;
|
||||||
|
import net.minecraft.item.crafting.Ingredient;
|
||||||
|
import net.minecraftforge.common.crafting.IIngredientFactory;
|
||||||
|
import net.minecraftforge.common.crafting.JsonContext;
|
||||||
|
|
||||||
|
import javax.annotation.Nonnull;
|
||||||
|
|
||||||
|
public class IC2ItemFactory implements IIngredientFactory {
|
||||||
|
@Nonnull
|
||||||
|
@Override
|
||||||
|
public Ingredient parse(JsonContext context, JsonObject json) {
|
||||||
|
String name = json.get("name").getAsString();
|
||||||
|
String variant = json.get("variant").getAsString();
|
||||||
|
return Ingredient.fromStacks(IC2Items.getItem(name, variant));
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,15 @@
|
||||||
|
package malte0811.industrialWires.crafting.factories;
|
||||||
|
|
||||||
|
import com.google.gson.JsonObject;
|
||||||
|
import malte0811.industrialWires.crafting.RecipeInitPC;
|
||||||
|
import net.minecraft.item.crafting.IRecipe;
|
||||||
|
import net.minecraftforge.common.crafting.IRecipeFactory;
|
||||||
|
import net.minecraftforge.common.crafting.JsonContext;
|
||||||
|
import net.minecraftforge.oredict.ShapedOreRecipe;
|
||||||
|
|
||||||
|
public class InitPCFactory implements IRecipeFactory {
|
||||||
|
@Override
|
||||||
|
public IRecipe parse(JsonContext context, JsonObject json) {
|
||||||
|
return new RecipeInitPC(ShapedOreRecipe.factory(context, json));
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,16 @@
|
||||||
|
package malte0811.industrialWires.crafting.factories;
|
||||||
|
|
||||||
|
import com.google.gson.JsonObject;
|
||||||
|
import malte0811.industrialWires.IWConfig;
|
||||||
|
import net.minecraftforge.common.crafting.IConditionFactory;
|
||||||
|
import net.minecraftforge.common.crafting.JsonContext;
|
||||||
|
|
||||||
|
import java.util.function.BooleanSupplier;
|
||||||
|
|
||||||
|
public class IsConversionEnabled implements IConditionFactory {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public BooleanSupplier parse(JsonContext context, JsonObject json) {
|
||||||
|
return () -> IWConfig.enableConversion;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,20 @@
|
||||||
|
package malte0811.industrialWires.crafting.factories;
|
||||||
|
|
||||||
|
import com.google.gson.JsonElement;
|
||||||
|
import com.google.gson.JsonObject;
|
||||||
|
import malte0811.industrialWires.crafting.RecipeCoilLength;
|
||||||
|
import malte0811.industrialWires.crafting.RecipeInitPC;
|
||||||
|
import net.minecraft.item.crafting.IRecipe;
|
||||||
|
import net.minecraftforge.common.crafting.CraftingHelper;
|
||||||
|
import net.minecraftforge.common.crafting.IRecipeFactory;
|
||||||
|
import net.minecraftforge.common.crafting.JsonContext;
|
||||||
|
import net.minecraftforge.oredict.ShapedOreRecipe;
|
||||||
|
|
||||||
|
public class WireCoilFactory implements IRecipeFactory {
|
||||||
|
@Override
|
||||||
|
public RecipeCoilLength parse(JsonContext context, JsonObject json) {
|
||||||
|
JsonObject coil = json.getAsJsonObject("coil");
|
||||||
|
JsonObject cable = json.getAsJsonObject("cable");
|
||||||
|
return new RecipeCoilLength(CraftingHelper.getItemStack(coil, context), CraftingHelper.getIngredient(cable, context));
|
||||||
|
}
|
||||||
|
}
|
|
@ -229,8 +229,9 @@ public class ItemIC2Coil extends Item implements IWireCoil {
|
||||||
return IWConfig.maxLengthOnCoil[i.getItemDamage()];
|
return IWConfig.maxLengthOnCoil[i.getItemDamage()];
|
||||||
}
|
}
|
||||||
|
|
||||||
public static ItemStack getUninsulatedCable(ItemStack i) {
|
public static ItemStack getUninsulatedCable(String name) {
|
||||||
switch (i.getMetadata()) {
|
return IC2Items.getItem("cable", "type:"+name+",insulation:0");
|
||||||
|
/*switch (i.getMetadata()) {
|
||||||
case 0:
|
case 0:
|
||||||
return IC2Items.getItem("cable", "type:tin,insulation:0");
|
return IC2Items.getItem("cable", "type:tin,insulation:0");
|
||||||
case 1:
|
case 1:
|
||||||
|
@ -242,6 +243,6 @@ public class ItemIC2Coil extends Item implements IWireCoil {
|
||||||
case 4:
|
case 4:
|
||||||
return IC2Items.getItem("cable", "type:glass,insulation:0");
|
return IC2Items.getItem("cable", "type:glass,insulation:0");
|
||||||
}
|
}
|
||||||
return null;
|
return null;*/
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,12 @@
|
||||||
|
{
|
||||||
|
"conditions" : {
|
||||||
|
"conversion": "malte0811.industrialWires.crafting.factories.IsConversionEnabled"
|
||||||
|
},
|
||||||
|
"recipes": {
|
||||||
|
"component_init": "malte0811.industrialWires.crafting.factories.InitPCFactory",
|
||||||
|
"wire_coil": "malte0811.industrialWires.crafting.factories.WireCoilFactory"
|
||||||
|
},
|
||||||
|
"ingredients": {
|
||||||
|
"ic2_item": "malte0811.industrialWires.crafting.factories.IC2ItemFactory"
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,22 @@
|
||||||
|
{
|
||||||
|
"result": {
|
||||||
|
"item": "industrialwires:control_panel",
|
||||||
|
"data": 2,
|
||||||
|
"count": 4
|
||||||
|
},
|
||||||
|
"pattern": [
|
||||||
|
" r ",
|
||||||
|
"rmr",
|
||||||
|
" r "
|
||||||
|
],
|
||||||
|
"type": "forge:ore_shaped",
|
||||||
|
"key": {
|
||||||
|
"r": {
|
||||||
|
"type": "forge:ore_dict", "ore": "dustRedstone"
|
||||||
|
},
|
||||||
|
"m": {
|
||||||
|
"item": "industrialwires:control_panel",
|
||||||
|
"data": 4
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,31 @@
|
||||||
|
{
|
||||||
|
"result": {
|
||||||
|
"item": "industrialwires:control_panel",
|
||||||
|
"data": 3
|
||||||
|
},
|
||||||
|
"pattern": [
|
||||||
|
"rmr",
|
||||||
|
"rdr",
|
||||||
|
"rar"
|
||||||
|
],
|
||||||
|
"type": "forge:ore_shaped",
|
||||||
|
"key": {
|
||||||
|
"a": {
|
||||||
|
"type": "industrialwires:ic2_item",
|
||||||
|
"name": "crafting",
|
||||||
|
"variant": "alloy"
|
||||||
|
},
|
||||||
|
"r": {
|
||||||
|
"type": "forge:ore_dict", "ore": "stickSteel"
|
||||||
|
},
|
||||||
|
"d": {
|
||||||
|
"item": "immersiveengineering:drillhead",
|
||||||
|
"data": 1
|
||||||
|
},
|
||||||
|
"m": {
|
||||||
|
"type": "industrialwires:ic2_item",
|
||||||
|
"name": "crafting",
|
||||||
|
"variant": "electric_motor"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,21 @@
|
||||||
|
{
|
||||||
|
"result": {
|
||||||
|
"item": "industrialwires:control_panel",
|
||||||
|
"data": 1
|
||||||
|
},
|
||||||
|
"pattern": [
|
||||||
|
"c",
|
||||||
|
"d"
|
||||||
|
],
|
||||||
|
"type": "minecraft:crafting_shaped",
|
||||||
|
"key": {
|
||||||
|
"c": {
|
||||||
|
"item": "immersiveengineering:connector",
|
||||||
|
"data": 12
|
||||||
|
},
|
||||||
|
"d": {
|
||||||
|
"item": "industrialwires:control_panel",
|
||||||
|
"data": 2
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,20 @@
|
||||||
|
{
|
||||||
|
"result": {
|
||||||
|
"item": "industrialwires:control_panel",
|
||||||
|
"data": 4
|
||||||
|
},
|
||||||
|
"pattern": [
|
||||||
|
"ppp",
|
||||||
|
"www",
|
||||||
|
"ppp"
|
||||||
|
],
|
||||||
|
"type": "forge:ore_shaped",
|
||||||
|
"key": {
|
||||||
|
"p": {
|
||||||
|
"type": "forge:ore_dict", "ore": "plateIron"
|
||||||
|
},
|
||||||
|
"w": {
|
||||||
|
"type": "forge:ore_dict", "ore": "wireCopper"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,21 @@
|
||||||
|
{
|
||||||
|
"result": {
|
||||||
|
"item": "industrialwires:ic2_connector",
|
||||||
|
"data": 2,
|
||||||
|
"count": 4
|
||||||
|
},
|
||||||
|
"pattern": [
|
||||||
|
" c ",
|
||||||
|
"rcr",
|
||||||
|
"rcr"
|
||||||
|
],
|
||||||
|
"type": "forge:ore_shaped",
|
||||||
|
"key": {
|
||||||
|
"r": {
|
||||||
|
"type": "forge:ore_dict", "ore": "itemRubber"
|
||||||
|
},
|
||||||
|
"c": {
|
||||||
|
"type": "forge:ore_dict", "ore": "ingotCopper"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,20 @@
|
||||||
|
{
|
||||||
|
"result": {
|
||||||
|
"item": "industrialwires:ic2_connector",
|
||||||
|
"data": 3,
|
||||||
|
"count": 4
|
||||||
|
},
|
||||||
|
"pattern": [
|
||||||
|
" c ",
|
||||||
|
"rcr"
|
||||||
|
],
|
||||||
|
"type": "forge:ore_shaped",
|
||||||
|
"key": {
|
||||||
|
"r": {
|
||||||
|
"type": "forge:ore_dict", "ore": "itemRubber"
|
||||||
|
},
|
||||||
|
"c": {
|
||||||
|
"type": "forge:ore_dict", "ore": "ingotCopper"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,23 @@
|
||||||
|
{
|
||||||
|
"result": {
|
||||||
|
"item": "industrialwires:ic2_connector",
|
||||||
|
"data": 8,
|
||||||
|
"count": 4
|
||||||
|
},
|
||||||
|
"pattern": [
|
||||||
|
" c ",
|
||||||
|
"rcr",
|
||||||
|
"rcr"
|
||||||
|
],
|
||||||
|
"type": "forge:ore_shaped",
|
||||||
|
"key": {
|
||||||
|
"r": {
|
||||||
|
"type": "forge:ore_dict", "ore": "itemRubber"
|
||||||
|
},
|
||||||
|
"c": {
|
||||||
|
"type": "industrialwires:ic2_item",
|
||||||
|
"name": "cable",
|
||||||
|
"variant": "type:glass,insulation:0"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,27 @@
|
||||||
|
{
|
||||||
|
"result": {
|
||||||
|
"item": "industrialwires:ic2_connector",
|
||||||
|
"data": 9,
|
||||||
|
"count": 4
|
||||||
|
},
|
||||||
|
"pattern": [
|
||||||
|
" c ",
|
||||||
|
"grg",
|
||||||
|
"grg"
|
||||||
|
],
|
||||||
|
"type": "forge:ore_shaped",
|
||||||
|
"key": {
|
||||||
|
"r": {
|
||||||
|
"type": "forge:ore_dict", "ore": "itemRubber"
|
||||||
|
},
|
||||||
|
"c": {
|
||||||
|
"type": "industrialwires:ic2_item",
|
||||||
|
"name": "cable",
|
||||||
|
"variant": "type:glass,insulation:0"
|
||||||
|
},
|
||||||
|
"g": {
|
||||||
|
"item": "immersiveengineering:stone_decoration",
|
||||||
|
"data": 8
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,21 @@
|
||||||
|
{
|
||||||
|
"result": {
|
||||||
|
"item": "industrialwires:ic2_connector",
|
||||||
|
"data": 4,
|
||||||
|
"count": 4
|
||||||
|
},
|
||||||
|
"pattern": [
|
||||||
|
" g ",
|
||||||
|
"rgr",
|
||||||
|
"rgr"
|
||||||
|
],
|
||||||
|
"type": "forge:ore_shaped",
|
||||||
|
"key": {
|
||||||
|
"r": {
|
||||||
|
"type": "forge:ore_dict", "ore": "itemRubber"
|
||||||
|
},
|
||||||
|
"g": {
|
||||||
|
"type": "forge:ore_dict", "ore": "ingotGold"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,20 @@
|
||||||
|
{
|
||||||
|
"result": {
|
||||||
|
"item": "industrialwires:ic2_connector",
|
||||||
|
"data": 5,
|
||||||
|
"count": 4
|
||||||
|
},
|
||||||
|
"pattern": [
|
||||||
|
" g ",
|
||||||
|
"rgr"
|
||||||
|
],
|
||||||
|
"type": "forge:ore_shaped",
|
||||||
|
"key": {
|
||||||
|
"r": {
|
||||||
|
"type": "forge:ore_dict", "ore": "itemRubber"
|
||||||
|
},
|
||||||
|
"g": {
|
||||||
|
"type": "forge:ore_dict", "ore": "ingotGold"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,21 @@
|
||||||
|
{
|
||||||
|
"result": {
|
||||||
|
"item": "industrialwires:ic2_connector",
|
||||||
|
"data": 6,
|
||||||
|
"count": 4
|
||||||
|
},
|
||||||
|
"pattern": [
|
||||||
|
" i ",
|
||||||
|
"rir",
|
||||||
|
"rir"
|
||||||
|
],
|
||||||
|
"type": "forge:ore_shaped",
|
||||||
|
"key": {
|
||||||
|
"r": {
|
||||||
|
"type": "forge:ore_dict", "ore": "itemRubber"
|
||||||
|
},
|
||||||
|
"i": {
|
||||||
|
"type": "forge:ore_dict", "ore": "ingotIron"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,22 @@
|
||||||
|
{
|
||||||
|
"result": {
|
||||||
|
"item": "industrialwires:ic2_connector",
|
||||||
|
"data": 7,
|
||||||
|
"count": 4
|
||||||
|
},
|
||||||
|
"pattern": [
|
||||||
|
" i ",
|
||||||
|
"gig",
|
||||||
|
"gig"
|
||||||
|
],
|
||||||
|
"type": "forge:ore_shaped",
|
||||||
|
"key": {
|
||||||
|
"g": {
|
||||||
|
"item": "immersiveengineering:stone_decoration",
|
||||||
|
"data": 8
|
||||||
|
},
|
||||||
|
"i": {
|
||||||
|
"type": "forge:ore_dict", "ore": "ingotIron"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,23 @@
|
||||||
|
{
|
||||||
|
"result": {
|
||||||
|
"item": "industrialwires:ic2_connector",
|
||||||
|
"data": 0,
|
||||||
|
"count": 4
|
||||||
|
},
|
||||||
|
"pattern": [
|
||||||
|
" t ",
|
||||||
|
"rtr",
|
||||||
|
"rtr"
|
||||||
|
],
|
||||||
|
"type": "forge:ore_shaped",
|
||||||
|
"key": {
|
||||||
|
"r": {
|
||||||
|
"type": "forge:ore_dict",
|
||||||
|
"ore": "itemRubber"
|
||||||
|
},
|
||||||
|
"t": {
|
||||||
|
"type": "forge:ore_dict",
|
||||||
|
"ore": "ingotTin"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,20 @@
|
||||||
|
{
|
||||||
|
"result": {
|
||||||
|
"item": "industrialwires:ic2_connector",
|
||||||
|
"data": 1,
|
||||||
|
"count": 4
|
||||||
|
},
|
||||||
|
"pattern": [
|
||||||
|
" t ",
|
||||||
|
"rtr"
|
||||||
|
],
|
||||||
|
"type": "forge:ore_shaped",
|
||||||
|
"key": {
|
||||||
|
"r": {
|
||||||
|
"type": "forge:ore_dict", "ore": "itemRubber"
|
||||||
|
},
|
||||||
|
"t": {
|
||||||
|
"type": "forge:ore_dict", "ore": "ingotTin"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,27 @@
|
||||||
|
{
|
||||||
|
"result": {
|
||||||
|
"item": "industrialwires:jacobs_ladder",
|
||||||
|
"data": 2
|
||||||
|
},
|
||||||
|
"pattern": [
|
||||||
|
"c c",
|
||||||
|
"hhh",
|
||||||
|
"sts"
|
||||||
|
],
|
||||||
|
"type": "forge:ore_shaped",
|
||||||
|
"key": {
|
||||||
|
"c": {
|
||||||
|
"type": "forge:ore_dict", "ore": "blockCopper"
|
||||||
|
},
|
||||||
|
"s": {
|
||||||
|
"type": "forge:ore_dict", "ore": "ingotSteel"
|
||||||
|
},
|
||||||
|
"t": {
|
||||||
|
"item": "immersiveengineering:connector",
|
||||||
|
"data": 8
|
||||||
|
},
|
||||||
|
"h": {
|
||||||
|
"item": "minecraft:hardened_clay"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,27 @@
|
||||||
|
{
|
||||||
|
"result": {
|
||||||
|
"item": "industrialwires:jacobs_ladder",
|
||||||
|
"data": 1
|
||||||
|
},
|
||||||
|
"pattern": [
|
||||||
|
"c c",
|
||||||
|
"h h",
|
||||||
|
"sts"
|
||||||
|
],
|
||||||
|
"type": "forge:ore_shaped",
|
||||||
|
"key": {
|
||||||
|
"c": {
|
||||||
|
"type": "forge:ore_dict", "ore": "ingotCopper"
|
||||||
|
},
|
||||||
|
"s": {
|
||||||
|
"type": "forge:ore_dict", "ore": "ingotSteel"
|
||||||
|
},
|
||||||
|
"t": {
|
||||||
|
"item": "immersiveengineering:connector",
|
||||||
|
"data": 7
|
||||||
|
},
|
||||||
|
"h": {
|
||||||
|
"item": "minecraft:hardened_clay"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,30 @@
|
||||||
|
{
|
||||||
|
"result": {
|
||||||
|
"item": "industrialwires:jacobs_ladder",
|
||||||
|
"data": 0
|
||||||
|
},
|
||||||
|
"pattern": [
|
||||||
|
"c c",
|
||||||
|
" h ",
|
||||||
|
"sts"
|
||||||
|
],
|
||||||
|
"type": "forge:ore_shaped",
|
||||||
|
"key": {
|
||||||
|
"c": {
|
||||||
|
"type": "industrialwires:ic2_item",
|
||||||
|
"name": "cable",
|
||||||
|
"variant": "type:copper,insulation:0"
|
||||||
|
},
|
||||||
|
"s": {
|
||||||
|
"type": "forge:ore_dict", "ore": "ingotSteel"
|
||||||
|
},
|
||||||
|
"t": {
|
||||||
|
"type": "industrialwires:ic2_item",
|
||||||
|
"name": "te",
|
||||||
|
"variant": "mv_transformer"
|
||||||
|
},
|
||||||
|
"h": {
|
||||||
|
"item": "minecraft:hardened_clay"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,18 @@
|
||||||
|
{
|
||||||
|
"result": {
|
||||||
|
"item": "industrialwires:key",
|
||||||
|
"data": 0
|
||||||
|
},
|
||||||
|
"pattern": [
|
||||||
|
"rrp"
|
||||||
|
],
|
||||||
|
"type": "forge:ore_shaped",
|
||||||
|
"key": {
|
||||||
|
"p": {
|
||||||
|
"type": "forge:ore_dict", "ore": "plateSteel"
|
||||||
|
},
|
||||||
|
"r": {
|
||||||
|
"type": "forge:ore_dict", "ore": "stickSteel"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,17 @@
|
||||||
|
{
|
||||||
|
"result": {
|
||||||
|
"item": "industrialwires:key",
|
||||||
|
"data": 2
|
||||||
|
},
|
||||||
|
"pattern": [
|
||||||
|
" r ",
|
||||||
|
"r r",
|
||||||
|
" r "
|
||||||
|
],
|
||||||
|
"type": "forge:ore_shaped",
|
||||||
|
"key": {
|
||||||
|
"r": {
|
||||||
|
"type": "forge:ore_dict", "ore": "stickSteel"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,41 @@
|
||||||
|
{
|
||||||
|
"result": {
|
||||||
|
"item": "industrialwires:mechanical_converter",
|
||||||
|
"data": 2
|
||||||
|
},
|
||||||
|
"pattern": [
|
||||||
|
"iIi",
|
||||||
|
"sbS",
|
||||||
|
"mrm"
|
||||||
|
],
|
||||||
|
"type": "forge:ore_shaped",
|
||||||
|
"key": {
|
||||||
|
"b": {
|
||||||
|
"type": "forge:ore_dict", "ore": "ingotBronze"
|
||||||
|
},
|
||||||
|
"r": {
|
||||||
|
"type": "forge:ore_dict", "ore": "stickSteel"
|
||||||
|
},
|
||||||
|
"s": {
|
||||||
|
"type": "forge:ore_dict", "ore": "blockSheetmetalIron"
|
||||||
|
},
|
||||||
|
"S": {
|
||||||
|
"type": "forge:ore_dict", "ore": "blockSheetmetalSteel"
|
||||||
|
},
|
||||||
|
"i": {
|
||||||
|
"type": "forge:ore_dict", "ore": "plateIron"
|
||||||
|
},
|
||||||
|
"I": {
|
||||||
|
"type": "industrialwires:ic2_item",
|
||||||
|
"name": "crafting",
|
||||||
|
"variant": "iron_shaft"
|
||||||
|
},
|
||||||
|
"m": {
|
||||||
|
"item": "immersiveengineering:material",
|
||||||
|
"data": 9
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"conditions": [{
|
||||||
|
"type": "industrialwires:conversion"
|
||||||
|
}]
|
||||||
|
}
|
|
@ -0,0 +1,37 @@
|
||||||
|
{
|
||||||
|
"result": {
|
||||||
|
"item": "industrialwires:mechanical_converter",
|
||||||
|
"data": 0
|
||||||
|
},
|
||||||
|
"pattern": [
|
||||||
|
" s ",
|
||||||
|
"ici",
|
||||||
|
"mum"
|
||||||
|
],
|
||||||
|
"type": "forge:ore_shaped",
|
||||||
|
"key": {
|
||||||
|
"s": {
|
||||||
|
"type": "forge:ore_dict",
|
||||||
|
"ore": "stickIron"
|
||||||
|
},
|
||||||
|
"c": {
|
||||||
|
"item": "immersiveengineering:metal_decoration0",
|
||||||
|
"data": 0
|
||||||
|
},
|
||||||
|
"u": {
|
||||||
|
"type": "forge:ore_dict",
|
||||||
|
"ore": "ingotCopper"
|
||||||
|
},
|
||||||
|
"i": {
|
||||||
|
"type": "forge:ore_dict",
|
||||||
|
"ore": "ingotIron"
|
||||||
|
},
|
||||||
|
"m": {
|
||||||
|
"item": "immersiveengineering:material",
|
||||||
|
"data": 8
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"conditions": [{
|
||||||
|
"type": "industrialwires:conversion"
|
||||||
|
}]
|
||||||
|
}
|
|
@ -0,0 +1,41 @@
|
||||||
|
{
|
||||||
|
"result": {
|
||||||
|
"item": "industrialwires:mechanical_converter",
|
||||||
|
"data": 1
|
||||||
|
},
|
||||||
|
"pattern": [
|
||||||
|
"mrm",
|
||||||
|
"sbS",
|
||||||
|
"iIi"
|
||||||
|
],
|
||||||
|
"type": "forge:ore_shaped",
|
||||||
|
"key": {
|
||||||
|
"b": {
|
||||||
|
"type": "forge:ore_dict", "ore": "ingotBronze"
|
||||||
|
},
|
||||||
|
"r": {
|
||||||
|
"type": "forge:ore_dict", "ore": "stickIron"
|
||||||
|
},
|
||||||
|
"s": {
|
||||||
|
"type": "forge:ore_dict", "ore": "blockSheetmetalIron"
|
||||||
|
},
|
||||||
|
"S": {
|
||||||
|
"type": "forge:ore_dict", "ore": "blockSheetmetalSteel"
|
||||||
|
},
|
||||||
|
"i": {
|
||||||
|
"type": "forge:ore_dict", "ore": "plateSteel"
|
||||||
|
},
|
||||||
|
"I": {
|
||||||
|
"type": "industrialwires:ic2_item",
|
||||||
|
"name": "crafting",
|
||||||
|
"variant": "steel_shaft"
|
||||||
|
},
|
||||||
|
"m": {
|
||||||
|
"item": "immersiveengineering:material",
|
||||||
|
"data": 8
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"conditions": [{
|
||||||
|
"type": "industrialwires:conversion"
|
||||||
|
}]
|
||||||
|
}
|
|
@ -0,0 +1,18 @@
|
||||||
|
{
|
||||||
|
"result": {
|
||||||
|
"item": "industrialwires:panel_component",
|
||||||
|
"data": 0
|
||||||
|
},
|
||||||
|
"ingredients": [
|
||||||
|
{
|
||||||
|
"type": "forge:ore_dict", "ore": "dustGlowstone"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"item": "minecraft:stone_button"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "forge:ore_dict", "ore": "wireCopper"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "forge:ore_shapeless"
|
||||||
|
}
|
|
@ -0,0 +1,21 @@
|
||||||
|
{
|
||||||
|
"result": {
|
||||||
|
"item": "industrialwires:panel_component",
|
||||||
|
"data": 6
|
||||||
|
},
|
||||||
|
"pattern": [
|
||||||
|
"aaa",
|
||||||
|
"asa"
|
||||||
|
],
|
||||||
|
"type": "forge:ore_shaped",
|
||||||
|
"key": {
|
||||||
|
"a": {
|
||||||
|
"type": "forge:ore_dict", "ore": "plateAluminum"
|
||||||
|
},
|
||||||
|
"s": {
|
||||||
|
"item": "industrialwires:panel_component",
|
||||||
|
"data": 5,
|
||||||
|
"count": 2
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,18 @@
|
||||||
|
{
|
||||||
|
"result": {
|
||||||
|
"item": "industrialwires:panel_component",
|
||||||
|
"data": 2
|
||||||
|
},
|
||||||
|
"ingredients": [
|
||||||
|
{
|
||||||
|
"type": "forge:ore_dict", "ore": "dustGlowstone"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "forge:ore_dict", "ore": "dustRedstone"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "forge:ore_dict", "ore": "wireCopper"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "forge:ore_shapeless"
|
||||||
|
}
|
|
@ -0,0 +1,16 @@
|
||||||
|
{
|
||||||
|
"result": {
|
||||||
|
"item": "industrialwires:panel_component",
|
||||||
|
"data": 1,
|
||||||
|
"count": 4
|
||||||
|
},
|
||||||
|
"ingredients": [
|
||||||
|
{
|
||||||
|
"type": "forge:ore_dict", "ore": "paper"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "forge:ore_dict", "ore": "plateIron"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "forge:ore_shapeless"
|
||||||
|
}
|
|
@ -0,0 +1,22 @@
|
||||||
|
{
|
||||||
|
"result": {
|
||||||
|
"item": "industrialwires:panel_component",
|
||||||
|
"data": 7
|
||||||
|
},
|
||||||
|
"pattern": [
|
||||||
|
"rdr",
|
||||||
|
" w "
|
||||||
|
],
|
||||||
|
"type": "industrialwires:component_init",
|
||||||
|
"key": {
|
||||||
|
"r": {
|
||||||
|
"type": "forge:ore_dict", "ore": "stickSteel"
|
||||||
|
},
|
||||||
|
"d": {
|
||||||
|
"item": "minecraft:iron_door"
|
||||||
|
},
|
||||||
|
"w": {
|
||||||
|
"type": "forge:ore_dict", "ore": "wireCopper"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,16 @@
|
||||||
|
{
|
||||||
|
"result": {
|
||||||
|
"item": "industrialwires:panel_component",
|
||||||
|
"data": 8
|
||||||
|
},
|
||||||
|
"ingredients": [
|
||||||
|
{
|
||||||
|
"type": "forge:ore_dict", "ore": "wireCopper"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"item": "immersiveengineering:tool",
|
||||||
|
"data": 2
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "forge:ore_shapeless"
|
||||||
|
}
|
|
@ -0,0 +1,19 @@
|
||||||
|
{
|
||||||
|
"result": {
|
||||||
|
"item": "industrialwires:panel_component",
|
||||||
|
"data": 3
|
||||||
|
},
|
||||||
|
"ingredients": [
|
||||||
|
{
|
||||||
|
"item": "minecraft:stone_button"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"item": "immersiveengineering:wirecoil",
|
||||||
|
"data": 2
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "forge:ore_dict", "ore": "wireCopper"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "forge:ore_shapeless"
|
||||||
|
}
|
|
@ -0,0 +1,18 @@
|
||||||
|
{
|
||||||
|
"result": {
|
||||||
|
"item": "industrialwires:panel_component",
|
||||||
|
"data": 5
|
||||||
|
},
|
||||||
|
"ingredients": [
|
||||||
|
{
|
||||||
|
"type": "forge:ore_dict", "ore": "stickIron"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"item": "minecraft:lever"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "forge:ore_dict", "ore": "wireCopper"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "forge:ore_shapeless"
|
||||||
|
}
|
|
@ -0,0 +1,26 @@
|
||||||
|
{
|
||||||
|
"result": {
|
||||||
|
"item": "industrialwires:panel_component",
|
||||||
|
"data": 4
|
||||||
|
},
|
||||||
|
"pattern": [
|
||||||
|
"r",
|
||||||
|
"g",
|
||||||
|
"c"
|
||||||
|
],
|
||||||
|
"type": "forge:ore_shaped",
|
||||||
|
"key": {
|
||||||
|
"r": {
|
||||||
|
"type": "forge:ore_dict", "ore": "itemRubber"
|
||||||
|
},
|
||||||
|
"c": {
|
||||||
|
"type": "industrialwires:ic2_item",
|
||||||
|
"name": "crafting",
|
||||||
|
"variant": "coil"
|
||||||
|
},
|
||||||
|
"g": {
|
||||||
|
"type": "forge:ore_dict",
|
||||||
|
"ore": "ingotHOPGraphite"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,12 @@
|
||||||
|
{
|
||||||
|
"type": "industrialwires:wire_coil",
|
||||||
|
"cable": {
|
||||||
|
"type": "industrialwires:ic2_item",
|
||||||
|
"name": "cable",
|
||||||
|
"variant": "type:copper,insulation:0"
|
||||||
|
},
|
||||||
|
"coil": {
|
||||||
|
"item": "industrialwires:ic2_wire_coil",
|
||||||
|
"data": 1
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,12 @@
|
||||||
|
{
|
||||||
|
"type": "industrialwires:wire_coil",
|
||||||
|
"cable": {
|
||||||
|
"type": "industrialwires:ic2_item",
|
||||||
|
"name": "cable",
|
||||||
|
"variant": "type:glass,insulation:0"
|
||||||
|
},
|
||||||
|
"coil": {
|
||||||
|
"item": "industrialwires:ic2_wire_coil",
|
||||||
|
"data": 4
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,12 @@
|
||||||
|
{
|
||||||
|
"type": "industrialwires:wire_coil",
|
||||||
|
"cable": {
|
||||||
|
"type": "industrialwires:ic2_item",
|
||||||
|
"name": "cable",
|
||||||
|
"variant": "type:gold,insulation:0"
|
||||||
|
},
|
||||||
|
"coil": {
|
||||||
|
"item": "industrialwires:ic2_wire_coil",
|
||||||
|
"data": 2
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,12 @@
|
||||||
|
{
|
||||||
|
"type": "industrialwires:wire_coil",
|
||||||
|
"cable": {
|
||||||
|
"type": "industrialwires:ic2_item",
|
||||||
|
"name": "cable",
|
||||||
|
"variant": "type:iron,insulation:0"
|
||||||
|
},
|
||||||
|
"coil": {
|
||||||
|
"item": "industrialwires:ic2_wire_coil",
|
||||||
|
"data": 3
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,12 @@
|
||||||
|
{
|
||||||
|
"type": "industrialwires:wire_coil",
|
||||||
|
"cable": {
|
||||||
|
"type": "industrialwires:ic2_item",
|
||||||
|
"name": "cable",
|
||||||
|
"variant": "type:tin,insulation:0"
|
||||||
|
},
|
||||||
|
"coil": {
|
||||||
|
"item": "industrialwires:ic2_wire_coil",
|
||||||
|
"data": 0
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue