Added insulated wires for tin, copper and gold (textures ToDo)
Added a recipe for the discharge meter
This commit is contained in:
parent
93fb75a0b0
commit
ced4704b14
|
@ -30,7 +30,7 @@ sourceCompatibility = 1.8
|
|||
targetCompatibility = 1.8
|
||||
|
||||
minecraft {
|
||||
version = "14.22.1.2479"
|
||||
version = "14.23.1.2555"
|
||||
runDir = "run"
|
||||
|
||||
replace '${version}', project.version
|
||||
|
|
|
@ -150,8 +150,10 @@ public class BlockIC2Connector extends BlockIWBase implements IMetaEnum {
|
|||
super.addInformation(stack, world, tooltip, advanced);
|
||||
if (!stack.isEmpty() && stack.getMetadata() % 2 == 0) {
|
||||
int type = stack.getMetadata() / 2;
|
||||
tooltip.add(I18n.format(IndustrialWires.MODID + ".tooltip.power_tier", type + 1));
|
||||
tooltip.add(I18n.format(IndustrialWires.MODID + ".tooltip.eu_per_tick", IC2Wiretype.ALL[type].getTransferRate() / 8));
|
||||
tooltip.add(I18n.format(IndustrialWires.MODID + ".tooltip.power_tier", (type%5) + 1));
|
||||
IC2Wiretype wire = IC2Wiretype.ALL[type];
|
||||
tooltip.add(I18n.format(IndustrialWires.MODID + ".tooltip.eu_per_tick",
|
||||
wire.getTransferRate() / wire.getFactor()));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -18,8 +18,8 @@
|
|||
package malte0811.industrialWires.blocks.wire;
|
||||
|
||||
import blusunrize.immersiveengineering.api.energy.wires.WireType;
|
||||
import malte0811.industrialWires.wires.IC2Wiretype;
|
||||
|
||||
import static malte0811.industrialWires.wires.IC2Wiretype.COPPER_IC2;
|
||||
import static malte0811.industrialWires.wires.IC2Wiretype.IC2_COPPER_CAT;
|
||||
|
||||
public class TileEntityIC2ConnectorCopper extends TileEntityIC2ConnectorTin {
|
||||
|
@ -33,7 +33,7 @@ public class TileEntityIC2ConnectorCopper extends TileEntityIC2ConnectorTin {
|
|||
|
||||
{
|
||||
tier = 2;
|
||||
maxStored = IC2Wiretype.COPPER_IC2.getTransferRate() / 8;
|
||||
maxStored = COPPER_IC2.getTransferRate() / COPPER_IC2.getFactor();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -18,8 +18,8 @@
|
|||
package malte0811.industrialWires.blocks.wire;
|
||||
|
||||
import blusunrize.immersiveengineering.api.energy.wires.WireType;
|
||||
import malte0811.industrialWires.wires.IC2Wiretype;
|
||||
|
||||
import static malte0811.industrialWires.wires.IC2Wiretype.GLASS;
|
||||
import static malte0811.industrialWires.wires.IC2Wiretype.IC2_GLASS_CAT;
|
||||
|
||||
public class TileEntityIC2ConnectorGlass extends TileEntityIC2ConnectorHV {
|
||||
|
@ -32,7 +32,7 @@ public class TileEntityIC2ConnectorGlass extends TileEntityIC2ConnectorHV {
|
|||
|
||||
{
|
||||
tier = 5;
|
||||
maxStored = IC2Wiretype.GLASS.getTransferRate() / 8;
|
||||
maxStored = GLASS.getTransferRate() / GLASS.getFactor();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -20,10 +20,10 @@ package malte0811.industrialWires.blocks.wire;
|
|||
import blusunrize.immersiveengineering.api.energy.wires.IImmersiveConnectable;
|
||||
import blusunrize.immersiveengineering.api.energy.wires.ImmersiveNetHandler.Connection;
|
||||
import blusunrize.immersiveengineering.api.energy.wires.WireType;
|
||||
import malte0811.industrialWires.wires.IC2Wiretype;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
|
||||
import static malte0811.industrialWires.wires.IC2Wiretype.GOLD;
|
||||
import static malte0811.industrialWires.wires.IC2Wiretype.IC2_GOLD_CAT;
|
||||
|
||||
public class TileEntityIC2ConnectorGold extends TileEntityIC2ConnectorTin {
|
||||
|
@ -37,7 +37,7 @@ public class TileEntityIC2ConnectorGold extends TileEntityIC2ConnectorTin {
|
|||
|
||||
{
|
||||
tier = 3;
|
||||
maxStored = IC2Wiretype.GOLD.getTransferRate() / 8;
|
||||
maxStored = GOLD.getTransferRate() / GOLD.getFactor();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -20,10 +20,10 @@ package malte0811.industrialWires.blocks.wire;
|
|||
import blusunrize.immersiveengineering.api.energy.wires.IImmersiveConnectable;
|
||||
import blusunrize.immersiveengineering.api.energy.wires.ImmersiveNetHandler.Connection;
|
||||
import blusunrize.immersiveengineering.api.energy.wires.WireType;
|
||||
import malte0811.industrialWires.wires.IC2Wiretype;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
|
||||
import static malte0811.industrialWires.wires.IC2Wiretype.HV;
|
||||
import static malte0811.industrialWires.wires.IC2Wiretype.IC2_HV_CAT;
|
||||
|
||||
public class TileEntityIC2ConnectorHV extends TileEntityIC2ConnectorTin {
|
||||
|
@ -37,7 +37,7 @@ public class TileEntityIC2ConnectorHV extends TileEntityIC2ConnectorTin {
|
|||
|
||||
{
|
||||
tier = 4;
|
||||
maxStored = IC2Wiretype.HV.getTransferRate() / 8;
|
||||
maxStored = HV.getTransferRate() / HV.getFactor();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -32,7 +32,6 @@ import ic2.api.energy.tile.IEnergySource;
|
|||
import malte0811.industrialWires.IIC2Connector;
|
||||
import malte0811.industrialWires.IndustrialWires;
|
||||
import malte0811.industrialWires.blocks.IBlockBoundsIW;
|
||||
import malte0811.industrialWires.wires.IC2Wiretype;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
|
@ -52,6 +51,7 @@ import java.util.*;
|
|||
import java.util.function.Consumer;
|
||||
|
||||
import static malte0811.industrialWires.wires.IC2Wiretype.IC2_TIN_CAT;
|
||||
import static malte0811.industrialWires.wires.IC2Wiretype.TIN;
|
||||
|
||||
@Optional.InterfaceList({
|
||||
@Optional.Interface(iface = "ic2.api.energy.tile.IEnergySource", modid = "ic2"),
|
||||
|
@ -68,7 +68,7 @@ public class TileEntityIC2ConnectorTin extends TileEntityImmersiveConnectable im
|
|||
//IE net to IC2 net buffer
|
||||
double outBuffer = 0;
|
||||
double maxToMachine = 0;
|
||||
double maxStored = IC2Wiretype.TIN.getTransferRate() / 8;
|
||||
double maxStored = TIN.getTransferRate() / TIN.getFactor();
|
||||
int tier = 1;
|
||||
|
||||
TileEntityIC2ConnectorTin(boolean rel) {
|
||||
|
|
|
@ -55,7 +55,9 @@ import java.util.List;
|
|||
import java.util.Set;
|
||||
|
||||
public class ItemIC2Coil extends Item implements IWireCoil {
|
||||
public final static String[] subNames = {"tin", "copper", "gold", "hv", "glass"};
|
||||
public final static String[] subNames = {
|
||||
"tin", "copper", "gold", "hv", "glass", "tin_ins", "copper_ins", "gold_ins"
|
||||
};
|
||||
public final static String lengthKey = "wireLength";
|
||||
public final static String NAME = "ic2_wire_coil";
|
||||
|
||||
|
@ -95,9 +97,11 @@ public class ItemIC2Coil extends Item implements IWireCoil {
|
|||
public void addInformation(ItemStack stack, @Nullable World worldIn, List<String> tooltip, ITooltipFlag flagIn) {
|
||||
|
||||
tooltip.add(I18n.format(IndustrialWires.MODID + ".desc.wireLength", getLength(stack)));
|
||||
int transferRate = IC2Wiretype.ALL[stack.getMetadata()].getTransferRate();
|
||||
IC2Wiretype wireType = IC2Wiretype.ALL[stack.getMetadata()];
|
||||
int transferRate = wireType.getTransferRate();
|
||||
tooltip.add(I18n.format(IndustrialWires.MODID + ".tooltip.transfer_rate", transferRate));
|
||||
tooltip.add(I18n.format(IndustrialWires.MODID + ".tooltip.input_rate", transferRate / 8));
|
||||
tooltip.add(I18n.format(IndustrialWires.MODID + ".tooltip.input_rate",
|
||||
transferRate / wireType.getFactor()));
|
||||
if (stack.getTagCompound() != null && stack.getTagCompound().hasKey("linkingPos")) {
|
||||
int[] link = stack.getTagCompound().getIntArray("linkingPos");
|
||||
if (link.length > 3) {
|
||||
|
@ -247,6 +251,6 @@ public class ItemIC2Coil extends Item implements IWireCoil {
|
|||
}
|
||||
|
||||
public static int getMaxWireLength(ItemStack i) {
|
||||
return IWConfig.maxLengthOnCoil[i.getItemDamage()];
|
||||
return IWConfig.maxLengthOnCoil[i.getItemDamage()%5];
|
||||
}
|
||||
}
|
||||
|
|
|
@ -38,19 +38,25 @@ public class IC2Wiretype extends WireType {
|
|||
public static final String IC2_HV_CAT = "IC_HV";
|
||||
public static final String IC2_GLASS_CAT = "IC_GLASS";
|
||||
private final int type;
|
||||
private final int[] ic2Rates = {32 * 8, 128 * 8, 512 * 8, 2048 * 8, 8192 * 8};
|
||||
private final int[] ic2Rates = {32, 128, 512, 2048, 8192};
|
||||
private final int[] ic2Colors = {0xa5bcc7, 0xbc7945, 0xfeff73, 0xb9d6d9, 0xf1f1f1};
|
||||
private final String[] ic2Names = {"ic2Tin", "ic2Copper", "ic2Gold", "ic2Hv", "ic2Glass"};
|
||||
private final String[] ic2Names = {"ic2Tin", "ic2Copper", "ic2Gold", "ic2Hv", "ic2Glass",
|
||||
"ic2TinIns", "ic2CopperIns", "ic2GoldIns"};
|
||||
private final double[] lossPerBlock = {.2, .2, .4, .8, .025};
|
||||
private final double[] ic2RenderDiameter = {.03125, .03125, .046875, .0625, .75 * .03125};
|
||||
private final double[] ic2RenderDiameter = {
|
||||
.03125, .03125, .046875, .0625, .75 * .03125, .0625, .0625, 2*.046875
|
||||
};
|
||||
|
||||
public static final IC2Wiretype TIN = new IC2Wiretype(0);
|
||||
public static final IC2Wiretype COPPER_IC2 = new IC2Wiretype(1);
|
||||
public static final IC2Wiretype GOLD = new IC2Wiretype(2);
|
||||
public static final IC2Wiretype HV = new IC2Wiretype(3);
|
||||
public static final IC2Wiretype GLASS = new IC2Wiretype(4);
|
||||
public static final IC2Wiretype TIN_INSULATED = new IC2Wiretype(5);
|
||||
public static final IC2Wiretype COPPER_IC2_INSULATED = new IC2Wiretype(6);
|
||||
public static final IC2Wiretype GOLD_INSULATED = new IC2Wiretype(7);
|
||||
public static final IC2Wiretype[] ALL = {
|
||||
TIN, COPPER_IC2, GOLD, HV, GLASS
|
||||
TIN, COPPER_IC2, GOLD, HV, GLASS, TIN_INSULATED, COPPER_IC2_INSULATED, GOLD_INSULATED
|
||||
};
|
||||
|
||||
public IC2Wiretype(int ordinal) {
|
||||
|
@ -64,22 +70,22 @@ public class IC2Wiretype extends WireType {
|
|||
*/
|
||||
@Override
|
||||
public double getLossRatio() {
|
||||
return lossPerBlock[type];
|
||||
return lossPerBlock[type%5];
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getTransferRate() {
|
||||
return ic2Rates[type];
|
||||
return ic2Rates[type%5]*getFactor();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getColour(Connection connection) {
|
||||
return ic2Colors[type];
|
||||
return type<5?ic2Colors[type]:0x2c2c2c;
|
||||
}
|
||||
|
||||
@Override
|
||||
public double getSlack() {
|
||||
return type == 2 ? 1.03 : 1.005;
|
||||
return type%5 == 2 ? 1.03 : 1.005;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -90,7 +96,7 @@ public class IC2Wiretype extends WireType {
|
|||
|
||||
@Override
|
||||
public int getMaxLength() {
|
||||
return IWConfig.maxLengthPerConn[type];
|
||||
return IWConfig.maxLengthPerConn[type%5];
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -136,7 +142,7 @@ public class IC2Wiretype extends WireType {
|
|||
@Nullable
|
||||
@Override
|
||||
public String getCategory() {
|
||||
switch (type) {
|
||||
switch (type%5) {
|
||||
case 0:
|
||||
return IC2_TIN_CAT;
|
||||
case 1:
|
||||
|
@ -150,4 +156,9 @@ public class IC2Wiretype extends WireType {
|
|||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
//Factor between transfer- and input rate
|
||||
public int getFactor() {
|
||||
return type<5?8:4;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,6 +9,8 @@ tile.industrialwires.ic2_connector.hv_relay.name=IC2 HV Wire Relay
|
|||
tile.industrialwires.ic2_connector.glass_conn.name=Glass Fiber Wire Connector
|
||||
tile.industrialwires.ic2_connector.glass_relay.name=Glass Fiber Wire Relay
|
||||
|
||||
tile.industrialwires.general_hv.discharge_meter.name=Discharge Energy Meter
|
||||
|
||||
tile.industrialwires.mechanical_converter.ie_motor.name=Rotational Motor
|
||||
tile.industrialwires.mechanical_converter.ie_to_ic2.name=Converter: Rotational To Kinetic
|
||||
tile.industrialwires.mechanical_converter.ic2_to_ie.name=Converter: Kinetic To Rotational
|
||||
|
@ -28,6 +30,9 @@ item.industrialwires.ic2_wire_coil.copper.name=Copper Wire Coil
|
|||
item.industrialwires.ic2_wire_coil.gold.name=Gold Wire Coil
|
||||
item.industrialwires.ic2_wire_coil.hv.name=IC2 HV Wire Coil
|
||||
item.industrialwires.ic2_wire_coil.glass.name=Glass Fiber Wire Coil
|
||||
item.industrialwires.ic2_wire_coil.tin_ins.name=Insulated Tin Wire Coil
|
||||
item.industrialwires.ic2_wire_coil.copper_ins.name=Insulated Copper Wire Coil
|
||||
item.industrialwires.ic2_wire_coil.gold_ins.name=Insulated Gold Wire Coil
|
||||
|
||||
item.industrialwires.panel_component.lighted_button.name=Lighted Button
|
||||
item.industrialwires.panel_component.label.name=Label
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
"result": {
|
||||
"item": "industrialwires:general_hv",
|
||||
"data": 0
|
||||
},
|
||||
"pattern": [
|
||||
"ss",
|
||||
"c ",
|
||||
"ss"
|
||||
],
|
||||
"type": "forge:ore_shaped",
|
||||
"key": {
|
||||
"c": {
|
||||
"item": "immersiveengineering:connector",
|
||||
"data": 4
|
||||
},
|
||||
"s": {
|
||||
"type": "forge:ore_dict", "ore": "stickSteel"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
{
|
||||
"type": "industrialwires:wire_coil",
|
||||
"cable": {
|
||||
"type": "industrialwires:ic2_item",
|
||||
"name": "cable",
|
||||
"variant": "type:copper,insulation:1"
|
||||
},
|
||||
"coil": {
|
||||
"item": "industrialwires:ic2_wire_coil",
|
||||
"data": 6
|
||||
},
|
||||
"conditions": [
|
||||
{
|
||||
"type": "forge:mod_loaded",
|
||||
"modid": "ic2"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
{
|
||||
"type": "industrialwires:wire_coil",
|
||||
"cable": {
|
||||
"type": "industrialwires:ic2_item",
|
||||
"name": "cable",
|
||||
"variant": "type:gold,insulation:2"
|
||||
},
|
||||
"coil": {
|
||||
"item": "industrialwires:ic2_wire_coil",
|
||||
"data": 7
|
||||
},
|
||||
"conditions": [
|
||||
{
|
||||
"type": "forge:mod_loaded",
|
||||
"modid": "ic2"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
{
|
||||
"type": "industrialwires:wire_coil",
|
||||
"cable": {
|
||||
"type": "industrialwires:ic2_item",
|
||||
"name": "cable",
|
||||
"variant": "type:tin,insulation:1"
|
||||
},
|
||||
"coil": {
|
||||
"item": "industrialwires:ic2_wire_coil",
|
||||
"data": 5
|
||||
},
|
||||
"conditions": [
|
||||
{
|
||||
"type": "forge:mod_loaded",
|
||||
"modid": "ic2"
|
||||
}
|
||||
]
|
||||
}
|
Loading…
Reference in a new issue