diff --git a/common/mekanism/client/ModelTransmitter.java b/common/mekanism/client/ModelTransmitter.java index 62383d493..4539c04f3 100644 --- a/common/mekanism/client/ModelTransmitter.java +++ b/common/mekanism/client/ModelTransmitter.java @@ -10,61 +10,96 @@ import net.minecraftforge.common.ForgeDirection; @SideOnly(Side.CLIENT) public class ModelTransmitter extends ModelBase { - ModelRenderer Center; - ModelRenderer Up; - ModelRenderer Down; - ModelRenderer Front; - ModelRenderer Back; - ModelRenderer Left; - ModelRenderer Right; + ModelRenderer UpOn; + ModelRenderer DownOn; + ModelRenderer FrontOn; + ModelRenderer BackOn; + ModelRenderer LeftOn; + ModelRenderer RightOn; + ModelRenderer UpOff; + ModelRenderer DownOff; + ModelRenderer FrontOff; + ModelRenderer BackOff; + ModelRenderer LeftOff; + ModelRenderer RightOff; public ModelTransmitter() { textureWidth = 64; textureHeight = 64; - Center = new ModelRenderer(this, 0, 0); - Center.addBox(0F, 0F, 0F, 6, 6, 6); - Center.setRotationPoint(-3F, 13F, -3F); - Center.setTextureSize(64, 64); - Center.mirror = true; - setRotation(Center, 0F, 0F, 0F); - Up = new ModelRenderer(this, 0, 13); - Up.addBox(0F, 0F, 0F, 6, 5, 6); - Up.setRotationPoint(-3F, 8F, -3F); - Up.setTextureSize(64, 64); - Up.mirror = true; - setRotation(Up, 0F, 0F, 0F); - Down = new ModelRenderer(this, 26, 13); - Down.addBox(0F, 0F, 0F, 6, 5, 6); - Down.setRotationPoint(-3F, 19F, -3F); - Down.setTextureSize(64, 64); - Down.mirror = true; - setRotation(Down, 0F, 0F, 0F); - Front = new ModelRenderer(this, 0, 26); - Front.addBox(0F, 0F, 0F, 5, 6, 6); - Front.setRotationPoint(-3F, 13F, -3F); - Front.setTextureSize(64, 64); - Front.mirror = true; - setRotation(Front, 0F, 1.570796F, 0F); - Back = new ModelRenderer(this, 0, 41); - Back.addBox(0F, 0F, 0F, 5, 6, 6); - Back.setRotationPoint(-3F, 13F, 8F); - Back.setTextureSize(64, 64); - Back.mirror = true; - setRotation(Back, 0F, 1.570796F, 0F); - Left = new ModelRenderer(this, 26, 0); - Left.addBox(0F, 0F, 0F, 6, 5, 6); - Left.setRotationPoint(3F, 19F, 3F); - Left.setTextureSize(64, 64); - Left.mirror = true; - setRotation(Left, 1.570796F, 1.570796F, 0F); - Right = new ModelRenderer(this, 26, 26); - Right.addBox(0F, 0F, 0F, 6, 5, 6); - Right.setRotationPoint(-8F, 19F, 3F); - Right.setTextureSize(64, 64); - Right.mirror = true; - setRotation(Right, 1.570796F, 1.570796F, 0F); + UpOn = new ModelRenderer(this, 0, 13); + UpOn.addBox(0F, 0F, 0F, 6, 5, 6); + UpOn.setRotationPoint(-3F, 8F, -3F); + UpOn.setTextureSize(64, 64); + UpOn.mirror = true; + setRotation(UpOn, 0F, 0F, 0F); + DownOn = new ModelRenderer(this, 26, 13); + DownOn.addBox(0F, 0F, 0F, 6, 5, 6); + DownOn.setRotationPoint(-3F, 19F, -3F); + DownOn.setTextureSize(64, 64); + DownOn.mirror = true; + setRotation(DownOn, 0F, 0F, 0F); + FrontOn = new ModelRenderer(this, 0, 26); + FrontOn.addBox(0F, 0F, 0F, 5, 6, 6); + FrontOn.setRotationPoint(-3F, 13F, -3F); + FrontOn.setTextureSize(64, 64); + FrontOn.mirror = true; + setRotation(FrontOn, 0F, 1.570796F, 0F); + BackOn = new ModelRenderer(this, 0, 41); + BackOn.addBox(0F, 0F, 0F, 5, 6, 6); + BackOn.setRotationPoint(-3F, 13F, 8F); + BackOn.setTextureSize(64, 64); + BackOn.mirror = true; + setRotation(BackOn, 0F, 1.570796F, 0F); + LeftOn = new ModelRenderer(this, 26, 0); + LeftOn.addBox(0F, 0F, 0F, 6, 5, 6); + LeftOn.setRotationPoint(3F, 19F, 3F); + LeftOn.setTextureSize(64, 64); + LeftOn.mirror = true; + setRotation(LeftOn, 1.570796F, 1.570796F, 0F); + RightOn = new ModelRenderer(this, 26, 26); + RightOn.addBox(0F, 0F, 0F, 6, 5, 6); + RightOn.setRotationPoint(-8F, 19F, 3F); + RightOn.setTextureSize(64, 64); + RightOn.mirror = true; + setRotation(RightOn, 1.570796F, 1.570796F, 0F); + UpOff = new ModelRenderer(this, 0, 0); + UpOff.addBox(0F, 0F, 0F, 6, 0, 6); + UpOff.setRotationPoint(-3F, 13F, -3F); + UpOff.setTextureSize(64, 64); + UpOff.mirror = true; + setRotation(UpOff, 0F, 0F, 0F); + DownOff = new ModelRenderer(this, 0, 0); + DownOff.addBox(0F, 0F, 0F, 6, 0, 6); + DownOff.setRotationPoint(-3F, 19F, -3F); + DownOff.setTextureSize(64, 64); + DownOff.mirror = true; + setRotation(DownOff, 0F, 0F, 0F); + FrontOff = new ModelRenderer(this, 0, 0); + FrontOff.addBox(0F, 0F, 0F, 0, 6, 6); + FrontOff.setRotationPoint(-3F, 13F, -3F); + FrontOff.setTextureSize(64, 64); + FrontOff.mirror = true; + setRotation(FrontOff, 0F, 1.570796F, 0F); + BackOff = new ModelRenderer(this, 0, 0); + BackOff.addBox(0F, 0F, 0F, 0, 6, 6); + BackOff.setRotationPoint(-3F, 13F, 3F); + BackOff.setTextureSize(64, 64); + BackOff.mirror = true; + setRotation(BackOff, 0F, 1.570796F, 0F); + LeftOff = new ModelRenderer(this, 0, 0); + LeftOff.addBox(0F, 0F, 0F, 6, 0, 6); + LeftOff.setRotationPoint(3F, 19F, 3F); + LeftOff.setTextureSize(64, 64); + LeftOff.mirror = true; + setRotation(LeftOff, 1.570796F, 1.570796F, 0F); + RightOff = new ModelRenderer(this, 0, 0); + RightOff.addBox(0F, 0F, 0F, 6, 0, 6); + RightOff.setRotationPoint(-3F, 19F, 3F); + RightOff.setTextureSize(64, 64); + RightOff.mirror = true; + setRotation(RightOff, 1.570796F, 1.570796F, 0F); } @Override @@ -73,38 +108,64 @@ public class ModelTransmitter extends ModelBase super.render(entity, f, f1, f2, f3, f4, f5); setRotationAngles(f, f1, f2, f3, f4, f5, entity); - Center.render(0.0625F); - for(ForgeDirection orientation : ForgeDirection.VALID_DIRECTIONS) { - renderSide(orientation); + renderSide(orientation, true); } } - public void renderSide(ForgeDirection orientation) + public void renderSide(ForgeDirection orientation, boolean on) { - switch (orientation) + if(on) { - case DOWN: - Down.render(0.0625F); - break; - case UP: - Up.render(0.0625F); - break; - case NORTH: - Back.render(0.0625F); - break; - case SOUTH: - Front.render(0.0625F); - break; - case WEST: - Right.render(0.0625F); - break; - case EAST: - Left.render(0.0625F); - break; - default: - return; + switch (orientation) + { + case DOWN: + DownOn.render(0.0625F); + break; + case UP: + UpOn.render(0.0625F); + break; + case NORTH: + BackOn.render(0.0625F); + break; + case SOUTH: + FrontOn.render(0.0625F); + break; + case WEST: + RightOn.render(0.0625F); + break; + case EAST: + LeftOn.render(0.0625F); + break; + default: + return; + } + } else + { + switch (orientation) + { + case DOWN: + DownOff.render(0.0625F); + break; + case UP: + UpOff.render(0.0625F); + break; + case NORTH: + BackOff.render(0.0625F); + break; + case SOUTH: + FrontOff.render(0.0625F); + break; + case WEST: + RightOff.render(0.0625F); + break; + case EAST: + LeftOff.render(0.0625F); + break; + default: + return; + } } } diff --git a/common/mekanism/client/RenderMechanicalPipe.java b/common/mekanism/client/RenderMechanicalPipe.java index b04459f4b..e7a725181 100644 --- a/common/mekanism/client/RenderMechanicalPipe.java +++ b/common/mekanism/client/RenderMechanicalPipe.java @@ -45,13 +45,9 @@ public class RenderMechanicalPipe extends TileEntitySpecialRenderer for(int i = 0; i < 6; i++) { - if(connectable[i]) - { - model.renderSide(ForgeDirection.getOrientation(i)); - } + model.renderSide(ForgeDirection.getOrientation(i), connectable[i]); } - model.Center.render(0.0625F); GL11.glPopMatrix(); if(tileEntity.liquidScale > 0 && tileEntity.refLiquid != null) diff --git a/common/mekanism/client/RenderPressurizedTube.java b/common/mekanism/client/RenderPressurizedTube.java index c12d92e77..d132a5d05 100644 --- a/common/mekanism/client/RenderPressurizedTube.java +++ b/common/mekanism/client/RenderPressurizedTube.java @@ -66,46 +66,42 @@ public class RenderPressurizedTube extends TileEntitySpecialRenderer { for(int i = 0; i < 6; i++) { - if(connectable[i]) + TileEntity sideTile = Object3D.get(tileEntity).getFromSide(ForgeDirection.getOrientation(i)).getTileEntity(tileEntity.worldObj); + + if(sideTile instanceof TileEntityGasTank && i != 0 && i != 1) { - TileEntity sideTile = Object3D.get(tileEntity).getFromSide(ForgeDirection.getOrientation(i)).getTileEntity(tileEntity.worldObj); + GL11.glPushMatrix(); - if(sideTile instanceof TileEntityGasTank && i != 0 && i != 1) + switch(ForgeDirection.getOrientation(i)) { - GL11.glPushMatrix(); - - switch(ForgeDirection.getOrientation(i)) - { - case NORTH: - GL11.glScalef(1, 1, 1.63f); - GL11.glTranslatef(0, 0, -.073f); - break; - case SOUTH: - GL11.glScalef(1, 1, 1.63f); - GL11.glTranslatef(0, 0, .073f); - break; - case WEST: - GL11.glScalef(1.63f, 1, 1); - GL11.glTranslatef(.073f, 0, 0); - break; - case EAST: - GL11.glScalef(1.63f, 1, 1); - GL11.glTranslatef(-.073f, 0, 0); - break; - } - - model.renderSide(ForgeDirection.getOrientation(i)); - - GL11.glPopMatrix(); - } - else { - model.renderSide(ForgeDirection.getOrientation(i)); + case NORTH: + GL11.glScalef(1, 1, 1.63f); + GL11.glTranslatef(0, 0, -.073f); + break; + case SOUTH: + GL11.glScalef(1, 1, 1.63f); + GL11.glTranslatef(0, 0, .073f); + break; + case WEST: + GL11.glScalef(1.63f, 1, 1); + GL11.glTranslatef(.073f, 0, 0); + break; + case EAST: + GL11.glScalef(1.63f, 1, 1); + GL11.glTranslatef(-.073f, 0, 0); + break; } + + model.renderSide(ForgeDirection.getOrientation(i), connectable[i]); + + GL11.glPopMatrix(); + } + else { + model.renderSide(ForgeDirection.getOrientation(i), connectable[i]); } } } - model.Center.render(0.0625F); GL11.glPopMatrix(); if(tileEntity.gasScale > 0 && tileEntity.refGas != null && tileEntity.refGas.hasTexture()) diff --git a/common/mekanism/client/RenderUniversalCable.java b/common/mekanism/client/RenderUniversalCable.java index 7baf534ba..4dfdf32b1 100644 --- a/common/mekanism/client/RenderUniversalCable.java +++ b/common/mekanism/client/RenderUniversalCable.java @@ -42,14 +42,9 @@ public class RenderUniversalCable extends TileEntitySpecialRenderer for(int i = 0; i < 6; i++) { - if(connectable[i]) - { - model.renderSide(ForgeDirection.getOrientation(i)); - } + model.renderSide(ForgeDirection.getOrientation(i), connectable[i]); } - model.Center.render(0.0625F); - GL11.glPopMatrix(); if(Mekanism.fancyUniversalCableRender) diff --git a/common/mekanism/client/TransmitterRenderer.java b/common/mekanism/client/TransmitterRenderer.java index 1de984f72..6917af144 100644 --- a/common/mekanism/client/TransmitterRenderer.java +++ b/common/mekanism/client/TransmitterRenderer.java @@ -36,9 +36,12 @@ public class TransmitterRenderer implements ISimpleBlockRenderingHandler break; } - transmitter.Center.render(0.0625F); - transmitter.Up.render(0.0625F); - transmitter.Down.render(0.0625F); + transmitter.UpOn.render(0.0625F); + transmitter.DownOn.render(0.0625F); + transmitter.BackOff.render(0.0625F); + transmitter.FrontOff.render(0.0625F); + transmitter.LeftOff.render(0.0625F); + transmitter.RightOff.render(0.0625F); } @Override diff --git a/resources/mods/mekanism/render/MechanicalPipe.png b/resources/mods/mekanism/render/MechanicalPipe.png index 5e32347c1..0390b9057 100644 Binary files a/resources/mods/mekanism/render/MechanicalPipe.png and b/resources/mods/mekanism/render/MechanicalPipe.png differ diff --git a/resources/mods/mekanism/render/MechanicalPipeActive.png b/resources/mods/mekanism/render/MechanicalPipeActive.png index 5c9af41e1..0b857941c 100644 Binary files a/resources/mods/mekanism/render/MechanicalPipeActive.png and b/resources/mods/mekanism/render/MechanicalPipeActive.png differ diff --git a/resources/mods/mekanism/render/PressurizedTube.png b/resources/mods/mekanism/render/PressurizedTube.png index f0aebe3a2..91abb23d3 100644 Binary files a/resources/mods/mekanism/render/PressurizedTube.png and b/resources/mods/mekanism/render/PressurizedTube.png differ diff --git a/resources/mods/mekanism/render/UniversalCable.png b/resources/mods/mekanism/render/UniversalCable.png index 9ac7e8092..c8f27a494 100644 Binary files a/resources/mods/mekanism/render/UniversalCable.png and b/resources/mods/mekanism/render/UniversalCable.png differ