Added machine teirs (can someone check them)

Fixed crash when machines explode
This commit is contained in:
modmuss50 2016-03-08 17:34:04 +00:00
parent 0de43bfe2d
commit 7e5e40a338
38 changed files with 413 additions and 207 deletions

View file

@ -1,17 +1,18 @@
package techreborn.parts;
import net.minecraft.util.IStringSerializable;
import reborncore.api.power.EnumPowerTier;
import techreborn.parts.types.*;
public enum EnumCableType implements IStringSerializable {
COPPER("copper", "techreborn:blocks/cables/copper_cable", 128, 12.0, true, CopperCable.class),
TIN("tin", "techreborn:blocks/cables/tin_cable", 32, 12.0, true, TinCable.class),
GOLD("gold", "techreborn:blocks/cables/gold_cable", 512, 12.0, true, GoldCable.class),
HV("hv", "techreborn:blocks/cables/hv_cable", 2048, 12.0, true, HVCable.class),
GLASSFIBER("glassfiber", "techreborn:blocks/cables/glass_fiber_cable", 8192, 12.0, false, GlassFiberCable.class),
ICOPPER("insulatedcopper", "techreborn:blocks/cables/copper_insulated_cable", 128, 10.0, false, InsulatedCopperCable.class),
IGOLD("insulatedgold", "techreborn:blocks/cables/gold_insulated_cable", 512, 10.0, false, InsulatedGoldCable.class),
IHV("insulatedhv", "techreborn:blocks/cables/hv_insulated_cable", 2048, 10.0, false, InsulatedHVCable.class);
COPPER("copper", "techreborn:blocks/cables/copper_cable", 128, 12.0, true, CopperCable.class, EnumPowerTier.LOW),
TIN("tin", "techreborn:blocks/cables/tin_cable", 32, 12.0, true, TinCable.class, EnumPowerTier.MEDIUM),
GOLD("gold", "techreborn:blocks/cables/gold_cable", 512, 12.0, true, GoldCable.class, EnumPowerTier.MEDIUM),
HV("hv", "techreborn:blocks/cables/hv_cable", 2048, 12.0, true, HVCable.class, EnumPowerTier.HIGH),
GLASSFIBER("glassfiber", "techreborn:blocks/cables/glass_fiber_cable", 8192, 12.0, false, GlassFiberCable.class, EnumPowerTier.HIGH),
ICOPPER("insulatedcopper", "techreborn:blocks/cables/copper_insulated_cable", 128, 10.0, false, InsulatedCopperCable.class, EnumPowerTier.LOW),
IGOLD("insulatedgold", "techreborn:blocks/cables/gold_insulated_cable", 512, 10.0, false, InsulatedGoldCable.class, EnumPowerTier.HIGH),
IHV("insulatedhv", "techreborn:blocks/cables/hv_insulated_cable", 2048, 10.0, false, InsulatedHVCable.class, EnumPowerTier.HIGH);
private String friendlyName;
public String textureName = "minecraft:blocks/iron_block";
@ -19,14 +20,16 @@ public enum EnumCableType implements IStringSerializable {
public double cableThickness = 3.0;
public boolean canKill = false;
public Class<? extends CableMultipart> cableClass;
public EnumPowerTier tier;
EnumCableType(String friendlyName, String textureName, int transferRate, double cableThickness, boolean canKill, Class<? extends CableMultipart> cableClass) {
EnumCableType(String friendlyName, String textureName, int transferRate, double cableThickness, boolean canKill, Class<? extends CableMultipart> cableClass, EnumPowerTier tier) {
this.friendlyName = friendlyName;
this.textureName = textureName;
this.transferRate = transferRate;
this.cableThickness = cableThickness / 2;
this.canKill = canKill;
this.cableClass = cableClass;
this.tier = tier;
}
@Override

View file

@ -84,5 +84,6 @@ public class ItemCables extends ItemMultiPart implements ITexturedItem {
if (type.canKill) {
tooltip.add(EnumChatFormatting.RED + "Damages entity's!");
}
tooltip.add(EnumChatFormatting.GREEN + "Tier: " + EnumChatFormatting.LIGHT_PURPLE + type.tier);
}
}