From 1fee68c9efb7bb2e1aaa2e40999012a3eca741c4 Mon Sep 17 00:00:00 2001 From: malte0811 Date: Thu, 22 Sep 2016 19:52:01 +0200 Subject: [PATCH] changed wires to use different amounts of cable for different length connections added Glass Fiber Wire changed the amount of connectors/relays produced per crafting WARNING: this commit won't work with the public IE builds currently available --- build.gradle | 2 +- .../industrialWires/IndustrialWires.java | 69 ++++++++++---- .../blocks/BlockIC2Connector.java | 4 + .../blocks/BlockTypes_IC2_Connector.java | 4 +- .../blocks/TileEntityIC2ConnectorGlass.java | 21 +++++ .../blocks/TileEntityIC2ConnectorTin.java | 17 ++++ .../client/ClientEventHandler.java | 11 ++- .../industrialWires/client/ClientProxy.java | 53 ++++++++++- .../crafting/RecipeCoilLength.java | 76 +++++++++++++++ .../industrialWires/items/ItemIC2Coil.java | 89 ++++++++++++++---- .../industrialWires/wires/IC2Wiretype.java | 20 ++-- .../blockstates/ic2Connector.json | 39 +++++++- .../assets/industrialwires/lang/en_US.lang | 16 +++- .../models/item/ic2wireCoil/glass.json | 6 ++ .../textures/blocks/ic2_connGlass.png | Bin 0 -> 444 bytes .../textures/blocks/ic2_relayGlass.png | Bin 0 -> 622 bytes .../textures/blocks/ic2_relayHV.png | Bin 609 -> 0 bytes .../textures/items/ic2_wireGlass.png | Bin 0 -> 664 bytes .../textures/items/ic2_wireHV.png | Bin 649 -> 688 bytes 19 files changed, 372 insertions(+), 55 deletions(-) create mode 100644 src/main/java/malte0811/industrialWires/blocks/TileEntityIC2ConnectorGlass.java create mode 100644 src/main/java/malte0811/industrialWires/crafting/RecipeCoilLength.java create mode 100644 src/main/resources/assets/industrialwires/models/item/ic2wireCoil/glass.json create mode 100644 src/main/resources/assets/industrialwires/textures/blocks/ic2_connGlass.png create mode 100644 src/main/resources/assets/industrialwires/textures/blocks/ic2_relayGlass.png delete mode 100644 src/main/resources/assets/industrialwires/textures/blocks/ic2_relayHV.png create mode 100644 src/main/resources/assets/industrialwires/textures/items/ic2_wireGlass.png diff --git a/build.gradle b/build.gradle index 9f364ba..6076c8d 100644 --- a/build.gradle +++ b/build.gradle @@ -30,7 +30,7 @@ sourceCompatibility = 1.8 targetCompatibility = 1.8 minecraft { - version = "12.18.1.2077" + version = "12.18.1.2092" //"1.9.4-12.17.0.1976" runDir = "run" diff --git a/src/main/java/malte0811/industrialWires/IndustrialWires.java b/src/main/java/malte0811/industrialWires/IndustrialWires.java index 5ccac83..b814f9c 100644 --- a/src/main/java/malte0811/industrialWires/IndustrialWires.java +++ b/src/main/java/malte0811/industrialWires/IndustrialWires.java @@ -1,13 +1,20 @@ package malte0811.industrialWires; +import java.util.ArrayList; +import java.util.List; + +import blusunrize.immersiveengineering.api.tool.AssemblerHandler; +import blusunrize.immersiveengineering.api.tool.AssemblerHandler.RecipeQuery; import blusunrize.immersiveengineering.common.IEContent; import blusunrize.immersiveengineering.common.blocks.stone.BlockTypes_StoneDecoration; import ic2.api.item.IC2Items; import malte0811.industrialWires.blocks.BlockIC2Connector; import malte0811.industrialWires.blocks.TileEntityIC2ConnectorCopper; +import malte0811.industrialWires.blocks.TileEntityIC2ConnectorGlass; import malte0811.industrialWires.blocks.TileEntityIC2ConnectorGold; import malte0811.industrialWires.blocks.TileEntityIC2ConnectorHV; import malte0811.industrialWires.blocks.TileEntityIC2ConnectorTin; +import malte0811.industrialWires.crafting.RecipeCoilLength; import malte0811.industrialWires.items.ItemIC2Coil; import malte0811.industrialWires.wires.IC2Wiretype; import net.minecraft.creativetab.CreativeTabs; @@ -20,6 +27,8 @@ import net.minecraftforge.fml.common.event.FMLInitializationEvent; import net.minecraftforge.fml.common.event.FMLPostInitializationEvent; import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; import net.minecraftforge.fml.common.registry.GameRegistry; +import net.minecraftforge.oredict.RecipeSorter; +import net.minecraftforge.oredict.RecipeSorter.Category; import net.minecraftforge.oredict.ShapedOreRecipe; @Mod(modid = IndustrialWires.MODID, version = IndustrialWires.VERSION, dependencies="required-after:immersiveengineering;required-after:IC2") @@ -49,6 +58,7 @@ public class IndustrialWires { GameRegistry.registerTileEntity(TileEntityIC2ConnectorCopper.class, "ic2ConnectorCopper"); GameRegistry.registerTileEntity(TileEntityIC2ConnectorGold.class, "ic2ConnectorGold"); GameRegistry.registerTileEntity(TileEntityIC2ConnectorHV.class, "ic2ConnectorHV"); + GameRegistry.registerTileEntity(TileEntityIC2ConnectorGlass.class, "ic2ConnectorGlass"); if (IC2Wiretype.IC2_TYPES==null) { throw new IllegalStateException("No IC2 wires registered"); } @@ -57,25 +67,50 @@ public class IndustrialWires { @EventHandler public void init(FMLInitializationEvent e) { - //WIRES - ItemStack tinCable = IC2Items.getItem("cable", "type:tin,insulation:0"); - ItemStack copperCable = IC2Items.getItem("cable", "type:copper,insulation:0"); - ItemStack goldCable = IC2Items.getItem("cable", "type:gold,insulation:0"); - ItemStack hvCable = IC2Items.getItem("cable", "type:iron,insulation:0"); - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(coil, 2, 0), "ttt", "tst", "ttt", 't', tinCable, 's', "stickWood")); - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(coil, 2, 1), "ccc", "csc", "ccc", 'c', copperCable, 's', "stickWood")); - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(coil, 2, 2), "ggg", "gsg", "ggg", 'g', goldCable, 's', "stickWood")); - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(coil, 2, 3), "hhh", "hsh", "hhh", 'h', hvCable, 's', "stickWood")); + ItemStack glassCable = IC2Items.getItem("cable", "type:glass,insulation:0"); //CONNECTORS - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ic2conn, 1, 0), " t ", "rtr", "rtr", 't', "ingotTin", 'r', "itemRubber")); - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ic2conn, 1, 2), " c ", "rcr", "rcr", 'c', "ingotCopper", 'r', "itemRubber")); - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ic2conn, 1, 4), " g ", "rgr", "rgr", 'g', "ingotGold", 'r', "itemRubber")); - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ic2conn, 1, 6), " i ", "rir", "rir", 'i', "ingotIron", 'r', "itemRubber")); + 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, 1, 1), " t ", "rtr", 't', "ingotTin", 'r', "itemRubber")); - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ic2conn, 1, 3), " c ", "rcr", 'c', "ingotCopper", 'r', "itemRubber")); - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ic2conn, 1, 5), " g ", "rgr", 'g', "ingotGold", 'r', "itemRubber")); - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ic2conn, 1, 7), " i ", "gig", "gig", 'i', "ingotIron", 'g', new ItemStack(IEContent.blockStoneDecoration, 1, BlockTypes_StoneDecoration.INSULATING_GLASS.getMeta()))); + 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()))); + //WIRES + RecipeSorter.register("industrialwires:coilLength", RecipeCoilLength.class, Category.SHAPELESS, "after:forge:shapelessore"); + for (int i = 0;i() { + + @Override + public RecipeQuery[] getQueriedInputs(RecipeCoilLength recipe, ItemStack[] in) { + List ret = new ArrayList<>(); + for (int i = 0;i outputs = ImmersiveNetHandler.INSTANCE.getConnections(worldObj, Utils.toCC(this)); + if(outputs == null || outputs.size() == 0) { + if(type == limitType || type == null) + this.limitType = null; + } + this.markDirty(); + if(worldObj != null) { + IBlockState state = worldObj.getBlockState(pos); + worldObj.notifyBlockUpdate(pos, state,state, 3); + } + } @Override public void readCustomNBT(NBTTagCompound nbt, boolean descPacket) { diff --git a/src/main/java/malte0811/industrialWires/client/ClientEventHandler.java b/src/main/java/malte0811/industrialWires/client/ClientEventHandler.java index aac838b..80fda81 100644 --- a/src/main/java/malte0811/industrialWires/client/ClientEventHandler.java +++ b/src/main/java/malte0811/industrialWires/client/ClientEventHandler.java @@ -4,6 +4,7 @@ import blusunrize.immersiveengineering.api.Lib; import blusunrize.immersiveengineering.client.ClientUtils; import blusunrize.immersiveengineering.common.util.ItemNBTHelper; import malte0811.industrialWires.IndustrialWires; +import malte0811.industrialWires.items.ItemIC2Coil; import malte0811.industrialWires.wires.IC2Wiretype; import net.minecraft.client.resources.I18n; import net.minecraft.entity.player.EntityPlayer; @@ -20,19 +21,23 @@ public class ClientEventHandler { if(ClientUtils.mc().thePlayer!=null && e.getType() == RenderGameOverlayEvent.ElementType.TEXT) { EntityPlayer player = ClientUtils.mc().thePlayer; - for(EnumHand hand : EnumHand.values()) + for(EnumHand hand : EnumHand.values()) { if(player.getHeldItem(hand)!=null) { ItemStack equipped = player.getHeldItem(hand); if(OreDictionary.itemMatches(new ItemStack(IndustrialWires.coil, 1, OreDictionary.WILDCARD_VALUE), equipped, false)) { + int color = IC2Wiretype.IC2_TYPES[equipped.getItemDamage()].getColour(null); + String s = I18n.format(IndustrialWires.MODID+".desc.wireLength", ItemIC2Coil.getLength(equipped)); + ClientUtils.font().drawString(s, e.getResolution().getScaledWidth()/2 - ClientUtils.font().getStringWidth(s)/2, e.getResolution().getScaledHeight()-GuiIngameForge.left_height-40, color, true); if(ItemNBTHelper.hasKey(equipped, "linkingPos")) { int[] link = ItemNBTHelper.getIntArray(equipped, "linkingPos"); if(link!=null&&link.length>3) { - String s = I18n.format(Lib.DESC_INFO+"attachedTo", link[1],link[2],link[3]); - ClientUtils.font().drawString(s, e.getResolution().getScaledWidth()/2 - ClientUtils.font().getStringWidth(s)/2, e.getResolution().getScaledHeight()-GuiIngameForge.left_height-20, IC2Wiretype.IC2_TYPES[2].getColour(null), true); + s = I18n.format(Lib.DESC_INFO+"attachedTo", link[1],link[2],link[3]); + ClientUtils.font().drawString(s, e.getResolution().getScaledWidth()/2 - ClientUtils.font().getStringWidth(s)/2, e.getResolution().getScaledHeight()-GuiIngameForge.left_height-20, color, true); } } } } + } } } } diff --git a/src/main/java/malte0811/industrialWires/client/ClientProxy.java b/src/main/java/malte0811/industrialWires/client/ClientProxy.java index e5088b5..0642e91 100644 --- a/src/main/java/malte0811/industrialWires/client/ClientProxy.java +++ b/src/main/java/malte0811/industrialWires/client/ClientProxy.java @@ -1,6 +1,7 @@ package malte0811.industrialWires.client; import java.util.Locale; +import java.util.Random; import com.google.common.collect.ImmutableMap; @@ -8,6 +9,8 @@ import blusunrize.immersiveengineering.api.ManualHelper; import blusunrize.immersiveengineering.client.models.smart.ConnLoader; import blusunrize.lib.manual.ManualInstance; import blusunrize.lib.manual.ManualPages; +import blusunrize.lib.manual.ManualPages.PositionedItemStack; +import ic2.api.item.IC2Items; import malte0811.industrialWires.CommonProxy; import malte0811.industrialWires.IndustrialWires; import malte0811.industrialWires.items.ItemIC2Coil; @@ -50,8 +53,13 @@ public class ClientProxy extends CommonProxy { ConnLoader.textureReplacements.put("ic2_conn_hv", ImmutableMap.of("#immersiveengineering:blocks/connector_connectorHV", IndustrialWires.MODID+":blocks/ic2_connHV")); ConnLoader.baseModels.put("ic2_relay_hv", new ResourceLocation("immersiveengineering:block/connector/relayHV.obj")); - ConnLoader.textureReplacements.put("ic2_relay_hv", ImmutableMap.of("#immersiveengineering:blocks/connector_connectorHV", - IndustrialWires.MODID+":blocks/ic2_relayHV")); + + ConnLoader.baseModels.put("ic2_conn_glass", new ResourceLocation("immersiveengineering:block/connector/connectorHV.obj")); + ConnLoader.textureReplacements.put("ic2_conn_glass", ImmutableMap.of("#immersiveengineering:blocks/connector_connectorHV", + IndustrialWires.MODID+":blocks/ic2_connGlass")); + ConnLoader.baseModels.put("ic2_relay_glass", new ResourceLocation("immersiveengineering:block/connector/relayHV.obj")); + ConnLoader.textureReplacements.put("ic2_relay_glass", ImmutableMap.of("#immersiveengineering:blocks/connector_relayHV", + IndustrialWires.MODID+":blocks/ic2_relayGlass")); for(int meta = 0; meta < ItemIC2Coil.subNames.length; meta++) { ResourceLocation loc = new ResourceLocation(IndustrialWires.MODID, "ic2wireCoil/" + ItemIC2Coil.subNames[meta]); @@ -82,10 +90,45 @@ public class ClientProxy extends CommonProxy { public void postInit() { super.postInit(); ManualInstance m = ManualHelper.getManual(); + PositionedItemStack[][] wireRecipes = new PositionedItemStack[3][10]; + int xBase = 15; + ItemStack tinCable = IC2Items.getItem("cable", "type:tin,insulation:0"); + for (int i = 0;i<3;i++) { + for (int j = 0;j<3;j++) { + wireRecipes[0][3*i+j] = new PositionedItemStack(tinCable.copy(), 18*i+xBase, 18*j); + } + } + ItemStack tmp = new ItemStack(IndustrialWires.coil); + ItemIC2Coil.setLength(tmp, 9); + wireRecipes[0][9] = new PositionedItemStack(tmp, 18*4+xBase, 18); + Random r = new Random(); + for (int i = 1;i<3;i++) { + int lengthSum = 0; + for (int j1 = 0;j1<3;j1++) { + for (int j2 = 0;j2<3;j2++) { + if (r.nextBoolean()) { + // cable + lengthSum++; + wireRecipes[i][3*j1+j2] = new PositionedItemStack(tinCable.copy(), 18*j1+xBase, 18*j2); + } else { + // wire coil + int length = r.nextInt(99)+1; + tmp = new ItemStack(IndustrialWires.coil); + ItemIC2Coil.setLength(tmp, length); + wireRecipes[i][3*j1+j2] = new PositionedItemStack(tmp, 18*j1+xBase, 18*j2); + lengthSum+=length; + } + } + } + tmp = new ItemStack(IndustrialWires.coil); + ItemIC2Coil.setLength(tmp, lengthSum); + wireRecipes[i][9] = new PositionedItemStack(tmp, 18*4+xBase, 18); + } m.addEntry("industrialWires.all", "industrialWires", - new ManualPages.CraftingMulti(m, "industrialWires.all0", new ItemStack(IndustrialWires.coil, 1, 0), new ItemStack(IndustrialWires.coil, 1, 1), new ItemStack(IndustrialWires.coil, 1, 2), new ItemStack(IndustrialWires.coil, 1, 3)), - new ManualPages.CraftingMulti(m, "industrialWires.all1", new ItemStack(IndustrialWires.ic2conn, 1, 0), new ItemStack(IndustrialWires.ic2conn, 1, 1), new ItemStack(IndustrialWires.ic2conn, 1, 2), new ItemStack(IndustrialWires.ic2conn, 1, 3), - new ItemStack(IndustrialWires.ic2conn, 1, 4), new ItemStack(IndustrialWires.ic2conn, 1, 5), new ItemStack(IndustrialWires.ic2conn, 1, 6), new ItemStack(IndustrialWires.ic2conn, 1, 7)) + new ManualPages.CraftingMulti(m, "industrialWires.all0", new ItemStack(IndustrialWires.ic2conn, 1, 0), new ItemStack(IndustrialWires.ic2conn, 1, 1), new ItemStack(IndustrialWires.ic2conn, 1, 2), new ItemStack(IndustrialWires.ic2conn, 1, 3), + new ItemStack(IndustrialWires.ic2conn, 1, 4), new ItemStack(IndustrialWires.ic2conn, 1, 5), new ItemStack(IndustrialWires.ic2conn, 1, 6), new ItemStack(IndustrialWires.ic2conn, 1, 7)), + new ManualPages.Text(m, "industrialWires.all1"), + new ManualPages.CraftingMulti(m, "industrialWires.all2", (Object[])wireRecipes) ); } } diff --git a/src/main/java/malte0811/industrialWires/crafting/RecipeCoilLength.java b/src/main/java/malte0811/industrialWires/crafting/RecipeCoilLength.java new file mode 100644 index 0000000..27b576f --- /dev/null +++ b/src/main/java/malte0811/industrialWires/crafting/RecipeCoilLength.java @@ -0,0 +1,76 @@ +package malte0811.industrialWires.crafting; + +import malte0811.industrialWires.IndustrialWires; +import malte0811.industrialWires.items.ItemIC2Coil; +import net.minecraft.inventory.InventoryCrafting; +import net.minecraft.item.ItemStack; +import net.minecraft.item.crafting.IRecipe; +import net.minecraft.world.World; +import net.minecraftforge.oredict.OreDictionary; + +public class RecipeCoilLength implements IRecipe { + public final ItemStack coil; + public final ItemStack cable; + final int maxLength; + public RecipeCoilLength(int meta) { + coil = new ItemStack(IndustrialWires.coil, 1, meta); + cable = ItemIC2Coil.getUninsulatedCable(coil); + maxLength = ItemIC2Coil.getMaxWireLength(coil); + } + + @Override + public boolean matches(InventoryCrafting inv, World worldIn) { + int l = getLength(inv); + return l>0; + } + + @Override + public ItemStack getCraftingResult(InventoryCrafting inv) { + ItemStack ret = new ItemStack(IndustrialWires.coil, 1, coil.getItemDamage()); + ItemIC2Coil.setLength(ret, Math.min(maxLength, getLength(inv))); + return ret; + } + + @Override + public int getRecipeSize() { + return 0; + } + + @Override + public ItemStack getRecipeOutput() { + return null; + } + + @Override + public ItemStack[] getRemainingItems(InventoryCrafting inv) { + ItemStack[] ret = new ItemStack[inv.getSizeInventory()]; + int length = Math.min(getLength(inv), maxLength); + for (int i = 0;i0;i++) { + ItemStack curr = inv.getStackInSlot(i); + if (OreDictionary.itemMatches(curr, coil, false)) { + length-=ItemIC2Coil.getLength(curr); + if (length<0) { + ret[i] = new ItemStack(IndustrialWires.coil, 1); + ItemIC2Coil.setLength(ret[i], -length); + } + } else if (OreDictionary.itemMatches(curr, cable, false)) { + length--; + } + } + return ret; + } + private int getLength(InventoryCrafting inv) { + int cableLength = 0; + for (int i = 0;i subItems) { for (int i = 0;i list, boolean adv) { + list.add(I18n.format(IndustrialWires.MODID+".desc.wireLength", getLength(stack))); + list.add(I18n.format(IndustrialWires.MODID+".desc.recipe")); if(stack.getTagCompound()!=null && stack.getTagCompound().hasKey("linkingPos")) { int[] link = stack.getTagCompound().getIntArray("linkingPos"); if(link!=null&&link.length>3) { @@ -67,10 +74,13 @@ public class ItemIC2Coil extends Item implements IWireCoil{ } } - //copied from "vanilla" IE @Override public EnumActionResult onItemUseFirst(ItemStack stack, EntityPlayer player, World world, BlockPos pos, EnumFacing side, float hitX, float hitY, float hitZ, EnumHand hand) { if(!world.isRemote) { + if (stack.stackSize>1) { + player.addChatMessage(new TextComponentTranslation(IndustrialWires.MODID+".chat.stackSize")); + return EnumActionResult.FAIL; + } TileEntity tileEntity = world.getTileEntity(pos); if(tileEntity instanceof IImmersiveConnectable && ((IImmersiveConnectable)tileEntity).canConnect()) { TargetingInfo target = new TargetingInfo(side, hitX,hitY,hitZ); @@ -125,25 +135,35 @@ public class ItemIC2Coil extends Item implements IWireCoil{ ignore.addAll(nodeLink.getIgnored(nodeHere)); boolean canSee = Utils.rayTraceForFirst(rtOff0, rtOff1, world, ignore)==null; if(canSee) { - TargetingInfo targetLink = TargetingInfo.readFromNBT(stack.getTagCompound()); - ImmersiveNetHandler.INSTANCE.addConnection(world, Utils.toCC(nodeHere), Utils.toCC(nodeLink), (int)Math.sqrt(distanceSq), type); + int lengthOnStack = getLength(stack); + int length = (int)Math.sqrt(distanceSq); + if (length<=lengthOnStack) { + TargetingInfo targetLink = TargetingInfo.readFromNBT(stack.getTagCompound()); + ImmersiveNetHandler.INSTANCE.addConnection(world, Utils.toCC(nodeHere), Utils.toCC(nodeLink), length, type); - nodeHere.connectCable(type, target, nodeLink); - nodeLink.connectCable(type, targetLink, nodeHere); - IESaveData.setDirty(world.provider.getDimension()); - player.addStat(IEAchievements.connectWire); + nodeHere.connectCable(type, target, nodeLink); + nodeLink.connectCable(type, targetLink, nodeHere); + IESaveData.setDirty(world.provider.getDimension()); + player.addStat(IEAchievements.connectWire); - if(!player.capabilities.isCreativeMode) { - stack.stackSize--; + if(!player.capabilities.isCreativeMode) { + if (lengthYou use them exactly as you would use wires from Immersive Engineering. Each wire transfers as much EU as the corresponding cable would, -ie.manual.entry.industrialWires.all1=so attaching a connector to a power source that would destroy the cable will destroy the connector. \ No newline at end of file +ie.manual.entry.industrialWires.all0=Wires from the IndustrialWires company allow you to transfer energy like you can with cables from the IndustrialCraft2 company.
You use them exactly as you would use wires from Immersive Engineering. Each wire transfers as much EU as the corresponding cable would, so +ie.manual.entry.industrialWires.all1=attaching a connector to a power source that would destroy the cable will destroy the connector.
The wire coils for the IC2 cable are different from the Immersive Engineering wire coils in that longer connections use up more wire: The coils are crafted by placing any combination of uninsulated IC2 cables and the corresponding wire coils in a crafting grid. The next page shows some examples of valid recipes and their outputs. The uninsulated +ie.manual.entry.industrialWires.all2=tin cables can be replaced by uninsulated copper, gold or HV cables or by glass fiber cable to craft the other coils. \ No newline at end of file diff --git a/src/main/resources/assets/industrialwires/models/item/ic2wireCoil/glass.json b/src/main/resources/assets/industrialwires/models/item/ic2wireCoil/glass.json new file mode 100644 index 0000000..1e1c1b3 --- /dev/null +++ b/src/main/resources/assets/industrialwires/models/item/ic2wireCoil/glass.json @@ -0,0 +1,6 @@ +{ + "parent":"item/generated", + "textures": { + "layer0":"industrialwires:items/ic2_wireGlass" + } +} diff --git a/src/main/resources/assets/industrialwires/textures/blocks/ic2_connGlass.png b/src/main/resources/assets/industrialwires/textures/blocks/ic2_connGlass.png new file mode 100644 index 0000000000000000000000000000000000000000..56b755b9fa647fdfcf880932ab842a690790384e GIT binary patch literal 444 zcmV;t0YmVGd000McNliru;0YEEC9C8!-%pKT;h3Acru#39{&Ue69lRIeeocT^R5c0%=HgVQVs)wA;ST5T8cW z;{)Z}+iL=RG$+IP_5NFU>UzDVs#0sk%;@#ya#{Ydk2wHH;AJYTrK*SsrIevw%K$_K zcgJNoBjVXSbEwyn)9I9|N<^R;eE;zicVAv}cjkF!zuzxhRTnPj^EpL?S}X2ODTQg8 zShLK;%$TML(+8j3F?o*A=gmw?DVRO*;c%d}My++=)BXUhk#oa(C?bN040C2Cs=5TX z<&^U2V4H3aHX?@L)|^bNzuLb5tu=bE?vA@-W?y)^W9#lcT@j(Rwm8d7GV?1ZKSziN zB4P+DGZ(vN#%{M;cxw%hz#`%i$f{ATb+Fnm{f%3<*X8aUkH_JnyK}$aH+%YA<-VfZ mw71#(OSawp+wCU&PyGQ~SqPM)*{Og400001MP$``+v*rZ5~1W16M_gb?uFlcp&6~?geUoSpB&zG9d@(F`NuB<=_Hu-RREHk z3cs*GI66g)HO)XG7-MkGA%L+4S!zLqsw`nrAfgZrved%3lZ@N19}lz(R9TKJwt3tA zjJAQ06;uIgA3$B0si^Ve909x!h;3W28h2Jwmw~$U4Q|_(%9Yfm$DL%HXCtI230Y3% zN@fbO`SSii*M@4GBi0~Eg3oefIboh|W}0PF%tjA8^)uvwulpbRo6qlISC?R=gQ+8S z{o1TSU3%QNA4sauE}-&)N_+0Ud3s@{Vk3(g1KC*aAMPEn_2L1cn<86lSP>?lj!16Z zpdLHC%Fv4m{`BX(6)q&{Bq%^zLkIzLeFXvHUwu$_UOmKY^q6krpYf}4LF{xIT)OSc z3=lAqw(w^e)p3S$6|JovK}X#89OVM7HQV53twr$X6u-~^0@!gGZAq#QLI3~&07*qo IM6N<$f|h~}o&W#< literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/industrialwires/textures/blocks/ic2_relayHV.png b/src/main/resources/assets/industrialwires/textures/blocks/ic2_relayHV.png deleted file mode 100644 index 52537195653b0717a92b1d070ae6b6a3199e7ea1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 609 zcmV-n0-pVeP)1gh6otRJGqda1 z4*4;0f5%9W1W_b{%*JcaWOjBa0+CHZ zZucFHj^>_w6f@KB_fxmq1;9B+Q51B$UH10&6#p4B3tDTu_oS5O_@7ej!0G9io{YU)t!26{2aACHKmGio1c ztgl?Fo60#3cMp01+xt(3s+IGs-04xm`?kk!b~yj^bttVIv%U&Ien$}&7Klfuh_Plq zki=yM0vKzMr3?~O&cS4gh(a{TQiky-1>0|*4z-U|MTsmndDs4ewvkv&sUp-Ng1RtM zNfX8;0)!9|+q7Uc{>)LkNbSNL+oq-Rj@kwMNx^wBLZ*&blvLhvr68NH9}abGsKzB? z4U*@CqC}Q+uG7txX4wX2ql2Bf3}xio{>R?t%LmxiC0J=;>V#dtb=9DD0ss9c(okq0 zQRS3M2ksA^Uzn*hm&FwW*;wu!?jEr9>JhQsK(^MfB1}FXk>Bl7k3B&Z=*66H`s=zC zE+lE?C_r07j1hBt1p(4OeNgw_JjQHvm~G?V?^oj~snwceX*Vx3K)^^NBb*gf#|6q) vWLq7gPWT@s%15#_JI7`%BZhOPf8PHF5*i;^?RDR~00000NkvXXu0mjf*2)Pf diff --git a/src/main/resources/assets/industrialwires/textures/items/ic2_wireGlass.png b/src/main/resources/assets/industrialwires/textures/items/ic2_wireGlass.png new file mode 100644 index 0000000000000000000000000000000000000000..3463db18c1d9a04115b0e36da09d6246c1bcbc30 GIT binary patch literal 664 zcmV;J0%!e+P)VGd000McNliru;0YEG1T5%a(T4y40wqaA zK~y-)rIWi)R6!JnzcY6q7ZyYw%R>@Dw=l6V;3HIa7AABWIujZbD=qBo^`EdY79_S9 zp|CMZVWJ^YnUE+6iAGT#`?y?o_THIevEBt@C%@{Z7 zCWjQDJUY(n_iG{|c<-5=p3uMu&MQl+8xrIT?UAw$RF%t>5nWh%N3B+8Y;>62y*=`U zB9HFeWTsLkFhXF2mGvzaKYWoOU%+J5FP$CKh2<5zOF1((LZi{37T9IihAl zHMTgfT)!~F?3MEhv=eym=^q?GfHX~yUsx+4vMHO}5zA}esKqV3DuI#15vC>v_4%u} zs7oo8N<>jaF$}psKSx^MrYFo(ja$?Y5}JwQ*3}8hr$ScNx7r;9MzGd)s%C2JY@vWx zNSr5io-E$^cANolUTNA^hXdyv>OIA-UYysziQ9mwDoN_`8FU#e*DAyM?ByF;))Iyx z)>`s~0uScraQjvIx(ocM#>`ZP2=h6<{%Wwex+ysTV+_tK^=O|kpCfyF?;KI1K~WUv zm2>4@cB2-?B-q6L%fa;IkUn|(g1(*-N$RjI%YJ;oBo78+OGiWi{{a60|De66laW3ce+P6)O+^Rb2^J6p6J7@Vx&QzI zJxN4CR5;6}lg)38Q5431=e{$e9j&kF5FhE3iBu3Yh?T#D_pSVRaR zAb^V^e*k0^Qe^|oh-FFOD?Bu1JeEim6&(3X(e)z=p z`XJZO9;I(dfw-O0Ogur2{ljZGuzQmM-2$pgZ@Cwr29j2rw(p>-#BEOqO6)Vnf5hB> zKEZU-LCuJq%#X0ERzt}yYv$>!R6-hB8-eZyLAT|7-mJ$*eznn{OWt(0~eIJBom ze|1?84@W1v3L+=Ovk97IWLXA4Cj^2|FhC8`pkzVG_Xq9XodXDJ_*M&5WoEWT>OH=b zAyJ8-_UFyJ1~W6#OwrtQxmotsSKGl;m-+m4l1in*)XxS3m6bfWdXAE%EH9V%(oEP_ zAE2jL;QhB5?mQir0)TUlphlzFAm>@yX(4HOy!RA}UCA4({rrqOIG5tn@DCph4cN%x z<2Z>B5t7*$hw4a!AFB!Y<0P6JQIzRO<)=KZkBL<9#s8=sOqzjgh}IVZmU+?dNR d`Y$*ZiQg%aQeR5BVh;cS002ovPDHLkV1h`RIcfj^ delta 624 zcmV-$0+0Q$1&IZaB!2;OQb$4nuFf3k00004XF*Lt006O%3;baP00009a7bBm000id z000id0mpBsWB>pF7<5HgbW?9;ba!ELWdLwtX>N2bZe?^JG%heMHD!e|WdHyH`bk7V zR5(walHG3-K@`RL2h>(;i59TH(jv<)NK2tDU~8dJsZ=D|;D1;BXiR)j!BSJJ)oL^* z{-M73U_wHyd>rRovy(RZVES+}cV_4Q?zwl?1wd;s7>F46dOcTP$@%uP{X=xnY0JL- z{hNH(7doAetW4zE@AqYOpw6D^cDp*(!EtqD!%DXAG^oV*8L%qP=&ERq;cCnSuDxFe ze*>K4*2^Yl(|;-KyxK-Co59=N*C@xm_)tsW)6FS-S)Z1@1JQt}XBhkM_E5+#Veic@ z78fq#B2h&eVS zpwG9aq#X^2DeD{e?&4BBh9{ek5wk69K6)t0xkr z>h(34kq91a+*be_cW&2_RQ9t9P_jJ|htHi7z|J*W+Ry+xSSc