New and fixed models! Energy Cubes look awesome.

This commit is contained in:
aidancbrady 2016-04-16 17:14:02 -04:00
parent d4c2ce36e9
commit 7387f15b64
19 changed files with 779 additions and 377 deletions

View file

@ -55,11 +55,11 @@ public class ModelChemicalInfuser extends ModelBase
tank2.setRotationPoint(1F, 8F, 1F);
tank2.setTextureSize(128, 64);
setRotation(tank2, 0F, 0F, 0F);
portRight = new ModelRenderer(this, 64, 0);
portRight.mirror = true;
portRight.addBox(0F, 0F, 0F, 1, 10, 10);
portRight.setRotationPoint(7.01F, 11F, -5F);
portRight = new ModelRenderer(this, 0, 38);
portRight.addBox(0F, 0F, 0F, 1, 8, 8);
portRight.setRotationPoint(7.01F, 12F, -4F);
portRight.setTextureSize(128, 64);
portRight.mirror = true;
setRotation(portRight, 0F, 0F, 0F);
portBack = new ModelRenderer(this, 0, 54);
portBack.addBox(0F, 0F, 0F, 8, 8, 1);
@ -67,9 +67,9 @@ public class ModelChemicalInfuser extends ModelBase
portBack.setTextureSize(128, 64);
portBack.mirror = true;
setRotation(portBack, 0F, 0F, 0F);
portLeft = new ModelRenderer(this, 64, 0);
portLeft.addBox(0F, 0F, 0F, 1, 10, 10);
portLeft.setRotationPoint(-8.01F, 11F, -5F);
portLeft = new ModelRenderer(this, 0, 38);
portLeft.addBox(0F, 0F, 0F, 1, 8, 8);
portLeft.setRotationPoint(-8.01F, 12F, -4F);
portLeft.setTextureSize(128, 64);
portLeft.mirror = true;
setRotation(portLeft, 0F, 0F, 0F);

View file

@ -1,195 +1,517 @@
package mekanism.client.model;
import mekanism.client.render.MekanismRenderer;
import mekanism.common.SideData.IOState;
import mekanism.common.util.MekanismUtils;
import mekanism.common.util.MekanismUtils.ResourceType;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.client.renderer.texture.TextureManager;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.common.util.ForgeDirection;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
@SideOnly(Side.CLIENT)
public class ModelEnergyCube extends ModelBase
{
ModelRenderer Corner1;
ModelRenderer Corner2;
ModelRenderer Corner3;
ModelRenderer Corner4;
ModelRenderer Corner5;
ModelRenderer Corner6;
ModelRenderer Corner7;
ModelRenderer Corner8;
ModelRenderer Frame4;
ModelRenderer Frame3;
ModelRenderer Frame2;
ModelRenderer Frame1;
ModelRenderer Connection;
ModelRenderer HoriPole1;
ModelRenderer HoriPole2;
ModelRenderer HoriPole3;
ModelRenderer HoriPole4;
ModelRenderer HoriPole5;
ModelRenderer HoriPole6;
ModelRenderer HoriPole7;
ModelRenderer HoriPole8;
public static ResourceLocation LED_ON = MekanismUtils.getResource(ResourceType.RENDER, "EnergyCube_On.png");
public static ResourceLocation LED_OFF = MekanismUtils.getResource(ResourceType.RENDER, "EnergyCube_Off.png");
ModelRenderer frame12;
ModelRenderer frame11;
ModelRenderer frame10;
ModelRenderer frame9;
ModelRenderer frame8;
ModelRenderer frame7;
ModelRenderer frame6;
ModelRenderer frame5;
ModelRenderer frame4;
ModelRenderer frame3;
ModelRenderer frame2;
ModelRenderer frame1;
ModelRenderer corner8;
ModelRenderer corner7;
ModelRenderer corner6;
ModelRenderer corner5;
ModelRenderer corner4;
ModelRenderer corner3;
ModelRenderer corner2;
ModelRenderer corner1;
ModelRenderer connectorBackToggle;
ModelRenderer connectorRightToggle;
ModelRenderer connectorBottomToggle;
ModelRenderer connectorLeftToggle;
ModelRenderer connectorFrontToggle;
ModelRenderer connectorTopToggle;
ModelRenderer portBackToggle;
ModelRenderer portBottomToggle;
ModelRenderer portFrontToggle;
ModelRenderer portLeftToggle;
ModelRenderer portRightToggle;
ModelRenderer portTopToggle;
ModelRenderer ledTop1;
ModelRenderer ledTop2;
ModelRenderer ledBack1;
ModelRenderer ledBack2;
ModelRenderer ledBottom2;
ModelRenderer ledBottom1;
ModelRenderer ledFront1;
ModelRenderer ledFront2;
ModelRenderer ledRight2;
ModelRenderer ledRight1;
ModelRenderer ledLeft1;
ModelRenderer ledLeft2;
public ModelEnergyCube()
public ModelEnergyCube()
{
textureWidth = 64;
textureHeight = 64;
Corner1 = new ModelRenderer(this, 0, 17);
Corner1.addBox(0F, 0F, 0F, 3, 3, 3);
Corner1.setRotationPoint(5F, 21F, -8F);
Corner1.setTextureSize(64, 64);
Corner1.mirror = true;
setRotation(Corner1, 0F, 0F, 0F);
Corner2 = new ModelRenderer(this, 0, 17);
Corner2.addBox(0F, 0F, 0F, 3, 3, 3);
Corner2.setRotationPoint(-8F, 21F, -8F);
Corner2.setTextureSize(64, 64);
Corner2.mirror = true;
setRotation(Corner2, 0F, 0F, 0F);
Corner3 = new ModelRenderer(this, 0, 17);
Corner3.addBox(0F, 0F, 0F, 3, 3, 3);
Corner3.setRotationPoint(5F, 21F, 5F);
Corner3.setTextureSize(64, 64);
Corner3.mirror = true;
setRotation(Corner3, 0F, 0F, 0F);
Corner4 = new ModelRenderer(this, 0, 17);
Corner4.addBox(0F, 0F, 0F, 3, 3, 3);
Corner4.setRotationPoint(-8F, 21F, 5F);
Corner4.setTextureSize(64, 64);
Corner4.mirror = true;
setRotation(Corner4, 0F, 0F, 0F);
Corner5 = new ModelRenderer(this, 0, 17);
Corner5.addBox(0F, 0F, 0F, 3, 3, 3);
Corner5.setRotationPoint(5F, 8F, -8F);
Corner5.setTextureSize(64, 64);
Corner5.mirror = true;
setRotation(Corner5, 0F, 0F, 0F);
Corner6 = new ModelRenderer(this, 0, 17);
Corner6.addBox(0F, 0F, 0F, 3, 3, 3);
Corner6.setRotationPoint(-8F, 8F, -8F);
Corner6.setTextureSize(64, 64);
Corner6.mirror = true;
setRotation(Corner6, 0F, 0F, 0F);
Corner7 = new ModelRenderer(this, 0, 17);
Corner7.addBox(0F, 0F, 0F, 3, 3, 3);
Corner7.setRotationPoint(-8F, 8F, 5F);
Corner7.setTextureSize(64, 64);
Corner7.mirror = true;
setRotation(Corner7, 0F, 0F, 0F);
Corner8 = new ModelRenderer(this, 0, 17);
Corner8.addBox(0F, 0F, 0F, 3, 3, 3);
Corner8.setRotationPoint(5F, 8F, 5F);
Corner8.setTextureSize(64, 64);
Corner8.mirror = true;
setRotation(Corner8, 0F, 0F, 0F);
Frame4 = new ModelRenderer(this, 0, 24);
Frame4.addBox(0F, 0F, 0F, 3, 10, 3);
Frame4.setRotationPoint(5F, 11F, -8F);
Frame4.setTextureSize(64, 64);
Frame4.mirror = true;
setRotation(Frame4, 0F, 0F, 0F);
Frame3 = new ModelRenderer(this, 0, 24);
Frame3.addBox(0F, 0F, 0F, 3, 10, 3);
Frame3.setRotationPoint(-8F, 11F, -8F);
Frame3.setTextureSize(64, 64);
Frame3.mirror = true;
setRotation(Frame3, 0F, 0F, 0F);
Frame2 = new ModelRenderer(this, 0, 24);
Frame2.addBox(0F, 0F, 0F, 3, 10, 3);
Frame2.setRotationPoint(-8F, 11F, 5F);
Frame2.setTextureSize(64, 64);
Frame2.mirror = true;
setRotation(Frame2, 0F, 0F, 0F);
Frame1 = new ModelRenderer(this, 0, 24);
Frame1.addBox(0F, 0F, 0F, 3, 10, 3);
Frame1.setRotationPoint(5F, 11F, 5F);
Frame1.setTextureSize(64, 64);
Frame1.mirror = true;
setRotation(Frame1, 0F, 0F, 0F);
Connection = new ModelRenderer(this, 0, 7);
Connection.addBox(0F, 0F, 0F, 10, 6, 1);
Connection.setRotationPoint(-5F, 13F, -8F);
Connection.setTextureSize(64, 64);
Connection.mirror = true;
setRotation(Connection, 0F, 0F, 0F);
HoriPole1 = new ModelRenderer(this, 27, 0);
HoriPole1.addBox(0F, 0F, 0F, 3, 3, 10);
HoriPole1.setRotationPoint(5F, 21F, -5F);
HoriPole1.setTextureSize(64, 64);
HoriPole1.mirror = true;
setRotation(HoriPole1, 0F, 0F, 0F);
HoriPole2 = new ModelRenderer(this, 0, 0);
HoriPole2.addBox(0F, 0F, 0F, 10, 3, 3);
HoriPole2.setRotationPoint(-5F, 21F, 5F);
HoriPole2.setTextureSize(64, 64);
HoriPole2.mirror = true;
setRotation(HoriPole2, 0F, 0F, 0F);
HoriPole3 = new ModelRenderer(this, 27, 0);
HoriPole3.addBox(0F, 0F, 0F, 3, 3, 10);
HoriPole3.setRotationPoint(-8F, 21F, -5F);
HoriPole3.setTextureSize(64, 64);
HoriPole3.mirror = true;
setRotation(HoriPole3, 0F, 0F, 0F);
HoriPole4 = new ModelRenderer(this, 0, 0);
HoriPole4.addBox(0F, 0F, 0F, 10, 3, 3);
HoriPole4.setRotationPoint(-5F, 21F, -8F);
HoriPole4.setTextureSize(64, 64);
HoriPole4.mirror = true;
setRotation(HoriPole4, 0F, 0F, 0F);
HoriPole5 = new ModelRenderer(this, 27, 0);
HoriPole5.addBox(0F, 0F, 0F, 3, 3, 10);
HoriPole5.setRotationPoint(5F, 8F, -5F);
HoriPole5.setTextureSize(64, 64);
HoriPole5.mirror = true;
setRotation(HoriPole5, 0F, 0F, 0F);
HoriPole6 = new ModelRenderer(this, 0, 0);
HoriPole6.addBox(0F, 0F, 0F, 10, 3, 3);
HoriPole6.setRotationPoint(-5F, 8F, 5F);
HoriPole6.setTextureSize(64, 64);
HoriPole6.mirror = true;
setRotation(HoriPole6, 0F, 0F, 0F);
HoriPole7 = new ModelRenderer(this, 27, 0);
HoriPole7.addBox(0F, 0F, 0F, 3, 3, 10);
HoriPole7.setRotationPoint(-8F, 8F, -5F);
HoriPole7.setTextureSize(64, 64);
HoriPole7.mirror = true;
setRotation(HoriPole7, 0F, 0F, 0F);
HoriPole8 = new ModelRenderer(this, 0, 0);
HoriPole8.addBox(0F, 0F, 0F, 10, 3, 3);
HoriPole8.setRotationPoint(-5F, 8F, -8F);
HoriPole8.setTextureSize(64, 64);
HoriPole8.mirror = true;
setRotation(HoriPole8, 0F, 0F, 0F);
frame12 = new ModelRenderer(this, 0, 0);
frame12.addBox(0F, 0F, 0F, 3, 10, 3);
frame12.setRotationPoint(-8F, 11F, 5F);
frame12.setTextureSize(64, 64);
frame12.mirror = true;
setRotation(frame12, 0F, 0F, 0F);
frame11 = new ModelRenderer(this, 0, 0);
frame11.addBox(0F, 0F, 0F, 3, 10, 3);
frame11.setRotationPoint(5F, 11F, -8F);
frame11.setTextureSize(64, 64);
frame11.mirror = true;
setRotation(frame11, 0F, 0F, 0F);
frame10 = new ModelRenderer(this, 0, 13);
frame10.addBox(0F, 0F, 0F, 10, 3, 3);
frame10.setRotationPoint(-5F, 21F, 5F);
frame10.setTextureSize(64, 64);
frame10.mirror = true;
setRotation(frame10, 0F, 0F, 0F);
frame9 = new ModelRenderer(this, 12, 0);
frame9.addBox(0F, 0F, 0F, 3, 3, 10);
frame9.setRotationPoint(5F, 21F, -5F);
frame9.setTextureSize(64, 64);
frame9.mirror = true;
setRotation(frame9, 0F, 0F, 0F);
frame8 = new ModelRenderer(this, 0, 13);
frame8.addBox(0F, 0F, 0F, 10, 3, 3);
frame8.setRotationPoint(-5F, 8F, 5F);
frame8.setTextureSize(64, 64);
frame8.mirror = true;
setRotation(frame8, 0F, 0F, 0F);
frame7 = new ModelRenderer(this, 0, 13);
frame7.addBox(0F, 0F, 0F, 10, 3, 3);
frame7.setRotationPoint(-5F, 21F, -8F);
frame7.setTextureSize(64, 64);
frame7.mirror = true;
setRotation(frame7, 0F, 0F, 0F);
frame6 = new ModelRenderer(this, 0, 0);
frame6.addBox(0F, 0F, 0F, 3, 10, 3);
frame6.setRotationPoint(5F, 11F, 5F);
frame6.setTextureSize(64, 64);
frame6.mirror = true;
setRotation(frame6, 0F, 0F, 0F);
frame5 = new ModelRenderer(this, 0, 0);
frame5.addBox(0F, 0F, 0F, 3, 10, 3);
frame5.setRotationPoint(-8F, 11F, -8F);
frame5.setTextureSize(64, 64);
frame5.mirror = true;
setRotation(frame5, 0F, 0F, 0F);
frame4 = new ModelRenderer(this, 12, 0);
frame4.addBox(0F, 0F, 0F, 3, 3, 10);
frame4.setRotationPoint(5F, 8F, -5F);
frame4.setTextureSize(64, 64);
frame4.mirror = true;
setRotation(frame4, 0F, 0F, 0F);
frame3 = new ModelRenderer(this, 12, 0);
frame3.addBox(0F, 0F, 0F, 3, 3, 10);
frame3.setRotationPoint(-8F, 21F, -5F);
frame3.setTextureSize(64, 64);
frame3.mirror = true;
setRotation(frame3, 0F, 0F, 0F);
frame2 = new ModelRenderer(this, 12, 0);
frame2.addBox(0F, 0F, 0F, 3, 3, 10);
frame2.setRotationPoint(-8F, 8F, -5F);
frame2.setTextureSize(64, 64);
frame2.mirror = true;
setRotation(frame2, 0F, 0F, 0F);
frame1 = new ModelRenderer(this, 0, 13);
frame1.addBox(0F, 0F, 0F, 10, 3, 3);
frame1.setRotationPoint(-5F, 8F, -8F);
frame1.setTextureSize(64, 64);
frame1.mirror = true;
setRotation(frame1, 0F, 0F, 0F);
corner8 = new ModelRenderer(this, 26, 13);
corner8.addBox(0F, 0F, 0F, 3, 3, 3);
corner8.setRotationPoint(5F, 21F, 5F);
corner8.setTextureSize(64, 64);
corner8.mirror = true;
setRotation(corner8, 0F, 0F, 0F);
corner7 = new ModelRenderer(this, 26, 13);
corner7.addBox(0F, 0F, 0F, 3, 3, 3);
corner7.setRotationPoint(5F, 21F, -8F);
corner7.setTextureSize(64, 64);
corner7.mirror = true;
setRotation(corner7, 0F, 0F, 0F);
corner6 = new ModelRenderer(this, 26, 13);
corner6.addBox(0F, 0F, 0F, 3, 3, 3);
corner6.setRotationPoint(-8F, 21F, 5F);
corner6.setTextureSize(64, 64);
corner6.mirror = true;
setRotation(corner6, 0F, 0F, 0F);
corner5 = new ModelRenderer(this, 26, 13);
corner5.addBox(0F, 0F, 0F, 3, 3, 3);
corner5.setRotationPoint(-8F, 21F, -8F);
corner5.setTextureSize(64, 64);
corner5.mirror = true;
setRotation(corner5, 0F, 0F, 0F);
corner4 = new ModelRenderer(this, 26, 13);
corner4.addBox(0F, 0F, 0F, 3, 3, 3);
corner4.setRotationPoint(5F, 8F, 5F);
corner4.setTextureSize(64, 64);
corner4.mirror = true;
setRotation(corner4, 0F, 0F, 0F);
corner3 = new ModelRenderer(this, 26, 13);
corner3.addBox(0F, 0F, 0F, 3, 3, 3);
corner3.setRotationPoint(5F, 8F, -8F);
corner3.setTextureSize(64, 64);
corner3.mirror = true;
setRotation(corner3, 0F, 0F, 0F);
corner2 = new ModelRenderer(this, 26, 13);
corner2.addBox(0F, 0F, 0F, 3, 3, 3);
corner2.setRotationPoint(-8F, 8F, 5F);
corner2.setTextureSize(64, 64);
corner2.mirror = true;
setRotation(corner2, 0F, 0F, 0F);
corner1 = new ModelRenderer(this, 26, 13);
corner1.addBox(0F, 0F, 0F, 3, 3, 3);
corner1.setRotationPoint(-8F, 8F, -8F);
corner1.setTextureSize(64, 64);
corner1.mirror = true;
setRotation(corner1, 0F, 0F, 0F);
connectorBackToggle = new ModelRenderer(this, 38, 16);
connectorBackToggle.addBox(0F, 0F, 0F, 10, 6, 1);
connectorBackToggle.setRotationPoint(-5F, 13F, 6F);
connectorBackToggle.setTextureSize(64, 64);
connectorBackToggle.mirror = true;
setRotation(connectorBackToggle, 0F, 0F, 0F);
connectorRightToggle = new ModelRenderer(this, 38, 0);
connectorRightToggle.addBox(0F, 0F, 0F, 1, 6, 10);
connectorRightToggle.setRotationPoint(6F, 13F, -5F);
connectorRightToggle.setTextureSize(64, 64);
connectorRightToggle.mirror = true;
setRotation(connectorRightToggle, 0F, 0F, 0F);
connectorBottomToggle = new ModelRenderer(this, 0, 19);
connectorBottomToggle.addBox(0F, 0F, 0F, 10, 1, 6);
connectorBottomToggle.setRotationPoint(-5F, 22F, -3F);
connectorBottomToggle.setTextureSize(64, 64);
connectorBottomToggle.mirror = true;
setRotation(connectorBottomToggle, 0F, 0F, 0F);
connectorLeftToggle = new ModelRenderer(this, 38, 0);
connectorLeftToggle.addBox(0F, 0F, 0F, 1, 6, 10);
connectorLeftToggle.setRotationPoint(-7F, 13F, -5F);
connectorLeftToggle.setTextureSize(64, 64);
connectorLeftToggle.mirror = true;
setRotation(connectorLeftToggle, 0F, 0F, 0F);
connectorFrontToggle = new ModelRenderer(this, 38, 16);
connectorFrontToggle.addBox(0F, 0F, 0F, 10, 6, 1);
connectorFrontToggle.setRotationPoint(-5F, 13F, -7F);
connectorFrontToggle.setTextureSize(64, 64);
connectorFrontToggle.mirror = true;
setRotation(connectorFrontToggle, 0F, 0F, 0F);
connectorTopToggle = new ModelRenderer(this, 0, 19);
connectorTopToggle.addBox(0F, 0F, 0F, 10, 1, 6);
connectorTopToggle.setRotationPoint(-5F, 9F, -3F);
connectorTopToggle.setTextureSize(64, 64);
connectorTopToggle.mirror = true;
setRotation(connectorTopToggle, 0F, 0F, 0F);
portBackToggle = new ModelRenderer(this, 18, 35);
portBackToggle.addBox(0F, 0F, 0F, 8, 8, 1);
portBackToggle.setRotationPoint(-4F, 12F, 7F);
portBackToggle.setTextureSize(64, 64);
portBackToggle.mirror = true;
setRotation(portBackToggle, 0F, 0F, 0F);
portBottomToggle = new ModelRenderer(this, 0, 26);
portBottomToggle.addBox(0F, 0F, 0F, 8, 1, 8);
portBottomToggle.setRotationPoint(-4F, 23F, -4F);
portBottomToggle.setTextureSize(64, 64);
portBottomToggle.mirror = true;
setRotation(portBottomToggle, 0F, 0F, 0F);
portFrontToggle = new ModelRenderer(this, 18, 35);
portFrontToggle.addBox(0F, 0F, 0F, 8, 8, 1);
portFrontToggle.setRotationPoint(-4F, 12F, -8F);
portFrontToggle.setTextureSize(64, 64);
portFrontToggle.mirror = true;
setRotation(portFrontToggle, 0F, 0F, 0F);
portLeftToggle = new ModelRenderer(this, 0, 35);
portLeftToggle.addBox(0F, 0F, 0F, 1, 8, 8);
portLeftToggle.setRotationPoint(-8F, 12F, -4F);
portLeftToggle.setTextureSize(64, 64);
portLeftToggle.mirror = true;
setRotation(portLeftToggle, 0F, 0F, 0F);
portRightToggle = new ModelRenderer(this, 0, 35);
portRightToggle.addBox(0F, 0F, 0F, 1, 8, 8);
portRightToggle.setRotationPoint(7F, 12F, -4F);
portRightToggle.setTextureSize(64, 64);
portRightToggle.mirror = true;
setRotation(portRightToggle, 0F, 0F, 0F);
portTopToggle = new ModelRenderer(this, 0, 26);
portTopToggle.addBox(0F, 0F, 0F, 8, 1, 8);
portTopToggle.setRotationPoint(-4F, 8F, -4F);
portTopToggle.setTextureSize(64, 64);
portTopToggle.mirror = true;
setRotation(portTopToggle, 0F, 0F, 0F);
ledTop1 = new ModelRenderer(this, 0, 51);
ledTop1.addBox(0F, 0F, 0F, 1, 1, 1);
ledTop1.setRotationPoint(-5.5F, 8.1F, -0.5F);
ledTop1.setTextureSize(64, 64);
ledTop1.mirror = true;
setRotation(ledTop1, 0F, 0F, 0F);
ledTop2 = new ModelRenderer(this, 0, 51);
ledTop2.addBox(0F, 0F, 0F, 1, 1, 1);
ledTop2.setRotationPoint(4.5F, 8.1F, -0.5F);
ledTop2.setTextureSize(64, 64);
ledTop2.mirror = true;
setRotation(ledTop2, 0F, 0F, 0F);
ledBack1 = new ModelRenderer(this, 0, 51);
ledBack1.addBox(0F, 0F, 0F, 1, 1, 1);
ledBack1.setRotationPoint(-5.5F, 15.5F, 6.9F);
ledBack1.setTextureSize(64, 64);
ledBack1.mirror = true;
setRotation(ledBack1, 0F, 0F, 0F);
ledBack2 = new ModelRenderer(this, 0, 51);
ledBack2.addBox(0F, 0F, 0F, 1, 1, 1);
ledBack2.setRotationPoint(4.5F, 15.5F, 6.9F);
ledBack2.setTextureSize(64, 64);
ledBack2.mirror = true;
setRotation(ledBack2, 0F, 0F, 0F);
ledBottom2 = new ModelRenderer(this, 0, 51);
ledBottom2.addBox(0F, 0F, 0F, 1, 1, 1);
ledBottom2.setRotationPoint(4.5F, 22.9F, -0.5F);
ledBottom2.setTextureSize(64, 64);
ledBottom2.mirror = true;
setRotation(ledBottom2, 0F, 0F, 0F);
ledBottom1 = new ModelRenderer(this, 0, 51);
ledBottom1.addBox(0F, 0F, 0F, 1, 1, 1);
ledBottom1.setRotationPoint(-5.5F, 22.9F, -0.5F);
ledBottom1.setTextureSize(64, 64);
ledBottom1.mirror = true;
setRotation(ledBottom1, 0F, 0F, 0F);
ledFront1 = new ModelRenderer(this, 0, 51);
ledFront1.addBox(0F, 0F, 0F, 1, 1, 1);
ledFront1.setRotationPoint(-5.5F, 15.5F, -7.9F);
ledFront1.setTextureSize(64, 64);
ledFront1.mirror = true;
setRotation(ledFront1, 0F, 0F, 0F);
ledFront2 = new ModelRenderer(this, 0, 51);
ledFront2.addBox(0F, 0F, 0F, 1, 1, 1);
ledFront2.setRotationPoint(4.5F, 15.5F, -7.9F);
ledFront2.setTextureSize(64, 64);
ledFront2.mirror = true;
setRotation(ledFront2, 0F, 0F, 0F);
ledRight2 = new ModelRenderer(this, 0, 51);
ledRight2.addBox(0F, 0F, 0F, 1, 1, 1);
ledRight2.setRotationPoint(6.9F, 15.5F, 4.5F);
ledRight2.setTextureSize(64, 64);
ledRight2.mirror = true;
setRotation(ledRight2, 0F, 0F, 0F);
ledRight1 = new ModelRenderer(this, 0, 51);
ledRight1.addBox(0F, 0F, 0F, 1, 1, 1);
ledRight1.setRotationPoint(6.9F, 15.5F, -5.5F);
ledRight1.setTextureSize(64, 64);
ledRight1.mirror = true;
setRotation(ledRight1, 0F, 0F, 0F);
ledLeft1 = new ModelRenderer(this, 0, 51);
ledLeft1.addBox(0F, 0F, 0F, 1, 1, 1);
ledLeft1.setRotationPoint(-7.9F, 15.5F, 4.5F);
ledLeft1.setTextureSize(64, 64);
ledLeft1.mirror = true;
setRotation(ledLeft1, 0F, 0F, 0F);
ledLeft2 = new ModelRenderer(this, 0, 51);
ledLeft2.addBox(0F, 0F, 0F, 1, 1, 1);
ledLeft2.setRotationPoint(-7.9F, 15.5F, -5.5F);
ledLeft2.setTextureSize(64, 64);
ledLeft2.mirror = true;
setRotation(ledLeft2, 0F, 0F, 0F);
}
public void render(float size)
{
frame12.render(size);
frame11.render(size);
frame10.render(size);
frame9.render(size);
frame8.render(size);
frame7.render(size);
frame6.render(size);
frame5.render(size);
frame4.render(size);
frame3.render(size);
frame2.render(size);
frame1.render(size);
MekanismRenderer.glowOn();
Corner1.render(size);
Corner2.render(size);
Corner3.render(size);
Corner4.render(size);
Corner5.render(size);
Corner6.render(size);
Corner7.render(size);
Corner8.render(size);
corner8.render(size);
corner7.render(size);
corner6.render(size);
corner5.render(size);
corner4.render(size);
corner3.render(size);
corner2.render(size);
corner1.render(size);
MekanismRenderer.glowOff();
Frame4.render(size);
Frame3.render(size);
Frame2.render(size);
Frame1.render(size);
Connection.render(size);
HoriPole1.render(size);
HoriPole2.render(size);
HoriPole3.render(size);
HoriPole4.render(size);
HoriPole5.render(size);
HoriPole6.render(size);
HoriPole7.render(size);
HoriPole8.render(size);
}
@SuppressWarnings("incomplete-switch")
public void renderSide(float size, ForgeDirection side, IOState state, TextureManager renderer)
{
if(state != IOState.OFF)
{
switch(side)
{
case DOWN:
connectorBottomToggle.render(size);
if(state == IOState.OUTPUT)
{
MekanismRenderer.glowOn();
}
portBottomToggle.render(size);
if(state == IOState.OUTPUT)
{
MekanismRenderer.glowOff();
}
break;
case UP:
connectorTopToggle.render(size);
if(state == IOState.OUTPUT)
{
MekanismRenderer.glowOn();
}
portTopToggle.render(size);
if(state == IOState.OUTPUT)
{
MekanismRenderer.glowOff();
}
break;
case NORTH:
connectorFrontToggle.render(size);
if(state == IOState.OUTPUT)
{
MekanismRenderer.glowOn();
}
portFrontToggle.render(size);
if(state == IOState.OUTPUT)
{
MekanismRenderer.glowOff();
}
break;
case SOUTH:
connectorBackToggle.render(size);
if(state == IOState.OUTPUT)
{
MekanismRenderer.glowOn();
}
portBackToggle.render(size);
if(state == IOState.OUTPUT)
{
MekanismRenderer.glowOff();
}
break;
case WEST:
connectorLeftToggle.render(size);
if(state == IOState.OUTPUT)
{
MekanismRenderer.glowOn();
}
portLeftToggle.render(size);
if(state == IOState.OUTPUT)
{
MekanismRenderer.glowOff();
}
break;
case EAST:
connectorRightToggle.render(size);
if(state == IOState.OUTPUT)
{
MekanismRenderer.glowOn();
}
portRightToggle.render(size);
if(state == IOState.OUTPUT)
{
MekanismRenderer.glowOff();
}
break;
}
}
renderer.bindTexture(state == IOState.OUTPUT ? LED_ON : LED_OFF);
if(state == IOState.OUTPUT)
{
MekanismRenderer.glowOn();
}
switch(side)
{
case DOWN:
ledBottom1.render(size);
ledBottom2.render(size);
break;
case UP:
ledTop1.render(size);
ledTop2.render(size);
break;
case NORTH:
ledFront1.render(size);
ledFront2.render(size);
break;
case SOUTH:
ledBack1.render(size);
ledBack2.render(size);
break;
case WEST:
ledLeft1.render(size);
ledLeft2.render(size);
break;
case EAST:
ledRight1.render(size);
ledRight2.render(size);
break;
}
if(state == IOState.OUTPUT)
{
MekanismRenderer.glowOff();
}
}
private void setRotation(ModelRenderer model, float x, float y, float z)

View file

@ -9,196 +9,236 @@ import cpw.mods.fml.relauncher.SideOnly;
@SideOnly(Side.CLIENT)
public class ModelLogisticalSorter extends ModelBase
{
ModelRenderer LeftThing;
ModelRenderer RightThing;
ModelRenderer BottomPlate;
ModelRenderer TopPlate;
ModelRenderer LeftPlate;
ModelRenderer RightPlate;
ModelRenderer BR1Block1;
ModelRenderer BL1Block1;
ModelRenderer TL1Block1;
ModelRenderer TR1Block1;
ModelRenderer BR1Block2;
ModelRenderer BL1Block2;
ModelRenderer TL1Block2;
ModelRenderer TR1Block2;
ModelRenderer PoleBR;
ModelRenderer PoleTL;
ModelRenderer PoleTR;
ModelRenderer PoleBL;
ModelRenderer Base;
ModelRenderer PipeBase;
ModelRenderer DecorPlate;
ModelRenderer portBack;
ModelRenderer portBackLarge;
ModelRenderer connectorBack;
ModelRenderer portFront;
ModelRenderer ring1;
ModelRenderer ring2;
ModelRenderer ring3;
ModelRenderer ring4;
ModelRenderer ring5;
ModelRenderer ring6;
ModelRenderer ring7;
ModelRenderer pistonBar1;
ModelRenderer pipe;
ModelRenderer pistonBase1;
ModelRenderer pistonBrace1;
ModelRenderer pistonConnector1;
ModelRenderer pistonBrace2;
ModelRenderer pistonConnector2;
ModelRenderer pistonBar2;
ModelRenderer pistonBase2;
ModelRenderer panel2;
ModelRenderer led4;
ModelRenderer led3;
ModelRenderer led2;
ModelRenderer led1;
ModelRenderer panel1;
public ModelLogisticalSorter()
public ModelLogisticalSorter()
{
textureWidth = 128;
textureHeight = 64;
LeftThing = new ModelRenderer(this, 0, 29);
LeftThing.addBox(0F, 0F, 0F, 1, 12, 1);
LeftThing.setRotationPoint(5.5F, 10F, 5F);
LeftThing.setTextureSize(128, 64);
LeftThing.mirror = true;
setRotation(LeftThing, 0F, 0F, 0F);
RightThing = new ModelRenderer(this, 0, 29);
RightThing.addBox(0F, 0F, 0F, 1, 12, 1);
RightThing.setRotationPoint(5.5F, 10F, -6F);
RightThing.setTextureSize(128, 64);
RightThing.mirror = true;
setRotation(RightThing, 0F, 0F, 0F);
BottomPlate = new ModelRenderer(this, 60, 7);
BottomPlate.addBox(0F, 0F, 0F, 12, 1, 4);
BottomPlate.setRotationPoint(-6F, 18F, -2F);
BottomPlate.setTextureSize(128, 64);
BottomPlate.mirror = true;
setRotation(BottomPlate, 0F, 0F, 0F);
TopPlate = new ModelRenderer(this, 60, 7);
TopPlate.addBox(0F, 0F, 0F, 12, 1, 4);
TopPlate.setRotationPoint(-6F, 13F, -2F);
TopPlate.setTextureSize(128, 64);
TopPlate.mirror = true;
setRotation(TopPlate, 0F, 0F, 0F);
LeftPlate = new ModelRenderer(this, 33, 5);
LeftPlate.addBox(0F, 0F, 0F, 12, 6, 1);
LeftPlate.setRotationPoint(-6F, 13F, 2F);
LeftPlate.setTextureSize(128, 64);
LeftPlate.mirror = true;
setRotation(LeftPlate, 0F, 0F, 0F);
RightPlate = new ModelRenderer(this, 33, 5);
RightPlate.addBox(0F, 0F, 0F, 12, 6, 1);
RightPlate.setRotationPoint(-6F, 13F, -3F);
RightPlate.setTextureSize(128, 64);
RightPlate.mirror = true;
setRotation(RightPlate, 0F, 0F, 0F);
BR1Block1 = new ModelRenderer(this, 33, 0);
BR1Block1.addBox(0F, 0F, 0F, 1, 2, 2);
BR1Block1.setRotationPoint(4F, 17.5F, -3.5F);
BR1Block1.setTextureSize(128, 64);
BR1Block1.mirror = true;
setRotation(BR1Block1, 0F, 0.0174533F, 0F);
BL1Block1 = new ModelRenderer(this, 33, 0);
BL1Block1.addBox(0F, 0F, 0F, 1, 2, 2);
BL1Block1.setRotationPoint(4F, 17.5F, 1.473333F);
BL1Block1.setTextureSize(128, 64);
BL1Block1.mirror = true;
setRotation(BL1Block1, 0F, 0F, 0F);
TL1Block1 = new ModelRenderer(this, 33, 0);
TL1Block1.addBox(0F, 0F, 0F, 1, 2, 2);
TL1Block1.setRotationPoint(4F, 12.5F, 1.473333F);
TL1Block1.setTextureSize(128, 64);
TL1Block1.mirror = true;
setRotation(TL1Block1, 0F, 0F, 0F);
TR1Block1 = new ModelRenderer(this, 33, 0);
TR1Block1.addBox(0F, 0F, 0F, 1, 2, 2);
TR1Block1.setRotationPoint(4F, 12.5F, -3.5F);
TR1Block1.setTextureSize(128, 64);
TR1Block1.mirror = true;
setRotation(TR1Block1, 0F, 0F, 0F);
BR1Block2 = new ModelRenderer(this, 33, 0);
BR1Block2.addBox(0F, 0F, 0F, 1, 2, 2);
BR1Block2.setRotationPoint(-5F, 17.5F, -3.5F);
BR1Block2.setTextureSize(128, 64);
BR1Block2.mirror = true;
setRotation(BR1Block2, 0F, 0F, 0F);
BL1Block2 = new ModelRenderer(this, 33, 0);
BL1Block2.addBox(0F, 0F, 0F, 1, 2, 2);
BL1Block2.setRotationPoint(-5F, 17.5F, 1.473333F);
BL1Block2.setTextureSize(128, 64);
BL1Block2.mirror = true;
setRotation(BL1Block2, 0F, 0F, 0F);
TL1Block2 = new ModelRenderer(this, 33, 0);
TL1Block2.addBox(0F, 0F, 0F, 1, 2, 2);
TL1Block2.setRotationPoint(-5F, 12.5F, 1.473333F);
TL1Block2.setTextureSize(128, 64);
TL1Block2.mirror = true;
setRotation(TL1Block2, 0F, 0F, 0F);
TR1Block2 = new ModelRenderer(this, 33, 0);
TR1Block2.addBox(0F, 0F, 0F, 1, 2, 2);
TR1Block2.setRotationPoint(-5F, 12.5F, -3.5F);
TR1Block2.setTextureSize(128, 64);
TR1Block2.mirror = true;
setRotation(TR1Block2, 0F, 0F, 0F);
PoleBR = new ModelRenderer(this, 40, 0);
PoleBR.addBox(0F, 0F, 0F, 8, 1, 1);
PoleBR.setRotationPoint(-4F, 18.2F, 2.2F);
PoleBR.setTextureSize(128, 64);
PoleBR.mirror = true;
setRotation(PoleBR, 0F, 0F, 0F);
PoleTL = new ModelRenderer(this, 40, 0);
PoleTL.addBox(0F, 0F, 0F, 8, 1, 1);
PoleTL.setRotationPoint(-4F, 12.8F, -3.2F);
PoleTL.setTextureSize(128, 64);
PoleTL.mirror = true;
setRotation(PoleTL, 0F, 0F, 0F);
PoleTR = new ModelRenderer(this, 40, 0);
PoleTR.addBox(0F, 0F, 0F, 8, 1, 1);
PoleTR.setRotationPoint(-4F, 12.8F, 2.2F);
PoleTR.setTextureSize(128, 64);
PoleTR.mirror = true;
setRotation(PoleTR, 0F, 0F, 0F);
PoleBL = new ModelRenderer(this, 40, 0);
PoleBL.addBox(0F, 0F, 0F, 8, 1, 1);
PoleBL.setRotationPoint(-4F, 18.2F, -3.2F);
PoleBL.setTextureSize(128, 64);
PoleBL.mirror = true;
setRotation(PoleBL, 0F, 0F, 0F);
Base = new ModelRenderer(this, 0, 0);
Base.addBox(0F, 0F, 0F, 2, 14, 14);
Base.setRotationPoint(6F, 9F, -7F);
Base.setTextureSize(128, 64);
Base.mirror = true;
setRotation(Base, 0F, 0F, 0F);
PipeBase = new ModelRenderer(this, 33, 13);
PipeBase.addBox(0F, 0F, 0F, 3, 8, 8);
PipeBase.setRotationPoint(-8F, 12F, -4F);
PipeBase.setTextureSize(128, 64);
PipeBase.mirror = true;
setRotation(PipeBase, 0F, 0F, 0F);
DecorPlate = new ModelRenderer(this, 5, 29);
DecorPlate.addBox(0F, 0F, 0F, 1, 8, 8);
DecorPlate.setRotationPoint(5F, 12F, -4F);
DecorPlate.setTextureSize(128, 64);
DecorPlate.mirror = true;
setRotation(DecorPlate, 0F, 0F, 0F);
portBack = new ModelRenderer(this, 26, 11);
portBack.addBox(0F, 0F, 0F, 8, 8, 1);
portBack.setRotationPoint(-4F, 12F, 8F);
portBack.setTextureSize(128, 64);
portBack.mirror = true;
setRotation(portBack, 0F, 0F, 0F);
portBackLarge = new ModelRenderer(this, 0, 0);
portBackLarge.addBox(0F, 0F, 0F, 12, 12, 1);
portBackLarge.setRotationPoint(-6F, 10F, 7F);
portBackLarge.setTextureSize(128, 64);
portBackLarge.mirror = true;
setRotation(portBackLarge, 0F, 0F, 0F);
connectorBack = new ModelRenderer(this, 26, 0);
connectorBack.addBox(0F, 0F, 0F, 10, 10, 1);
connectorBack.setRotationPoint(-5F, 11F, 6F);
connectorBack.setTextureSize(128, 64);
connectorBack.mirror = true;
setRotation(connectorBack, 0F, 0F, 0F);
portFront = new ModelRenderer(this, 48, 0);
portFront.addBox(0F, 0F, 0F, 10, 10, 1);
portFront.setRotationPoint(-5F, 11F, -8F);
portFront.setTextureSize(128, 64);
portFront.mirror = true;
setRotation(portFront, 0F, 0F, 0F);
ring1 = new ModelRenderer(this, 44, 11);
ring1.addBox(0F, 0F, 0F, 7, 7, 1);
ring1.setRotationPoint(-3.5F, 12.5F, -7F);
ring1.setTextureSize(128, 64);
ring1.mirror = true;
setRotation(ring1, 0F, 0F, 0F);
ring2 = new ModelRenderer(this, 44, 11);
ring2.addBox(0F, 0F, 0F, 7, 7, 1);
ring2.setRotationPoint(-3.5F, 12.5F, -5F);
ring2.setTextureSize(128, 64);
ring2.mirror = true;
setRotation(ring2, 0F, 0F, 0F);
ring3 = new ModelRenderer(this, 44, 11);
ring3.addBox(0F, 0F, 0F, 7, 7, 1);
ring3.setRotationPoint(-3.5F, 12.5F, -3F);
ring3.setTextureSize(128, 64);
ring3.mirror = true;
setRotation(ring3, 0F, 0F, 0F);
ring4 = new ModelRenderer(this, 44, 11);
ring4.addBox(0F, 0F, 0F, 7, 7, 1);
ring4.setRotationPoint(-3.5F, 12.5F, -1F);
ring4.setTextureSize(128, 64);
ring4.mirror = true;
setRotation(ring4, 0F, 0F, 0F);
ring5 = new ModelRenderer(this, 44, 11);
ring5.addBox(0F, 0F, 0F, 7, 7, 1);
ring5.setRotationPoint(-3.5F, 12.5F, 1F);
ring5.setTextureSize(128, 64);
ring5.mirror = true;
setRotation(ring5, 0F, 0F, 0F);
ring6 = new ModelRenderer(this, 44, 11);
ring6.addBox(0F, 0F, 0F, 7, 7, 1);
ring6.setRotationPoint(-3.5F, 12.5F, 3F);
ring6.setTextureSize(128, 64);
ring6.mirror = true;
setRotation(ring6, 0F, 0F, 0F);
ring7 = new ModelRenderer(this, 44, 11);
ring7.addBox(0F, 0F, 0F, 7, 7, 1);
ring7.setRotationPoint(-3.5F, 12.5F, 5F);
ring7.setTextureSize(128, 64);
ring7.mirror = true;
setRotation(ring7, 0F, 0F, 0F);
pistonBar1 = new ModelRenderer(this, 0, 20);
pistonBar1.addBox(0F, 0F, 0F, 1, 1, 5);
pistonBar1.setRotationPoint(-0.5F, 19.5F, -2.99F);
pistonBar1.setTextureSize(128, 64);
pistonBar1.mirror = true;
setRotation(pistonBar1, 0F, 0F, 0F);
pipe = new ModelRenderer(this, 0, 13);
pipe.addBox(0F, 0F, 0F, 6, 6, 14);
pipe.setRotationPoint(-3F, 13F, -7F);
pipe.setTextureSize(128, 64);
pipe.mirror = true;
setRotation(pipe, 0F, 0F, 0F);
pistonBase1 = new ModelRenderer(this, 0, 13);
pistonBase1.addBox(0F, 0F, 0F, 2, 2, 5);
pistonBase1.setRotationPoint(-1F, 19F, 1.01F);
pistonBase1.setTextureSize(128, 64);
pistonBase1.mirror = true;
setRotation(pistonBase1, 0F, 0F, 0F);
pistonBrace1 = new ModelRenderer(this, 0, 33);
pistonBrace1.addBox(0F, 0F, 0F, 2, 2, 3);
pistonBrace1.setRotationPoint(-1F, 18.5F, -7F);
pistonBrace1.setTextureSize(128, 64);
pistonBrace1.mirror = true;
setRotation(pistonBrace1, 0F, 0F, 0F);
pistonConnector1 = new ModelRenderer(this, 10, 33);
pistonConnector1.addBox(0F, 0F, 0F, 2, 2, 1);
pistonConnector1.setRotationPoint(-1F, 19F, -4F);
pistonConnector1.setTextureSize(128, 64);
pistonConnector1.mirror = true;
setRotation(pistonConnector1, 0F, 0F, 0F);
pistonBrace2 = new ModelRenderer(this, 0, 33);
pistonBrace2.addBox(0F, 0F, 0F, 2, 2, 3);
pistonBrace2.setRotationPoint(-1F, 11.5F, -7F);
pistonBrace2.setTextureSize(128, 64);
pistonBrace2.mirror = true;
setRotation(pistonBrace2, 0F, 0F, 0F);
pistonConnector2 = new ModelRenderer(this, 10, 33);
pistonConnector2.addBox(0F, 0F, 0F, 2, 2, 1);
pistonConnector2.setRotationPoint(-1F, 11F, -4F);
pistonConnector2.setTextureSize(128, 64);
pistonConnector2.mirror = true;
setRotation(pistonConnector2, 0F, 0F, 0F);
pistonBar2 = new ModelRenderer(this, 0, 20);
pistonBar2.addBox(0F, 0F, 0F, 1, 1, 5);
pistonBar2.setRotationPoint(-0.5F, 11.5F, -2.99F);
pistonBar2.setTextureSize(128, 64);
pistonBar2.mirror = true;
setRotation(pistonBar2, 0F, 0F, 0F);
pistonBase2 = new ModelRenderer(this, 0, 13);
pistonBase2.addBox(0F, 0F, 0F, 2, 2, 5);
pistonBase2.setRotationPoint(-1F, 11F, 1.01F);
pistonBase2.setTextureSize(128, 64);
pistonBase2.mirror = true;
setRotation(pistonBase2, 0F, 0F, 0F);
panel2 = new ModelRenderer(this, 40, 22);
panel2.addBox(0F, 0F, 0F, 1, 3, 8);
panel2.setRotationPoint(3F, 14.5F, -4.5F);
panel2.setTextureSize(128, 64);
panel2.mirror = true;
setRotation(panel2, 0F, 0F, 0F);
led4 = new ModelRenderer(this, 40, 22);
led4.addBox(0F, 0F, 0F, 1, 1, 1);
led4.setRotationPoint(3.5F, 15.5F, -1.5F);
led4.setTextureSize(128, 64);
led4.mirror = true;
setRotation(led4, 0F, 0F, 0F);
led3 = new ModelRenderer(this, 40, 22);
led3.addBox(0F, 0F, 0F, 1, 1, 1);
led3.setRotationPoint(3.5F, 15.5F, -3.5F);
led3.setTextureSize(128, 64);
led3.mirror = true;
setRotation(led3, 0F, 0F, 0F);
led2 = new ModelRenderer(this, 40, 22);
led2.addBox(0F, 0F, 0F, 1, 1, 1);
led2.setRotationPoint(-4.5F, 15.5F, -3.5F);
led2.setTextureSize(128, 64);
led2.mirror = true;
setRotation(led2, 0F, 0F, 0F);
led1 = new ModelRenderer(this, 40, 22);
led1.addBox(0F, 0F, 0F, 1, 1, 1);
led1.setRotationPoint(-4.5F, 15.5F, -1.5F);
led1.setTextureSize(128, 64);
led1.mirror = true;
setRotation(led1, 0F, 0F, 0F);
panel1 = new ModelRenderer(this, 40, 22);
panel1.addBox(0F, 0F, 0F, 1, 3, 8);
panel1.setRotationPoint(-4F, 14.5F, -4.5F);
panel1.setTextureSize(128, 64);
panel1.mirror = true;
setRotation(panel1, 0F, 0F, 0F);
}
public void render(float size, boolean active)
{
LeftThing.render(size);
RightThing.render(size);
BottomPlate.render(size);
TopPlate.render(size);
LeftPlate.render(size);
RightPlate.render(size);
portBack.render(size);
portBackLarge.render(size);
connectorBack.render(size);
portFront.render(size);
ring1.render(size);
ring2.render(size);
ring3.render(size);
ring4.render(size);
ring5.render(size);
ring6.render(size);
ring7.render(size);
pistonBar1.render(size);
pipe.render(size);
pistonBase1.render(size);
pistonBrace1.render(size);
pistonConnector1.render(size);
pistonBrace2.render(size);
pistonConnector2.render(size);
pistonBar2.render(size);
pistonBase2.render(size);
panel2.render(size);
if(active)
{
MekanismRenderer.glowOn();
}
BR1Block1.render(size);
BL1Block1.render(size);
TL1Block1.render(size);
TR1Block1.render(size);
BR1Block2.render(size);
BL1Block2.render(size);
TL1Block2.render(size);
TR1Block2.render(size);
led4.render(size);
led3.render(size);
led2.render(size);
led1.render(size);
if(active)
{
MekanismRenderer.glowOff();
}
PoleBR.render(size);
PoleTL.render(size);
PoleTR.render(size);
PoleBL.render(size);
Base.render(size);
PipeBase.render(size);
DecorPlate.render(size);
panel1.render(size);
}
private void setRotation(ModelRenderer model, float x, float y, float z)

View file

@ -96,8 +96,8 @@ public class MachineRenderingHandler implements ISimpleBlockRenderingHandler
else if(type == MachineType.LOGISTICAL_SORTER)
{
GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
GL11.glRotatef(270F, 0.0F, -1.0F, 0.0F);
GL11.glTranslatef(0.0F, -0.85F, -0.15F);
GL11.glRotatef(180F, 0.0F, 1.0F, 0.0F);
GL11.glTranslatef(0.0F, -1.0F, 0.0F);
Minecraft.getMinecraft().renderEngine.bindTexture(MekanismUtils.getResource(ResourceType.RENDER, "LogisticalSorter.png"));
logisticalSorter.render(0.0625F, false);
}
@ -128,7 +128,8 @@ public class MachineRenderingHandler implements ISimpleBlockRenderingHandler
else if(type == MachineType.CHEMICAL_INFUSER)
{
GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
GL11.glTranslatef(0.0F, -1.06F, 0.05F);
GL11.glRotatef(180f, 0.0F, 1.0F, 0.0F);
GL11.glTranslatef(0.0F, -0.96F, 0.05F);
Minecraft.getMinecraft().renderEngine.bindTexture(MekanismUtils.getResource(ResourceType.RENDER, "ChemicalInfuser.png"));
chemicalInfuser.render(0.0625F);
}

View file

@ -21,9 +21,11 @@ import mekanism.client.render.RenderGlowPanel;
import mekanism.client.render.RenderPartTransmitter;
import mekanism.client.render.entity.RenderBalloon;
import mekanism.client.render.tileentity.RenderBin;
import mekanism.client.render.tileentity.RenderEnergyCube;
import mekanism.client.render.tileentity.RenderFluidTank;
import mekanism.common.MekanismBlocks;
import mekanism.common.MekanismItems;
import mekanism.common.SideData.IOState;
import mekanism.common.Tier.BaseTier;
import mekanism.common.Tier.EnergyCubeTier;
import mekanism.common.Tier.FluidTankTier;
@ -75,6 +77,8 @@ import cpw.mods.fml.relauncher.SideOnly;
@SideOnly(Side.CLIENT)
public class ItemRenderingHandler implements IItemRenderer
{
private Minecraft mc = Minecraft.getMinecraft();
public ModelRobit robit = new ModelRobit();
public ModelChest personalChest = new ModelChest();
public ModelEnergyCube energyCube = new ModelEnergyCube();
@ -125,17 +129,22 @@ public class ItemRenderingHandler implements IItemRenderer
{
EnergyCubeTier tier = ((IEnergyCube)item.getItem()).getEnergyCubeTier(item);
IEnergizedItem energized = (IEnergizedItem)item.getItem();
Minecraft.getMinecraft().renderEngine.bindTexture(MekanismUtils.getResource(ResourceType.RENDER, "EnergyCube" + tier.getBaseTier().getName() + ".png"));
mc.renderEngine.bindTexture(RenderEnergyCube.resources.get(tier));
GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
GL11.glRotatef(270F, 0.0F, -1.0F, 0.0F);
GL11.glTranslatef(0.0F, -1.0F, 0.0F);
energyCube.render(0.0625F);
for(ForgeDirection side : ForgeDirection.VALID_DIRECTIONS)
{
energyCube.renderSide(0.0625F, side, side == ForgeDirection.NORTH ? IOState.OUTPUT : IOState.INPUT, mc.renderEngine);
}
GL11.glPushMatrix();
GL11.glTranslated(0.0, 1.0, 0.0);
Minecraft.getMinecraft().renderEngine.bindTexture(MekanismUtils.getResource(ResourceType.RENDER, "EnergyCore.png"));
mc.renderEngine.bindTexture(MekanismUtils.getResource(ResourceType.RENDER, "EnergyCore.png"));
GL11.glShadeModel(GL11.GL_SMOOTH);
GL11.glEnable(GL11.GL_BLEND);
@ -219,7 +228,7 @@ public class ItemRenderingHandler implements IItemRenderer
GL11.glScalef(scale*scaler, scale*scaler, 0);
TextureManager renderEngine = Minecraft.getMinecraft().renderEngine;
TextureManager renderEngine = mc.renderEngine;
GL11.glDisable(GL11.GL_LIGHTING);
@ -295,7 +304,7 @@ public class ItemRenderingHandler implements IItemRenderer
GL11.glPushMatrix();
BaseTier tier = ((ItemBlockGasTank)item.getItem()).getBaseTier(item);
Minecraft.getMinecraft().renderEngine.bindTexture(MekanismUtils.getResource(ResourceType.RENDER, "GasTank" + tier.getName() + ".png"));
mc.renderEngine.bindTexture(MekanismUtils.getResource(ResourceType.RENDER, "GasTank" + tier.getName() + ".png"));
GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
GL11.glRotatef(90F, 0.0F, 1.0F, 0.0F);
GL11.glTranslatef(0.0F, -1.0F, 0.0F);
@ -306,7 +315,7 @@ public class ItemRenderingHandler implements IItemRenderer
else if(Block.getBlockFromItem(item.getItem()) == MekanismBlocks.ObsidianTNT)
{
GL11.glPushMatrix();
Minecraft.getMinecraft().renderEngine.bindTexture(MekanismUtils.getResource(ResourceType.RENDER, "ObsidianTNT.png"));
mc.renderEngine.bindTexture(MekanismUtils.getResource(ResourceType.RENDER, "ObsidianTNT.png"));
GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
GL11.glRotatef(180F, 0.0F, -1.0F, 0.0F);
GL11.glTranslatef(0.0F, -1.0F, 0.0F);
@ -337,7 +346,7 @@ public class ItemRenderingHandler implements IItemRenderer
GL11.glTranslatef(0, 1.0F, 1.0F);
GL11.glScalef(1.0F, -1F, -1F);
Minecraft.getMinecraft().renderEngine.bindTexture(MekanismUtils.getResource(ResourceType.RENDER, "PersonalChest.png"));
mc.renderEngine.bindTexture(MekanismUtils.getResource(ResourceType.RENDER, "PersonalChest.png"));
personalChest.renderAll();
GL11.glPopMatrix();
@ -348,7 +357,7 @@ public class ItemRenderingHandler implements IItemRenderer
GL11.glRotatef(180, 0.0F, 0.0F, 1.0F);
GL11.glRotatef(90, 0.0F, -1.0F, 0.0F);
GL11.glTranslatef(0.0F, -1.5F, 0.0F);
Minecraft.getMinecraft().renderEngine.bindTexture(MekanismUtils.getResource(ResourceType.RENDER, "Robit.png"));
mc.renderEngine.bindTexture(MekanismUtils.getResource(ResourceType.RENDER, "Robit.png"));
robit.render(0.08F);
GL11.glPopMatrix();
}
@ -358,7 +367,7 @@ public class ItemRenderingHandler implements IItemRenderer
GL11.glRotatef(180, 0.0F, 0.0F, 1.0F);
GL11.glRotatef(90, 0.0F, -1.0F, 0.0F);
GL11.glTranslatef(0.2F, -0.35F, 0.0F);
Minecraft.getMinecraft().renderEngine.bindTexture(MekanismUtils.getResource(ResourceType.RENDER, "Jetpack.png"));
mc.renderEngine.bindTexture(MekanismUtils.getResource(ResourceType.RENDER, "Jetpack.png"));
jetpack.render(0.0625F);
GL11.glPopMatrix();
}
@ -368,7 +377,7 @@ public class ItemRenderingHandler implements IItemRenderer
GL11.glRotatef(180, 0.0F, 0.0F, 1.0F);
GL11.glRotatef(90, 0.0F, -1.0F, 0.0F);
GL11.glTranslatef(0.2F, -0.35F, 0.0F);
Minecraft.getMinecraft().renderEngine.bindTexture(MekanismUtils.getResource(ResourceType.RENDER, "Jetpack.png"));
mc.renderEngine.bindTexture(MekanismUtils.getResource(ResourceType.RENDER, "Jetpack.png"));
armoredJetpack.render(0.0625F);
GL11.glPopMatrix();
}
@ -378,7 +387,7 @@ public class ItemRenderingHandler implements IItemRenderer
GL11.glRotatef(180, 0.0F, 0.0F, 1.0F);
GL11.glRotatef(90, 0.0F, -1.0F, 0.0F);
GL11.glTranslatef(0.1F, 0.2F, 0.0F);
Minecraft.getMinecraft().renderEngine.bindTexture(MekanismUtils.getResource(ResourceType.RENDER, "ScubaSet.png"));
mc.renderEngine.bindTexture(MekanismUtils.getResource(ResourceType.RENDER, "ScubaSet.png"));
gasMask.render(0.0625F);
GL11.glPopMatrix();
}
@ -389,7 +398,7 @@ public class ItemRenderingHandler implements IItemRenderer
GL11.glRotatef(90, 0.0F, -1.0F, 0.0F);
GL11.glScalef(1.6F, 1.6F, 1.6F);
GL11.glTranslatef(0.2F, -0.5F, 0.0F);
Minecraft.getMinecraft().renderEngine.bindTexture(MekanismUtils.getResource(ResourceType.RENDER, "ScubaSet.png"));
mc.renderEngine.bindTexture(MekanismUtils.getResource(ResourceType.RENDER, "ScubaSet.png"));
scubaTank.render(0.0625F);
GL11.glPopMatrix();
}
@ -400,7 +409,7 @@ public class ItemRenderingHandler implements IItemRenderer
GL11.glRotatef(90, 0.0F, -1.0F, 0.0F);
GL11.glScalef(2.0F, 2.0F, 2.0F);
GL11.glTranslatef(0.2F, -1.43F, 0.12F);
Minecraft.getMinecraft().renderEngine.bindTexture(MekanismUtils.getResource(ResourceType.RENDER, "FreeRunners.png"));
mc.renderEngine.bindTexture(MekanismUtils.getResource(ResourceType.RENDER, "FreeRunners.png"));
freeRunners.render(0.0625F);
GL11.glPopMatrix();
}
@ -446,7 +455,7 @@ public class ItemRenderingHandler implements IItemRenderer
GL11.glTranslatef(0.0F, -0.7F, 0.0F);
}
Minecraft.getMinecraft().renderEngine.bindTexture(MekanismUtils.getResource(ResourceType.RENDER, "AtomicDisassembler.png"));
mc.renderEngine.bindTexture(MekanismUtils.getResource(ResourceType.RENDER, "AtomicDisassembler.png"));
atomicDisassembler.render(0.0625F);
GL11.glPopMatrix();
}
@ -481,7 +490,7 @@ public class ItemRenderingHandler implements IItemRenderer
{
GL11.glPushMatrix();
GL11.glRotatef(160, 0.0F, 0.0F, 1.0F);
Minecraft.getMinecraft().renderEngine.bindTexture(MekanismUtils.getResource(ResourceType.RENDER, "Flamethrower.png"));
mc.renderEngine.bindTexture(MekanismUtils.getResource(ResourceType.RENDER, "Flamethrower.png"));
GL11.glTranslatef(0.0F, -1.0F, 0.0F);
GL11.glRotatef(135, 0.0F, 1.0F, 0.0F);
@ -513,7 +522,7 @@ public class ItemRenderingHandler implements IItemRenderer
{
GL11.glPushMatrix();
GL11.glRotatef(270F, 0.0F, -1.0F, 0.0F);
Minecraft.getMinecraft().renderEngine.bindTexture(MekanismUtils.getResource(ResourceType.RENDER, "FluidTank.png"));
mc.renderEngine.bindTexture(MekanismUtils.getResource(ResourceType.RENDER, "FluidTank.png"));
ItemBlockMachine itemMachine = (ItemBlockMachine)item.getItem();
float targetScale = (float)(itemMachine.getFluidStack(item) != null ? itemMachine.getFluidStack(item).amount : 0)/itemMachine.getCapacity(item);
FluidTankTier tier = FluidTankTier.values()[itemMachine.getBaseTier(item).ordinal()];

View file

@ -1,15 +1,22 @@
package mekanism.client.render.tileentity;
import java.util.HashMap;
import java.util.Map;
import mekanism.api.EnumColor;
import mekanism.api.transmitters.TransmissionType;
import mekanism.client.MekanismClient;
import mekanism.client.model.ModelEnergyCube;
import mekanism.client.model.ModelEnergyCube.ModelEnergyCore;
import mekanism.client.render.MekanismRenderer;
import mekanism.common.Tier.EnergyCubeTier;
import mekanism.common.tile.TileEntityEnergyCube;
import mekanism.common.util.MekanismUtils;
import mekanism.common.util.MekanismUtils.ResourceType;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.common.util.ForgeDirection;
import org.lwjgl.opengl.GL11;
@ -21,7 +28,19 @@ public class RenderEnergyCube extends TileEntitySpecialRenderer
{
private ModelEnergyCube model = new ModelEnergyCube();
private ModelEnergyCore core = new ModelEnergyCore();
public static Map<EnergyCubeTier, ResourceLocation> resources = new HashMap<EnergyCubeTier, ResourceLocation>();
static {
if(resources.isEmpty())
{
for(EnergyCubeTier tier : EnergyCubeTier.values())
{
resources.put(tier, MekanismUtils.getResource(ResourceType.RENDER, "EnergyCube" + tier.getBaseTier().getName() + ".png"));
}
}
}
@Override
public void renderTileEntityAt(TileEntity tileEntity, double x, double y, double z, float partialTick)
{
@ -33,18 +52,22 @@ public class RenderEnergyCube extends TileEntitySpecialRenderer
GL11.glPushMatrix();
GL11.glTranslatef((float)x + 0.5F, (float)y + 1.5F, (float)z + 0.5F);
bindTexture(MekanismUtils.getResource(ResourceType.RENDER, "EnergyCube" + tileEntity.tier.getBaseTier().getName() + ".png"));
bindTexture(resources.get(tileEntity.tier));
switch(tileEntity.facing)
{
case 0:
{
GL11.glRotatef(90F, -1.0F, 0.0F, 0.0F);
GL11.glTranslatef(0.0F, 1.0F, -1.0F);
break;
}
case 1:
{
GL11.glRotatef(90F, 1.0F, 0.0F, 0.0F);
GL11.glTranslatef(0.0F, 1.0F, 1.0F);
break;
}
case 2: GL11.glRotatef(0, 0.0F, 1.0F, 0.0F); break;
case 3: GL11.glRotatef(180, 0.0F, 1.0F, 0.0F); break;
case 4: GL11.glRotatef(90, 0.0F, 1.0F, 0.0F); break;
@ -53,6 +76,13 @@ public class RenderEnergyCube extends TileEntitySpecialRenderer
GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
model.render(0.0625F);
for(ForgeDirection side : ForgeDirection.VALID_DIRECTIONS)
{
bindTexture(resources.get(tileEntity.tier));
model.renderSide(0.0625F, side, tileEntity.configComponent.getOutput(TransmissionType.ENERGY, side.ordinal()).ioState, field_147501_a.field_147553_e);
}
GL11.glPopMatrix();
if(tileEntity.getEnergy()/tileEntity.getMaxEnergy() > 0.1)

View file

@ -34,20 +34,20 @@ public class RenderLogisticalSorter extends TileEntitySpecialRenderer
{
case 0:
{
GL11.glRotatef(90F, 0.0F, 0.0F, -1.0F);
GL11.glTranslatef(1.0F, 1.0F, 0.0F);
GL11.glRotatef(90F, -1.0F, 0.0F, 0.0F);
GL11.glTranslatef(0.0F, 1.0F, -1.0F);
break;
}
case 1:
{
GL11.glRotatef(90F, 0.0F, 0.0F, 1.0F);
GL11.glTranslatef(-1.0F, 1.0F, 0.0F);
GL11.glRotatef(90F, 1.0F, 0.0F, 0.0F);
GL11.glTranslatef(0.0F, 1.0F, 1.0F);
break;
}
case 2: GL11.glRotatef(90, 0.0F, 1.0F, 0.0F); break;
case 3: GL11.glRotatef(270, 0.0F, 1.0F, 0.0F); break;
case 4: GL11.glRotatef(180, 0.0F, 1.0F, 0.0F); break;
case 5: GL11.glRotatef(0, 0.0F, 1.0F, 0.0F); break;
case 2: GL11.glRotatef(0, 0.0F, 1.0F, 0.0F); break;
case 3: GL11.glRotatef(180, 0.0F, 1.0F, 0.0F); break;
case 4: GL11.glRotatef(90, 0.0F, 1.0F, 0.0F); break;
case 5: GL11.glRotatef(270, 0.0F, 1.0F, 0.0F); break;
}
GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.8 KiB

After

Width:  |  Height:  |  Size: 5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.7 KiB

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.6 KiB

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.9 KiB

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.3 KiB

After

Width:  |  Height:  |  Size: 19 KiB