v5.5.6 Beta #5

*Better Chargepad model.
*Code cleanup.
This commit is contained in:
Aidan Brady 2013-05-21 13:34:16 -04:00
parent aa8f06c5e0
commit 251e936a96
4 changed files with 35 additions and 9 deletions

BIN
bin/minecraft/mods/mekanism/render/Chargepad.png Executable file → Normal file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 KiB

After

Width:  |  Height:  |  Size: 4.6 KiB

View file

@ -67,7 +67,7 @@ public class MachineRenderingHandler implements ISimpleBlockRenderingHandler
else if(metadata == MachineType.CHARGEPAD.meta)
{
GL11.glRotatef(180F, 1.0F, 0.0F, 0.0F);
GL11.glTranslatef(0.0F, -1.4F, 0.0F);
GL11.glTranslatef(0.0F, -1.1F, 0.0F);
GL11.glBindTexture(3553, FMLClientHandler.instance().getClient().renderEngine.getTexture("/mods/mekanism/render/Chargepad.png"));
chargepad.render(0.0625F);
}

View file

@ -4,10 +4,13 @@ import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity;
public class ModelChargepad extends ModelBase
public class ModelChargepad extends ModelBase
{
public ModelRenderer Shape1;
public ModelRenderer Shape2;
ModelRenderer Shape1;
ModelRenderer Shape2;
ModelRenderer Shape3;
ModelRenderer Shape4;
ModelRenderer Shape5;
public ModelChargepad()
{
@ -21,11 +24,29 @@ public class ModelChargepad extends ModelBase
Shape1.mirror = true;
setRotation(Shape1, 0F, 0F, 0F);
Shape2 = new ModelRenderer(this, 0, 18);
Shape2.addBox(0F, 0F, 0F, 4, 3, 2);
Shape2.setRotationPoint(-2F, 20F, 6F);
Shape2.addBox(0F, 0F, 0F, 8, 11, 2);
Shape2.setRotationPoint(-4F, 12F, 6F);
Shape2.setTextureSize(64, 64);
Shape2.mirror = true;
setRotation(Shape2, 0F, 0F, 0F);
Shape3 = new ModelRenderer(this, 0, 0);
Shape3.addBox(0F, 0F, 0F, 4, 3, 1);
Shape3.setRotationPoint(-2F, 14F, 5F);
Shape3.setTextureSize(64, 64);
Shape3.mirror = true;
setRotation(Shape3, 0F, 0F, 0F);
Shape4 = new ModelRenderer(this, 3, 8);
Shape4.addBox(0F, 0F, 0F, 2, 5, 2);
Shape4.setRotationPoint(-5F, 18F, 5F);
Shape4.setTextureSize(64, 64);
Shape4.mirror = true;
setRotation(Shape4, 0F, 0F, 0F);
Shape5 = new ModelRenderer(this, 3, 8);
Shape5.addBox(0F, 0F, 0F, 2, 5, 2);
Shape5.setRotationPoint(3F, 18F, 5F);
Shape5.setTextureSize(64, 64);
Shape5.mirror = true;
setRotation(Shape5, 0F, 0F, 0F);
}
@Override
@ -35,15 +56,21 @@ public class ModelChargepad extends ModelBase
setRotationAngles(f, f1, f2, f3, f4, f5, entity);
Shape1.render(f5);
Shape2.render(f5);
Shape3.render(f5);
Shape4.render(f5);
Shape5.render(f5);
}
public void render(float size)
{
Shape1.render(size);
Shape2.render(size);
Shape3.render(size);
Shape4.render(size);
Shape5.render(size);
}
private void setRotation(ModelRenderer model, float x, float y, float z)
private void setRotation(ModelRenderer model, float x, float y, float z)
{
model.rotateAngleX = x;
model.rotateAngleY = y;

View file

@ -11,7 +11,6 @@ import net.minecraft.nbt.NBTTagList;
public class InventoryElectricChest extends InventoryBasic
{
public EntityPlayer entityPlayer;
public int size;
public boolean reading;
public InventoryElectricChest(EntityPlayer player)