Texture Rendering for cables

This commit is contained in:
modmuss50 2016-03-05 18:10:36 +00:00
parent 4000dbcc55
commit 1e24d1f116
4 changed files with 24 additions and 14 deletions

View file

@ -57,7 +57,7 @@ public abstract class CableMultipart extends Multipart implements IOccludingPart
public void refreshBounding() {
float centerFirst = center - offset;
double w = getCableType().cableThickness / 16;
double w = (getCableType().cableThickness / 16) - 0.5;
boundingBoxes[6] = new Vecs3dCube(centerFirst - w - 0.03, centerFirst
- w - 0.08, centerFirst - w - 0.03, centerFirst + w + 0.08,
centerFirst + w + 0.04, centerFirst + w + 0.08);

View file

@ -4,23 +4,23 @@ import net.minecraft.util.IStringSerializable;
import techreborn.parts.types.*;
public enum EnumCableType implements IStringSerializable {
COPPER("copper", "minecraft:blocks/iron_block", 128, 4.0F, true, CopperCable.class),
TIN("tin", "minecraft:blocks/iron_block", 32, 4.0F, true, TinCable.class),
GOLD("gold", "minecraft:blocks/iron_block", 512, 3.0F, true, GoldCable.class),
HV("hv", "minecraft:blocks/iron_block", 2048, 6.0F, true, HVCable.class),
GLASSFIBER("glassfiber", "minecraft:blocks/iron_block", 8192, 4.0F, false, GlassFiberCable.class),
ICOPPER("insulatedcopper", "minecraft:blocks/iron_block", 128, 6.0F, false, InsulatedCopperCable.class),
IGOLD("insulatedgold", "minecraft:blocks/iron_block", 512, 6.0F, false, InsulatedGoldCable.class),
IHV("insulatedhv", "minecraft:blocks/iron_block", 2048, 10.0F, false, InsulatedHVCable.class);
COPPER("copper", "techreborn:blocks/cables/copper_cable", 128, 12.0, true, CopperCable.class),
TIN("tin", "minecraft:blocks/iron_block", 32, 4.0, true, TinCable.class),
GOLD("gold", "minecraft:blocks/iron_block", 512, 3.0, true, GoldCable.class),
HV("hv", "minecraft:blocks/iron_block", 2048, 6.0, true, HVCable.class),
GLASSFIBER("glassfiber", "minecraft:blocks/iron_block", 8192, 4.0, false, GlassFiberCable.class),
ICOPPER("insulatedcopper", "techreborn:blocks/cables/copper_insulated_cable", 128, 10.0, false, InsulatedCopperCable.class),
IGOLD("insulatedgold", "minecraft:blocks/iron_block", 512, 6.0, false, InsulatedGoldCable.class),
IHV("insulatedhv", "minecraft:blocks/iron_block", 2048, 10.0, false, InsulatedHVCable.class);
private String friendlyName;
public String textureName = "minecraft:blocks/iron_block";
public int transferRate= 128;
public float cableThickness = 3.0F;
public double cableThickness = 3.0;
public boolean canKill = false;
public Class<? extends CableMultipart> cableClass;
EnumCableType(String friendlyName, String textureName, int transferRate, float cableThickness, boolean canKill, Class<? extends CableMultipart> cableClass) {
EnumCableType(String friendlyName, String textureName, int transferRate, double cableThickness, boolean canKill, Class<? extends CableMultipart> cableClass) {
this.friendlyName = friendlyName;
this.textureName = textureName;
this.transferRate = transferRate;