diff --git a/common/mekanism/induction/client/InductionClientProxy.java b/common/mekanism/induction/client/InductionClientProxy.java index 93b5629d5..9d402d4a2 100644 --- a/common/mekanism/induction/client/InductionClientProxy.java +++ b/common/mekanism/induction/client/InductionClientProxy.java @@ -5,7 +5,6 @@ import mekanism.induction.client.gui.GuiMultimeter; import mekanism.induction.client.render.BlockRenderingHandler; import mekanism.induction.client.render.RenderBattery; import mekanism.induction.client.render.RenderEMContractor; -import mekanism.induction.client.render.RenderMultimeter; import mekanism.induction.client.render.RenderTesla; import mekanism.induction.common.InductionCommonProxy; import mekanism.induction.common.tileentity.TileEntityBattery; @@ -37,7 +36,6 @@ public class InductionClientProxy extends InductionCommonProxy RenderingRegistry.registerBlockHandler(BlockRenderingHandler.INSTANCE); ClientRegistry.bindTileEntitySpecialRenderer(TileEntityTesla.class, new RenderTesla()); - ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMultimeter.class, new RenderMultimeter()); ClientRegistry.bindTileEntitySpecialRenderer(TileEntityEMContractor.class, new RenderEMContractor()); ClientRegistry.bindTileEntitySpecialRenderer(TileEntityBattery.class, new RenderBattery()); } diff --git a/common/mekanism/induction/client/model/ModelInsulation.java b/common/mekanism/induction/client/model/ModelInsulation.java deleted file mode 100644 index 9fce4b703..000000000 --- a/common/mekanism/induction/client/model/ModelInsulation.java +++ /dev/null @@ -1,454 +0,0 @@ -package mekanism.induction.client.model; - -import net.minecraft.client.model.ModelBase; -import net.minecraft.client.model.ModelRenderer; -import net.minecraft.entity.Entity; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -@SideOnly(Side.CLIENT) -public class ModelInsulation extends ModelBase -{ - // fields - ModelRenderer Middle; - ModelRenderer ToBLeft; - ModelRenderer BoBLeft; - ModelRenderer ToBRight; - ModelRenderer BoBRight; - ModelRenderer BoBFront; - ModelRenderer BoBBack; - ModelRenderer ToBFront; - ModelRenderer ToBBack; - ModelRenderer BoTLeft; - ModelRenderer ToTRight; - ModelRenderer BoTRight; - ModelRenderer BoTFront; - ModelRenderer ToTLeft; - ModelRenderer BoTBack; - ModelRenderer ToTBack; - ModelRenderer ToTFront; - ModelRenderer LoFFront; - ModelRenderer BoFBack; - ModelRenderer RoFFront; - ModelRenderer BoFFront; - ModelRenderer ToFBack; - ModelRenderer ToFFront; - ModelRenderer RoFBack; - ModelRenderer LoFBack; - ModelRenderer BoBackBack; - ModelRenderer ToBackBack; - ModelRenderer RoBackBack; - ModelRenderer RoBackFront; - ModelRenderer LoBackFront; - ModelRenderer BoBackFront; - ModelRenderer ToBackFront; - ModelRenderer LoBackFront2; - ModelRenderer BToRLeft; - ModelRenderer FoRRight; - ModelRenderer ToRLeft; - ModelRenderer BToRRight; - ModelRenderer BoRLeft; - ModelRenderer ToRRight; - ModelRenderer FoRLeft; - ModelRenderer BoRRight; - ModelRenderer BoLRight; - ModelRenderer BToLRight; - ModelRenderer FoLLeft; - ModelRenderer ToLRight; - ModelRenderer FoLRight; - ModelRenderer BoLLeft; - ModelRenderer ToLLeft; - ModelRenderer BToLLeft; - - public ModelInsulation() - { - textureWidth = 128; - textureHeight = 128; - - Middle = new ModelRenderer(this, 0, 0); - Middle.addBox(0F, 0F, 0F, 6, 6, 6); - Middle.setRotationPoint(-3F, 13F, -3F); - Middle.setTextureSize(128, 128); - Middle.mirror = true; - setRotation(Middle, 0F, 0F, 0F); - ToBLeft = new ModelRenderer(this, 25, 0); - ToBLeft.addBox(0F, 0F, 0F, 1, 2, 4); - ToBLeft.setRotationPoint(-3F, 19F, -2F); - ToBLeft.setTextureSize(128, 128); - ToBLeft.mirror = true; - setRotation(ToBLeft, 0F, 0F, 0F); - BoBLeft = new ModelRenderer(this, 25, 0); - BoBLeft.addBox(0F, 0F, 0F, 1, 2, 4); - BoBLeft.setRotationPoint(-3F, 22F, -2F); - BoBLeft.setTextureSize(128, 128); - BoBLeft.mirror = true; - setRotation(BoBLeft, 0F, 0F, 0F); - ToBRight = new ModelRenderer(this, 36, 0); - ToBRight.addBox(0F, 0F, 0F, 1, 2, 4); - ToBRight.setRotationPoint(2F, 19F, -2F); - ToBRight.setTextureSize(128, 128); - ToBRight.mirror = true; - setRotation(ToBRight, 0F, 0F, 0F); - BoBRight = new ModelRenderer(this, 36, 0); - BoBRight.addBox(0F, 0F, 0F, 1, 2, 4); - BoBRight.setRotationPoint(2F, 22F, -2F); - BoBRight.setTextureSize(128, 128); - BoBRight.mirror = true; - setRotation(BoBRight, 0F, 0F, 0F); - BoBFront = new ModelRenderer(this, 25, 7); - BoBFront.addBox(0F, 0F, 0F, 6, 2, 1); - BoBFront.setRotationPoint(-3F, 22F, -3F); - BoBFront.setTextureSize(128, 128); - BoBFront.mirror = true; - setRotation(BoBFront, 0F, 0F, 0F); - BoBBack = new ModelRenderer(this, 40, 7); - BoBBack.addBox(0F, 0F, 0F, 6, 2, 1); - BoBBack.setRotationPoint(-3F, 22F, 2F); - BoBBack.setTextureSize(128, 128); - BoBBack.mirror = true; - setRotation(BoBBack, 0F, 0F, 0F); - ToBFront = new ModelRenderer(this, 25, 7); - ToBFront.addBox(0F, 0F, 0F, 6, 2, 1); - ToBFront.setRotationPoint(-3F, 19F, -3F); - ToBFront.setTextureSize(128, 128); - ToBFront.mirror = true; - setRotation(ToBFront, 0F, 0F, 0F); - ToBBack = new ModelRenderer(this, 40, 7); - ToBBack.addBox(0F, 0F, 0F, 6, 2, 1); - ToBBack.setRotationPoint(-3F, 19F, 2F); - ToBBack.setTextureSize(128, 128); - ToBBack.mirror = true; - setRotation(ToBBack, 0F, 0F, 0F); - BoTLeft = new ModelRenderer(this, 57, 0); - BoTLeft.addBox(0F, 0F, 0F, 1, 2, 4); - BoTLeft.setRotationPoint(-3F, 11F, -2F); - BoTLeft.setTextureSize(128, 128); - BoTLeft.mirror = true; - setRotation(BoTLeft, 0F, 0F, 0F); - ToTRight = new ModelRenderer(this, 68, 0); - ToTRight.addBox(0F, 0F, 0F, 1, 2, 4); - ToTRight.setRotationPoint(2F, 8F, -2F); - ToTRight.setTextureSize(128, 128); - ToTRight.mirror = true; - setRotation(ToTRight, 0F, 0F, 0F); - BoTRight = new ModelRenderer(this, 68, 0); - BoTRight.addBox(0F, 0F, 0F, 1, 2, 4); - BoTRight.setRotationPoint(2F, 11F, -2F); - BoTRight.setTextureSize(128, 128); - BoTRight.mirror = true; - setRotation(BoTRight, 0F, 0F, 0F); - BoTFront = new ModelRenderer(this, 57, 7); - BoTFront.addBox(0F, 0F, 0F, 6, 2, 1); - BoTFront.setRotationPoint(-3F, 11F, -3F); - BoTFront.setTextureSize(128, 128); - BoTFront.mirror = true; - setRotation(BoTFront, 0F, 0F, 0F); - ToTLeft = new ModelRenderer(this, 57, 0); - ToTLeft.addBox(0F, 0F, 0F, 1, 2, 4); - ToTLeft.setRotationPoint(-3F, 8F, -2F); - ToTLeft.setTextureSize(128, 128); - ToTLeft.mirror = true; - setRotation(ToTLeft, 0F, 0F, 0F); - BoTBack = new ModelRenderer(this, 72, 7); - BoTBack.addBox(0F, 0F, 0F, 6, 2, 1); - BoTBack.setRotationPoint(-3F, 11F, 2F); - BoTBack.setTextureSize(128, 128); - BoTBack.mirror = true; - setRotation(BoTBack, 0F, 0F, 0F); - ToTBack = new ModelRenderer(this, 72, 7); - ToTBack.addBox(0F, 0F, 0F, 6, 2, 1); - ToTBack.setRotationPoint(-3F, 8F, 2F); - ToTBack.setTextureSize(128, 128); - ToTBack.mirror = true; - setRotation(ToTBack, 0F, 0F, 0F); - ToTFront = new ModelRenderer(this, 57, 7); - ToTFront.addBox(0F, 0F, 0F, 6, 2, 1); - ToTFront.setRotationPoint(-3F, 8F, -3F); - ToTFront.setTextureSize(128, 128); - ToTFront.mirror = true; - setRotation(ToTFront, 0F, 0F, 0F); - LoFFront = new ModelRenderer(this, 25, 14); - LoFFront.addBox(0F, 0F, 0F, 1, 4, 2); - LoFFront.setRotationPoint(-3F, 14F, -8F); - LoFFront.setTextureSize(128, 128); - LoFFront.mirror = true; - setRotation(LoFFront, 0F, 0F, 0F); - BoFBack = new ModelRenderer(this, 32, 14); - BoFBack.addBox(0F, 0F, 0F, 6, 1, 2); - BoFBack.setRotationPoint(-3F, 18F, -5F); - BoFBack.setTextureSize(128, 128); - BoFBack.mirror = true; - setRotation(BoFBack, 0F, 0F, 0F); - RoFFront = new ModelRenderer(this, 25, 21); - RoFFront.addBox(0F, 0F, 0F, 1, 4, 2); - RoFFront.setRotationPoint(2F, 14F, -8F); - RoFFront.setTextureSize(128, 128); - RoFFront.mirror = true; - setRotation(RoFFront, 0F, 0F, 0F); - BoFFront = new ModelRenderer(this, 32, 14); - BoFFront.addBox(0F, 0F, 0F, 6, 1, 2); - BoFFront.setRotationPoint(-3F, 18F, -8F); - BoFFront.setTextureSize(128, 128); - BoFFront.mirror = true; - setRotation(BoFFront, 0F, 0F, 0F); - ToFBack = new ModelRenderer(this, 32, 18); - ToFBack.addBox(0F, 0F, 0F, 6, 1, 2); - ToFBack.setRotationPoint(-3F, 13F, -5F); - ToFBack.setTextureSize(128, 128); - ToFBack.mirror = true; - setRotation(ToFBack, 0F, 0F, 0F); - ToFFront = new ModelRenderer(this, 32, 18); - ToFFront.addBox(0F, 0F, 0F, 6, 1, 2); - ToFFront.setRotationPoint(-3F, 13F, -8F); - ToFFront.setTextureSize(128, 128); - ToFFront.mirror = true; - setRotation(ToFFront, 0F, 0F, 0F); - RoFBack = new ModelRenderer(this, 25, 21); - RoFBack.addBox(0F, 0F, 0F, 1, 4, 2); - RoFBack.setRotationPoint(2F, 14F, -5F); - RoFBack.setTextureSize(128, 128); - RoFBack.mirror = true; - setRotation(RoFBack, 0F, 0F, 0F); - LoFBack = new ModelRenderer(this, 25, 14); - LoFBack.addBox(0F, 0F, 0F, 1, 4, 2); - LoFBack.setRotationPoint(-3F, 14F, -5F); - LoFBack.setTextureSize(128, 128); - LoFBack.mirror = true; - setRotation(LoFBack, 0F, 0F, 0F); - BoBackBack = new ModelRenderer(this, 57, 14); - BoBackBack.addBox(0F, 0F, 0F, 6, 1, 2); - BoBackBack.setRotationPoint(-3F, 18F, 6F); - BoBackBack.setTextureSize(128, 128); - BoBackBack.mirror = true; - setRotation(BoBackBack, 0F, 0F, 0F); - ToBackBack = new ModelRenderer(this, 57, 18); - ToBackBack.addBox(0F, 0F, 0F, 6, 1, 2); - ToBackBack.setRotationPoint(-3F, 13F, 6F); - ToBackBack.setTextureSize(128, 128); - ToBackBack.mirror = true; - setRotation(ToBackBack, 0F, 0F, 0F); - RoBackBack = new ModelRenderer(this, 74, 14); - RoBackBack.addBox(0F, 0F, 0F, 1, 4, 2); - RoBackBack.setRotationPoint(-3F, 14F, 6F); - RoBackBack.setTextureSize(128, 128); - RoBackBack.mirror = true; - setRotation(RoBackBack, 0F, 0F, 0F); - RoBackFront = new ModelRenderer(this, 74, 14); - RoBackFront.addBox(0F, 0F, 0F, 1, 4, 2); - RoBackFront.setRotationPoint(-3F, 14F, 3F); - RoBackFront.setTextureSize(128, 128); - RoBackFront.mirror = true; - setRotation(RoBackFront, 0F, 0F, 0F); - LoBackFront = new ModelRenderer(this, 74, 21); - LoBackFront.addBox(0F, 0F, 0F, 1, 4, 2); - LoBackFront.setRotationPoint(2F, 14F, 3F); - LoBackFront.setTextureSize(128, 128); - LoBackFront.mirror = true; - setRotation(LoBackFront, 0F, 0F, 0F); - BoBackFront = new ModelRenderer(this, 57, 14); - BoBackFront.addBox(0F, 0F, 0F, 6, 1, 2); - BoBackFront.setRotationPoint(-3F, 18F, 3F); - BoBackFront.setTextureSize(128, 128); - BoBackFront.mirror = true; - setRotation(BoBackFront, 0F, 0F, 0F); - ToBackFront = new ModelRenderer(this, 57, 18); - ToBackFront.addBox(0F, 0F, 0F, 6, 1, 2); - ToBackFront.setRotationPoint(-3F, 13F, 3F); - ToBackFront.setTextureSize(128, 128); - ToBackFront.mirror = true; - setRotation(ToBackFront, 0F, 0F, 0F); - LoBackFront2 = new ModelRenderer(this, 74, 21); - LoBackFront2.addBox(0F, 0F, 0F, 1, 4, 2); - LoBackFront2.setRotationPoint(2F, 14F, 6F); - LoBackFront2.setTextureSize(128, 128); - LoBackFront2.mirror = true; - setRotation(LoBackFront2, 0F, 0F, 0F); - BToRLeft = new ModelRenderer(this, 0, 30); - BToRLeft.addBox(0F, 0F, 0F, 2, 1, 4); - BToRLeft.setRotationPoint(3F, 18F, -2F); - BToRLeft.setTextureSize(128, 128); - BToRLeft.mirror = true; - setRotation(BToRLeft, 0F, 0F, 0F); - FoRRight = new ModelRenderer(this, 0, 22); - FoRRight.addBox(0F, 0F, 0F, 2, 6, 1); - FoRRight.setRotationPoint(6F, 13F, -3F); - FoRRight.setTextureSize(128, 128); - FoRRight.mirror = true; - setRotation(FoRRight, 0F, 0F, 0F); - ToRLeft = new ModelRenderer(this, 0, 36); - ToRLeft.addBox(0F, 0F, 0F, 2, 1, 4); - ToRLeft.setRotationPoint(3F, 13F, -2F); - ToRLeft.setTextureSize(128, 128); - ToRLeft.mirror = true; - setRotation(ToRLeft, 0F, 0F, 0F); - BToRRight = new ModelRenderer(this, 0, 30); - BToRRight.addBox(0F, 0F, 0F, 2, 1, 4); - BToRRight.setRotationPoint(6F, 18F, -2F); - BToRRight.setTextureSize(128, 128); - BToRRight.mirror = true; - setRotation(BToRRight, 0F, 0F, 0F); - BoRLeft = new ModelRenderer(this, 7, 22); - BoRLeft.addBox(0F, 0F, 0F, 2, 6, 1); - BoRLeft.setRotationPoint(3F, 13F, 2F); - BoRLeft.setTextureSize(128, 128); - BoRLeft.mirror = true; - setRotation(BoRLeft, 0F, 0F, 0F); - ToRRight = new ModelRenderer(this, 0, 36); - ToRRight.addBox(0F, 0F, 0F, 2, 1, 4); - ToRRight.setRotationPoint(6F, 13F, -2F); - ToRRight.setTextureSize(128, 128); - ToRRight.mirror = true; - setRotation(ToRRight, 0F, 0F, 0F); - FoRLeft = new ModelRenderer(this, 0, 22); - FoRLeft.addBox(0F, 0F, 0F, 2, 6, 1); - FoRLeft.setRotationPoint(3F, 13F, -3F); - FoRLeft.setTextureSize(128, 128); - FoRLeft.mirror = true; - setRotation(FoRLeft, 0F, 0F, 0F); - BoRRight = new ModelRenderer(this, 7, 22); - BoRRight.addBox(0F, 0F, 0F, 2, 6, 1); - BoRRight.setRotationPoint(6F, 13F, 2F); - BoRRight.setTextureSize(128, 128); - BoRRight.mirror = true; - setRotation(BoRRight, 0F, 0F, 0F); - BoLRight = new ModelRenderer(this, 0, 45); - BoLRight.addBox(0F, 0F, 0F, 2, 6, 1); - BoLRight.setRotationPoint(-5F, 13F, 2F); - BoLRight.setTextureSize(128, 128); - BoLRight.mirror = true; - setRotation(BoLRight, 0F, 0F, 0F); - BToLRight = new ModelRenderer(this, 0, 53); - BToLRight.addBox(0F, 0F, 0F, 2, 1, 4); - BToLRight.setRotationPoint(-5F, 18F, -2F); - BToLRight.setTextureSize(128, 128); - BToLRight.mirror = true; - setRotation(BToLRight, 0F, 0F, 0F); - FoLLeft = new ModelRenderer(this, 7, 45); - FoLLeft.addBox(0F, 0F, 0F, 2, 6, 1); - FoLLeft.setRotationPoint(-8F, 13F, -3F); - FoLLeft.setTextureSize(128, 128); - FoLLeft.mirror = true; - setRotation(FoLLeft, 0F, 0F, 0F); - ToLRight = new ModelRenderer(this, 0, 59); - ToLRight.addBox(0F, 0F, 0F, 2, 1, 4); - ToLRight.setRotationPoint(-5F, 13F, -2F); - ToLRight.setTextureSize(128, 128); - ToLRight.mirror = true; - setRotation(ToLRight, 0F, 0F, 0F); - FoLRight = new ModelRenderer(this, 7, 45); - FoLRight.addBox(0F, 0F, 0F, 2, 6, 1); - FoLRight.setRotationPoint(-5F, 13F, -3F); - FoLRight.setTextureSize(128, 128); - FoLRight.mirror = true; - setRotation(FoLRight, 0F, 0F, 0F); - BoLLeft = new ModelRenderer(this, 0, 45); - BoLLeft.addBox(0F, 0F, 0F, 2, 6, 1); - BoLLeft.setRotationPoint(-8F, 13F, 2F); - BoLLeft.setTextureSize(128, 128); - BoLLeft.mirror = true; - setRotation(BoLLeft, 0F, 0F, 0F); - ToLLeft = new ModelRenderer(this, 0, 59); - ToLLeft.addBox(0F, 0F, 0F, 2, 1, 4); - ToLLeft.setRotationPoint(-8F, 13F, -2F); - ToLLeft.setTextureSize(128, 128); - ToLLeft.mirror = true; - setRotation(ToLLeft, 0F, 0F, 0F); - BToLLeft = new ModelRenderer(this, 0, 53); - BToLLeft.addBox(0F, 0F, 0F, 2, 1, 4); - BToLLeft.setRotationPoint(-8F, 18F, -2F); - BToLLeft.setTextureSize(128, 128); - BToLLeft.mirror = true; - setRotation(BToLLeft, 0F, 0F, 0F); - } - - public void renderMiddle(float f5) - { - Middle.render(f5); - } - - public void renderBottom(float f5) - { - ToBLeft.render(f5); - BoBLeft.render(f5); - ToBRight.render(f5); - BoBRight.render(f5); - BoBFront.render(f5); - BoBBack.render(f5); - ToBFront.render(f5); - ToBBack.render(f5); - } - - public void renderTop(float f5) - { - BoTLeft.render(f5); - ToTRight.render(f5); - BoTRight.render(f5); - BoTFront.render(f5); - ToTLeft.render(f5); - BoTBack.render(f5); - ToTBack.render(f5); - ToTFront.render(f5); - } - - public void renderLeft(float f5) - { - BoLRight.render(f5); - BToLRight.render(f5); - FoLLeft.render(f5); - ToLRight.render(f5); - FoLRight.render(f5); - BoLLeft.render(f5); - ToLLeft.render(f5); - BToLLeft.render(f5); - } - - public void renderRight(float f5) - { - BToRLeft.render(f5); - FoRRight.render(f5); - ToRLeft.render(f5); - BToRRight.render(f5); - BoRLeft.render(f5); - ToRRight.render(f5); - FoRLeft.render(f5); - BoRRight.render(f5); - } - - public void renderBack(float f5) - { - BoBackBack.render(f5); - ToBackBack.render(f5); - RoBackBack.render(f5); - RoBackFront.render(f5); - LoBackFront.render(f5); - BoBackFront.render(f5); - ToBackFront.render(f5); - LoBackFront2.render(f5); - } - - public void renderFront(float f5) - { - LoFFront.render(f5); - BoFBack.render(f5); - RoFFront.render(f5); - BoFFront.render(f5); - ToFBack.render(f5); - ToFFront.render(f5); - RoFBack.render(f5); - LoFBack.render(f5); - - } - - private void setRotation(ModelRenderer model, float x, float y, float z) - { - model.rotateAngleX = x; - model.rotateAngleY = y; - model.rotateAngleZ = z; - } - - @Override - public void setRotationAngles(float x, float y, float z, float f3, float f4, float f5, Entity entity) - { - super.setRotationAngles(x, y, z, f3, f4, f5, entity); - } -} diff --git a/common/mekanism/induction/client/model/ModelMultimeter.java b/common/mekanism/induction/client/model/ModelMultimeter.java deleted file mode 100644 index eba0efc95..000000000 --- a/common/mekanism/induction/client/model/ModelMultimeter.java +++ /dev/null @@ -1,74 +0,0 @@ -package mekanism.induction.client.model; - -import net.minecraft.client.model.ModelBase; -import net.minecraft.client.model.ModelRenderer; - -public class ModelMultimeter extends ModelBase -{ - ModelRenderer Base; - ModelRenderer secPanel; - ModelRenderer arm; - ModelRenderer button; - ModelRenderer arm2; - ModelRenderer infopanel; - - public ModelMultimeter() - { - textureWidth = 128; - textureHeight = 128; - - Base = new ModelRenderer(this, 0, 0); - Base.addBox(0F, 0F, 0F, 14, 14, 1); - Base.setRotationPoint(-7F, 9F, 7F); - Base.setTextureSize(128, 128); - Base.mirror = true; - setRotation(Base, 0F, 0F, 0F); - secPanel = new ModelRenderer(this, 0, 18); - secPanel.addBox(0F, 0F, 0F, 4, 8, 1); - secPanel.setRotationPoint(-6F, 10F, 6F); - secPanel.setTextureSize(128, 128); - secPanel.mirror = true; - setRotation(secPanel, 0F, 0F, 0F); - arm = new ModelRenderer(this, 0, 29); - arm.addBox(0F, 0F, 0F, 1, 9, 2); - arm.setRotationPoint(-3.5F, 13F, 5.5F); - arm.setTextureSize(128, 128); - arm.mirror = true; - setRotation(arm, 0F, 0F, 0F); - button = new ModelRenderer(this, 0, 43); - button.addBox(0F, 0F, 0F, 2, 1, 1); - button.setRotationPoint(-5F, 11F, 5.5F); - button.setTextureSize(128, 128); - button.mirror = true; - setRotation(button, 0F, 0F, 0F); - arm2 = new ModelRenderer(this, 10, 29); - arm2.addBox(0F, 0F, 0F, 1, 9, 2); - arm2.setRotationPoint(-5.5F, 13F, 5.5F); - arm2.setTextureSize(128, 128); - arm2.mirror = true; - setRotation(arm2, 0F, 0F, 0F); - infopanel = new ModelRenderer(this, 33, 0); - infopanel.addBox(0F, 0F, 0F, 7, 12, 1); - infopanel.setRotationPoint(-1F, 10F, 6.5F); - infopanel.setTextureSize(128, 128); - infopanel.mirror = true; - setRotation(infopanel, 0F, 0F, 0F); - } - - public void render(float size) - { - Base.render(size); - secPanel.render(size); - arm.render(size); - button.render(size); - arm2.render(size); - infopanel.render(size); - } - - private void setRotation(ModelRenderer model, float x, float y, float z) - { - model.rotateAngleX = x; - model.rotateAngleY = y; - model.rotateAngleZ = z; - } -} diff --git a/common/mekanism/induction/client/model/ModelWire.java b/common/mekanism/induction/client/model/ModelWire.java deleted file mode 100644 index 625d6062f..000000000 --- a/common/mekanism/induction/client/model/ModelWire.java +++ /dev/null @@ -1,130 +0,0 @@ -package mekanism.induction.client.model; - -import net.minecraft.client.model.ModelBase; -import net.minecraft.client.model.ModelRenderer; -import net.minecraft.entity.Entity; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -@SideOnly(Side.CLIENT) -public class ModelWire extends ModelBase -{ - // fields - ModelRenderer Middle; - ModelRenderer Right; - ModelRenderer Left; - ModelRenderer Back; - ModelRenderer Front; - ModelRenderer Top; - ModelRenderer Bottom; - - public ModelWire() - { - textureWidth = 64; - textureHeight = 32; - Middle = new ModelRenderer(this, 0, 0); - Middle.addBox(-1F, -1F, -1F, 4, 4, 4); - Middle.setRotationPoint(-1F, 15F, -1F); - Middle.setTextureSize(64, 32); - Middle.mirror = true; - setRotation(Middle, 0F, 0F, 0F); - Right = new ModelRenderer(this, 21, 0); - Right.addBox(0F, 0F, 0F, 6, 4, 4); - Right.setRotationPoint(2F, 14F, -2F); - Right.setTextureSize(64, 32); - Right.mirror = true; - setRotation(Right, 0F, 0F, 0F); - Left = new ModelRenderer(this, 21, 0); - Left.addBox(0F, 0F, 0F, 6, 4, 4); - Left.setRotationPoint(-8F, 14F, -2F); - Left.setTextureSize(64, 32); - Left.mirror = true; - setRotation(Left, 0F, 0F, 0F); - Back = new ModelRenderer(this, 0, 11); - Back.addBox(0F, 0F, 0F, 4, 4, 6); - Back.setRotationPoint(-2F, 14F, 2F); - Back.setTextureSize(64, 32); - Back.mirror = true; - setRotation(Back, 0F, 0F, 0F); - Front = new ModelRenderer(this, 0, 11); - Front.addBox(0F, 0F, 0F, 4, 4, 6); - Front.setRotationPoint(-2F, 14F, -8F); - Front.setTextureSize(64, 32); - Front.mirror = true; - setRotation(Front, 0F, 0F, 0F); - Top = new ModelRenderer(this, 21, 11); - Top.addBox(0F, 0F, 0F, 4, 6, 4); - Top.setRotationPoint(-2F, 8F, -2F); - Top.setTextureSize(64, 32); - Top.mirror = true; - setRotation(Top, 0F, 0F, 0F); - Bottom = new ModelRenderer(this, 21, 11); - Bottom.addBox(0F, 0F, 0F, 4, 6, 4); - Bottom.setRotationPoint(-2F, 18F, -2F); - Bottom.setTextureSize(64, 32); - Bottom.mirror = true; - setRotation(Bottom, 0F, 0F, 0F); - } - - @Override - public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) - { - super.render(entity, f, f1, f2, f3, f4, f5); - this.setRotationAngles(f, f1, f2, f3, f4, f5, entity); - this.renderMiddle(); - this.renderBottom(); - this.renderTop(); - this.renderLeft(); - this.renderRight(); - this.renderBack(); - this.renderFront(); - } - - public void renderMiddle() - { - Middle.render(0.0625F); - } - - public void renderBottom() - { - Bottom.render(0.0625F); - } - - public void renderTop() - { - Top.render(0.0625F); - } - - public void renderLeft() - { - Left.render(0.0625F); - } - - public void renderRight() - { - Right.render(0.0625F); - } - - public void renderBack() - { - Back.render(0.0625F); - } - - public void renderFront() - { - Front.render(0.0625F); - } - - private void setRotation(ModelRenderer model, float x, float y, float z) - { - model.rotateAngleX = x; - model.rotateAngleY = y; - model.rotateAngleZ = z; - } - - @Override - public void setRotationAngles(float x, float y, float z, float f3, float f4, float f5, Entity entity) - { - super.setRotationAngles(x, y, z, f3, f4, f5, entity); - } -} diff --git a/common/mekanism/induction/client/render/BlockRenderingHandler.java b/common/mekanism/induction/client/render/BlockRenderingHandler.java index 991b718c8..32ece0baa 100644 --- a/common/mekanism/induction/client/render/BlockRenderingHandler.java +++ b/common/mekanism/induction/client/render/BlockRenderingHandler.java @@ -8,7 +8,6 @@ import mekanism.common.util.MekanismUtils.ResourceType; import mekanism.induction.client.InductionClientProxy; import mekanism.induction.common.block.BlockBattery; import mekanism.induction.common.block.BlockEMContractor; -import mekanism.induction.common.block.BlockMultimeter; import mekanism.induction.common.block.BlockTesla; import net.minecraft.block.Block; import net.minecraft.client.Minecraft; @@ -60,15 +59,6 @@ public class BlockRenderingHandler implements ISimpleBlockRenderingHandler RenderBattery.model.render(0.0625f); GL11.glPopMatrix(); } - else if(block instanceof BlockMultimeter) - { - GL11.glPushMatrix(); - GL11.glRotatef(180, 0, 1, 0); - GL11.glTranslated(0, -1, -0.7); - Minecraft.getMinecraft().renderEngine.bindTexture(MekanismUtils.getResource(ResourceType.RENDER, "Multimeter.png")); - RenderMultimeter.model.render(0.0625f); - GL11.glPopMatrix(); - } } @Override diff --git a/common/mekanism/induction/client/render/RenderMultimeter.java b/common/mekanism/induction/client/render/RenderMultimeter.java deleted file mode 100644 index a75429743..000000000 --- a/common/mekanism/induction/client/render/RenderMultimeter.java +++ /dev/null @@ -1,160 +0,0 @@ -package mekanism.induction.client.render; - -import mekanism.common.util.MekanismUtils; -import mekanism.common.util.MekanismUtils.ResourceType; -import mekanism.induction.client.model.ModelMultimeter; -import mekanism.induction.common.MekanismInduction; -import mekanism.induction.common.tileentity.TileEntityMultimeter; -import net.minecraft.client.gui.FontRenderer; -import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.ResourceLocation; -import net.minecraftforge.common.ForgeDirection; - -import org.lwjgl.opengl.GL11; - -import universalelectricity.core.electricity.ElectricityDisplay; -import universalelectricity.core.electricity.ElectricityDisplay.ElectricUnit; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -/** - * Class used to render text onto the multimeter block. - * - * @author Calclavia - * - */ -@SideOnly(Side.CLIENT) -public class RenderMultimeter extends TileEntitySpecialRenderer -{ - public static final ModelMultimeter model = new ModelMultimeter(); - - @Override - @SuppressWarnings("incomplete-switch") - public void renderTileEntityAt(TileEntity t, double x, double y, double z, float var8) - { - TileEntityMultimeter tileEntity = (TileEntityMultimeter) t; - ForgeDirection direction = ForgeDirection.getOrientation(tileEntity.worldObj.getBlockMetadata(tileEntity.xCoord, tileEntity.yCoord, tileEntity.zCoord)); - - GL11.glPushMatrix(); - GL11.glTranslated(x + 0.5, y + 0.5, z + 0.5); - GL11.glRotatef(90, 0, 0, 1); - GL11.glTranslated(0, -1, 0); - - switch(direction) - { - case UP: - GL11.glRotatef(90, 0, 1, 0); - break; - case DOWN: - GL11.glRotatef(-90, 0, 1, 0); - break; - case NORTH: - GL11.glRotatef(180, 0, 1, 0); - GL11.glRotatef(180, 0, 0, 1); - GL11.glTranslatef(0, -2, 0); - break; - case SOUTH: - break; - case WEST: - GL11.glTranslatef(0, 1, 1); - GL11.glRotatef(-90, 1, 0, 0); - break; - case EAST: - GL11.glTranslatef(0, 1, -1); - GL11.glRotatef(90, 1, 0, 0); - break; - } - - this.bindTexture(MekanismUtils.getResource(ResourceType.RENDER, "Multimeter.png")); - model.render(0.0625f); - - GL11.glPopMatrix(); - - GL11.glPushMatrix(); - GL11.glPolygonOffset(-10, -10); - GL11.glEnable(GL11.GL_POLYGON_OFFSET_FILL); - - float dx = 1F / 16; - float dz = 1F / 16; - float displayWidth = 1 - 2F / 16; - float displayHeight = 1 - 2F / 16; - GL11.glTranslatef((float) x, (float) y, (float) z); - - switch (direction) - { - case UP: - GL11.glTranslatef(1, 1, 0); - GL11.glRotatef(180, 1, 0, 0); - GL11.glRotatef(180, 0, 1, 0); - GL11.glTranslatef(0, -0.9f, -0.1f); - break; - case DOWN: - GL11.glRotatef(180, 0, 1, 0); - GL11.glTranslatef(-1, -0.9f, -1.1f); - break; - case SOUTH: - GL11.glTranslatef(1, 1, 1); - GL11.glRotatef(180, 0, 1, 0); - GL11.glRotatef(90, 1, 0, 0); - GL11.glTranslatef(0, -0.9f, -0.1f); - break; - case NORTH: - GL11.glTranslatef(0, 1, 0); - GL11.glRotatef(0, 0, 1, 0); - GL11.glRotatef(90, 1, 0, 0); - GL11.glTranslatef(0, -0.9f, -0.1f); - break; - case EAST: - GL11.glTranslatef(1, 1, 0); - GL11.glRotatef(-90, 0, 1, 0); - GL11.glRotatef(90, 1, 0, 0); - GL11.glTranslatef(0, -0.9f, -0.1f); - break; - case WEST: - GL11.glTranslatef(0, 1, 1); - GL11.glRotatef(90, 0, 1, 0); - GL11.glRotatef(90, 1, 0, 0); - GL11.glTranslatef(0, -0.9f, -0.1f); - break; - } - - GL11.glTranslatef(dx + displayWidth / 2, 1F, dz + displayHeight / 2); - GL11.glRotatef(-90, 1, 0, 0); - GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); - - FontRenderer fontRenderer = this.getFontRenderer(); - - String joules = ElectricityDisplay.getDisplayShort(tileEntity.getDetectedEnergy(), ElectricUnit.JOULES); - - int stringWidth = Math.max(fontRenderer.getStringWidth(joules), 0); - // maxWidth += 8; - int lineHeight = fontRenderer.FONT_HEIGHT + 2; - int requiredHeight = lineHeight * 1; - - /** - * Create an average scale. - */ - float scaleX = displayWidth / stringWidth; - float scaleY = displayHeight / requiredHeight; - float scale = (float) (Math.min(scaleX, scaleY) * 0.8); - GL11.glScalef(scale, -scale, scale); - GL11.glDepthMask(false); - - int realHeight = (int) Math.floor(displayHeight / scale); - int realWidth = (int) Math.floor(displayWidth / scale); - - int offsetY = (realHeight - requiredHeight) / 2; - int offsetX = (realWidth - stringWidth) / 2; - - GL11.glDisable(GL11.GL_LIGHTING); - fontRenderer.drawString(joules, offsetX - realWidth / 2, 1 + offsetY - realHeight / 2 + 0 * lineHeight, 1); - - GL11.glEnable(GL11.GL_LIGHTING); - GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); - GL11.glDepthMask(true); - GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); - GL11.glDisable(GL11.GL_POLYGON_OFFSET_FILL); - GL11.glPopMatrix(); - } -} \ No newline at end of file diff --git a/common/mekanism/induction/common/MekanismInduction.java b/common/mekanism/induction/common/MekanismInduction.java index 709b44726..53ddaf645 100644 --- a/common/mekanism/induction/common/MekanismInduction.java +++ b/common/mekanism/induction/common/MekanismInduction.java @@ -8,7 +8,6 @@ import mekanism.common.Version; import mekanism.common.util.MekanismUtils; import mekanism.induction.common.block.BlockBattery; import mekanism.induction.common.block.BlockEMContractor; -import mekanism.induction.common.block.BlockMultimeter; import mekanism.induction.common.block.BlockTesla; import mekanism.induction.common.item.ItemBlockContractor; import mekanism.induction.common.item.ItemBlockMultimeter; @@ -71,7 +70,6 @@ public class MekanismInduction implements IModule //Blocks public static Block Tesla; - public static Block Multimeter; public static Block ElectromagneticContractor; public static Block Battery; @@ -85,12 +83,10 @@ public class MekanismInduction implements IModule //Blocks Tesla = new BlockTesla(Mekanism.configuration.getBlock("Tesla", getNextBlockID()).getInt()).setUnlocalizedName("Tesla"); - Multimeter = new BlockMultimeter(Mekanism.configuration.getBlock("Multimeter", getNextBlockID()).getInt()).setUnlocalizedName("Multimeter"); ElectromagneticContractor = new BlockEMContractor(Mekanism.configuration.getBlock("ElectromagneticContractor", getNextBlockID()).getInt()).setUnlocalizedName("ElectromagneticContractor"); Battery = new BlockBattery(Mekanism.configuration.getBlock("Battery", getNextBlockID()).getInt()).setUnlocalizedName("Battery"); GameRegistry.registerBlock(Tesla, "Tesla"); - GameRegistry.registerBlock(Multimeter, ItemBlockMultimeter.class, "Multimeter"); GameRegistry.registerBlock(ElectromagneticContractor, ItemBlockContractor.class, "ElectromagneticContractor"); GameRegistry.registerBlock(Battery, "Battery"); @@ -113,16 +109,8 @@ public class MekanismInduction implements IModule @EventHandler public void postInit(FMLPostInitializationEvent evt) { - /** Tesla - by Jyzarc */ GameRegistry.addRecipe(new MekanismRecipe(new ItemStack(Tesla), new Object[] { "WEW", " C ", " I ", 'W', Mekanism.EnrichedAlloy, 'E', Item.eyeOfEnder, 'C', Mekanism.EnergyTablet.getUnchargedItem(), 'I', new ItemStack(Mekanism.BasicBlock, 1, 8) })); - - /** Multimeter */ - GameRegistry.addRecipe(new MekanismRecipe(new ItemStack(Multimeter), new Object[] { "WWW", "ICI", 'W', Mekanism.EnrichedAlloy, 'C', "battery", 'I', "ingotSteel" })); - - /** Battery */ GameRegistry.addRecipe(new MekanismRecipe(new ItemStack(Battery, 4), new Object[] { "RRR", "CIC", "RRR", 'R', Item.redstone, 'I', MekanismUtils.getEnergyCube(EnergyCubeTier.BASIC), 'C', "circuitBasic" })); - - /** EM Contractor */ GameRegistry.addRecipe(new MekanismRecipe(new ItemStack(ElectromagneticContractor), new Object[] { " I ", "GCG", "WWW", 'W', "ingotSteel", 'C', Mekanism.EnergyTablet.getUnchargedItem(), 'G', "ingotOsmium", 'I', "ingotSteel" })); } diff --git a/common/mekanism/induction/common/block/BlockMultimeter.java b/common/mekanism/induction/common/block/BlockMultimeter.java deleted file mode 100644 index 73bbf7073..000000000 --- a/common/mekanism/induction/common/block/BlockMultimeter.java +++ /dev/null @@ -1,154 +0,0 @@ -/** - * - */ -package mekanism.induction.common.block; - -import mekanism.common.Mekanism; -import mekanism.induction.client.render.BlockRenderingHandler; -import mekanism.induction.common.MekanismInduction; -import mekanism.induction.common.tileentity.TileEntityMultimeter; -import net.minecraft.block.Block; -import net.minecraft.block.ITileEntityProvider; -import net.minecraft.block.material.Material; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.AxisAlignedBB; -import net.minecraft.util.MovingObjectPosition; -import net.minecraft.util.Vec3; -import net.minecraft.world.IBlockAccess; -import net.minecraft.world.World; -import net.minecraftforge.common.ForgeDirection; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -/** - * A block that detects power. - * - * @author Calclavia - * - */ -public class BlockMultimeter extends Block implements ITileEntityProvider -{ - public BlockMultimeter(int id) - { - super(id, Material.piston); - this.setTextureName("mekanism:machine"); - this.setCreativeTab(Mekanism.tabMekanism); - setHardness(5F); - setResistance(10F); - } - - @Override - public AxisAlignedBB getCollisionBoundingBoxFromPool(World par1World, int par2, int par3, int par4) - { - return null; - } - - @Override - public MovingObjectPosition collisionRayTrace(World par1World, int par2, int par3, int par4, Vec3 par5Vec3, Vec3 par6Vec3) - { - int metadata = par1World.getBlockMetadata(par2, par3, par4) & 7; - float thickness = 0.15f; - - if (metadata == 0) - { - this.setBlockBounds(0, 0, 0, 1, thickness, 1); - } - else if (metadata == 1) - { - this.setBlockBounds(0, 1 - thickness, 0, 1, 1, 1); - } - else if (metadata == 2) - { - this.setBlockBounds(0, 0, 0, 1, 1, thickness); - } - else if (metadata == 3) - { - this.setBlockBounds(0, 0, 1 - thickness, 1, 1, 1); - } - else if (metadata == 4) - { - this.setBlockBounds(0, 0, 0, thickness, 1, 1); - } - else if (metadata == 5) - { - this.setBlockBounds(1 - thickness, 0, 0, 1, 1, 1); - } - - return super.collisionRayTrace(par1World, par2, par3, par4, par5Vec3, par6Vec3); - } - - /** - * Called when a block is placed using its ItemBlock. Args: World, X, Y, Z, side, hitX, hitY, - * hi@OverridetZ, block metadata - */ - @Override - public int onBlockPlaced(World par1World, int par2, int par3, int par4, int side, float hitX, float hitY, float hitZ, int metadata) - { - return ForgeDirection.getOrientation(side).getOpposite().ordinal(); - } - - @Override - public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer entityPlayer, int side, float par7, float par8, float par9) - { - if (entityPlayer.isSneaking()) - { - world.setBlockMetadataWithNotify(x, y, z, ForgeDirection.ROTATION_MATRIX[world.getBlockMetadata(x, y, z)][side], 3); - } - else - { - entityPlayer.openGui(MekanismInduction.instance, 0, world, x, y, z); - } - - return true; - } - - @Override - public int isProvidingStrongPower(IBlockAccess blockAccess, int x, int y, int z, int par5) - { - return this.isProvidingWeakPower(blockAccess, x, y, z, par5); - } - - @Override - public int isProvidingWeakPower(IBlockAccess blockAccess, int x, int y, int z, int par5) - { - TileEntity tile = blockAccess.getBlockTileEntity(x, y, z); - - if (tile instanceof TileEntityMultimeter) - { - return ((TileEntityMultimeter) tile).redstoneOn ? 14 : 0; - } - return 0; - } - - @Override - public boolean canProvidePower() - { - return true; - } - - @SideOnly(Side.CLIENT) - @Override - public int getRenderType() - { - return BlockRenderingHandler.INSTANCE.getRenderId(); - } - - @Override - public boolean renderAsNormalBlock() - { - return false; - } - - @Override - public boolean isOpaqueCube() - { - return false; - } - - @Override - public TileEntity createNewTileEntity(World world) - { - return new TileEntityMultimeter(); - } -}