Work on Formulaic Assemblicator, also added some new fancy models from @CyanideX!

This commit is contained in:
aidancbrady 2016-03-14 23:57:37 -04:00
parent 6f4e73d15e
commit a87b088be6
24 changed files with 1072 additions and 842 deletions

View file

@ -31,6 +31,7 @@ import mekanism.client.gui.GuiEnrichmentChamber;
import mekanism.client.gui.GuiFactory; import mekanism.client.gui.GuiFactory;
import mekanism.client.gui.GuiFluidTank; import mekanism.client.gui.GuiFluidTank;
import mekanism.client.gui.GuiFluidicPlenisher; import mekanism.client.gui.GuiFluidicPlenisher;
import mekanism.client.gui.GuiFormulaicAssemblicator;
import mekanism.client.gui.GuiGasTank; import mekanism.client.gui.GuiGasTank;
import mekanism.client.gui.GuiInductionMatrix; import mekanism.client.gui.GuiInductionMatrix;
import mekanism.client.gui.GuiLaserAmplifier; import mekanism.client.gui.GuiLaserAmplifier;
@ -151,6 +152,7 @@ import mekanism.common.tile.TileEntityEnrichmentChamber;
import mekanism.common.tile.TileEntityFactory; import mekanism.common.tile.TileEntityFactory;
import mekanism.common.tile.TileEntityFluidTank; import mekanism.common.tile.TileEntityFluidTank;
import mekanism.common.tile.TileEntityFluidicPlenisher; import mekanism.common.tile.TileEntityFluidicPlenisher;
import mekanism.common.tile.TileEntityFormulaicAssemblicator;
import mekanism.common.tile.TileEntityGasTank; import mekanism.common.tile.TileEntityGasTank;
import mekanism.common.tile.TileEntityInductionCasing; import mekanism.common.tile.TileEntityInductionCasing;
import mekanism.common.tile.TileEntityInductionCell; import mekanism.common.tile.TileEntityInductionCell;
@ -529,6 +531,8 @@ public class ClientProxy extends CommonProxy
return new GuiThermoelectricBoiler(player.inventory, (TileEntityBoilerCasing)tileEntity); return new GuiThermoelectricBoiler(player.inventory, (TileEntityBoilerCasing)tileEntity);
case 55: case 55:
return new GuiBoilerStats(player.inventory, (TileEntityBoilerCasing)tileEntity); return new GuiBoilerStats(player.inventory, (TileEntityBoilerCasing)tileEntity);
case 56:
return new GuiFormulaicAssemblicator(player.inventory, (TileEntityFormulaicAssemblicator)tileEntity);
} }
return null; return null;

View file

@ -1,9 +1,73 @@
package mekanism.client.gui; package mekanism.client.gui;
import java.util.List;
import mekanism.api.util.ListUtils;
import mekanism.client.gui.element.GuiElement.IInfoHandler;
import mekanism.client.gui.element.GuiEnergyInfo;
import mekanism.client.gui.element.GuiPowerBar;
import mekanism.client.gui.element.GuiRedstoneControl;
import mekanism.client.gui.element.GuiSideConfigurationTab;
import mekanism.client.gui.element.GuiSlot;
import mekanism.client.gui.element.GuiSlot.SlotOverlay;
import mekanism.client.gui.element.GuiSlot.SlotType;
import mekanism.client.gui.element.GuiTransporterConfigTab;
import mekanism.common.inventory.container.ContainerFormulaicAssemblicator;
import mekanism.common.tile.TileEntityFormulaicAssemblicator;
import mekanism.common.util.LangUtils;
import mekanism.common.util.MekanismUtils;
import mekanism.common.util.MekanismUtils.ResourceType;
import net.minecraft.entity.player.InventoryPlayer;
import org.lwjgl.opengl.GL11;
import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly; import cpw.mods.fml.relauncher.SideOnly;
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public class GuiFormulaicAssemblicator { public class GuiFormulaicAssemblicator extends GuiMekanism
{
public TileEntityFormulaicAssemblicator tileEntity;
public GuiFormulaicAssemblicator(InventoryPlayer inventory, TileEntityFormulaicAssemblicator tentity)
{
super(tentity, new ContainerFormulaicAssemblicator(inventory, tentity));
tileEntity = tentity;
guiElements.add(new GuiRedstoneControl(this, tileEntity, MekanismUtils.getResource(ResourceType.GUI, "GuiFormulaicAssemblicator.png")));
guiElements.add(new GuiSideConfigurationTab(this, tileEntity, MekanismUtils.getResource(ResourceType.GUI, "GuiFormulaicAssemblicator.png")));
guiElements.add(new GuiTransporterConfigTab(this, 34, tileEntity, MekanismUtils.getResource(ResourceType.GUI, "GuiFormulaicAssemblicator.png")));
guiElements.add(new GuiPowerBar(this, tileEntity, MekanismUtils.getResource(ResourceType.GUI, "GuiFormulaicAssemblicator.png"), 159, 16));
guiElements.add(new GuiEnergyInfo(new IInfoHandler() {
@Override
public List<String> getInfo()
{
String multiplier = MekanismUtils.getEnergyDisplay(tileEntity.energyPerTick);
return ListUtils.asList(LangUtils.localize("gui.using") + ": " + multiplier + "/t", LangUtils.localize("gui.needed") + ": " + MekanismUtils.getEnergyDisplay(tileEntity.getMaxEnergy()-tileEntity.getEnergy()));
}
}, this, MekanismUtils.getResource(ResourceType.GUI, "GuiFormulaicAssemblicator.png")));
guiElements.add(new GuiSlot(SlotType.POWER, this, MekanismUtils.getResource(ResourceType.GUI, "GuiFormulaicAssemblicator.png"), 154, 75).with(SlotOverlay.POWER));
ySize+=64;
}
@Override
protected void drawGuiContainerForegroundLayer(int mouseX, int mouseY)
{
fontRendererObj.drawString(tileEntity.getInventoryName(), (xSize/2)-(fontRendererObj.getStringWidth(tileEntity.getInventoryName())/2), 6, 0x404040);
fontRendererObj.drawString(LangUtils.localize("container.inventory"), 8, (ySize - 96) + 2, 0x404040);
super.drawGuiContainerForegroundLayer(mouseX, mouseY);
}
@Override
protected void drawGuiContainerBackgroundLayer(float partialTick, int mouseX, int mouseY)
{
mc.renderEngine.bindTexture(MekanismUtils.getResource(ResourceType.GUI, "GuiFormulaicAssemblicator.png"));
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
int guiWidth = (width - xSize) / 2;
int guiHeight = (height - ySize) / 2;
drawTexturedModalRect(guiWidth, guiHeight, 0, 0, xSize, ySize);
super.drawGuiContainerBackgroundLayer(partialTick, mouseX, mouseY);
}
} }

View file

@ -7,329 +7,485 @@ import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly; import cpw.mods.fml.relauncher.SideOnly;
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public class ModelDigitalMiner extends ModelBase public class ModelDigitalMiner extends ModelBase
{ {
ModelRenderer Base; ModelRenderer keyboard;
ModelRenderer Back; ModelRenderer keyboardBottom;
ModelRenderer Panel; ModelRenderer keyboardSupportExt1;
ModelRenderer PanelStem; ModelRenderer keyboardSupportExt2;
ModelRenderer KeyboardStem; ModelRenderer keyboardSupport1;
ModelRenderer Keyboard; ModelRenderer keyboardSupport2;
ModelRenderer LaserBase; ModelRenderer monitor1back;
ModelRenderer LegRight; ModelRenderer monitor2back;
ModelRenderer UpperLegRight; ModelRenderer monitor3back;
ModelRenderer ToeTopRight1; ModelRenderer monitorBar1;
ModelRenderer ToeTopRight2; ModelRenderer monitorBar2;
ModelRenderer ToeRight1; ModelRenderer led1;
ModelRenderer LegHoldRight1; ModelRenderer led2;
ModelRenderer LegHoldRight2; ModelRenderer led3;
ModelRenderer FootBaseRight; ModelRenderer monitorMount1;
ModelRenderer ToeRight2; ModelRenderer monitorMount2;
ModelRenderer FootBaseLeft; ModelRenderer frame1;
ModelRenderer UpperLegLeft; ModelRenderer frame3;
ModelRenderer LegHoldLeft1; ModelRenderer plate5;
ModelRenderer ToeTopLeft2; ModelRenderer bracket1;
ModelRenderer ToeTopLeft1; ModelRenderer bracket2;
ModelRenderer LegHoldLeft2; ModelRenderer bracket3;
ModelRenderer ToeLeft1; ModelRenderer bracket4;
ModelRenderer ToeLeft2; ModelRenderer bracket5;
ModelRenderer LegLeft; ModelRenderer bracket6;
ModelRenderer RightAxil; ModelRenderer bracket7;
ModelRenderer RightBackUpperLeg; ModelRenderer bracket8;
ModelRenderer RightBackLowerLeg; ModelRenderer bracketPlate1;
ModelRenderer RightBackFoot; ModelRenderer bracketPlate2;
ModelRenderer LeftAxil; ModelRenderer bracketPlate3;
ModelRenderer LeftBackUpperLeg; ModelRenderer bracketPlate4;
ModelRenderer LeftBackLowerLeg; ModelRenderer supportBeam1;
ModelRenderer LeftBackFoot; ModelRenderer supportBeam2;
ModelRenderer Laser1; ModelRenderer supportBeam3;
ModelRenderer Laser2; ModelRenderer supportBeam4;
ModelRenderer Laser3; ModelRenderer foot1;
ModelRenderer Laser4; ModelRenderer foot2;
ModelRenderer foot3;
ModelRenderer foot4;
ModelRenderer core;
ModelRenderer powerCable1a;
ModelRenderer powerCable1b;
ModelRenderer powerCable2;
ModelRenderer powerCable3;
ModelRenderer powerConnector1;
ModelRenderer powerConnector2a;
ModelRenderer powerConnector2b;
ModelRenderer powerCpnnector3a;
ModelRenderer powerConnector3b;
ModelRenderer frame2a;
ModelRenderer frame2b;
ModelRenderer frame2c;
ModelRenderer frame2d;
ModelRenderer monitor1;
ModelRenderer monitor2;
ModelRenderer monitor3;
public ModelDigitalMiner() public ModelDigitalMiner()
{ {
textureWidth = 256; textureWidth = 256;
textureHeight = 256; textureHeight = 128;
Base = new ModelRenderer(this, 0, 0); keyboard = new ModelRenderer(this, 120, 20);
Base.addBox(0F, 0F, 0F, 18, 22, 20); keyboard.addBox(0F, -3F, -1F, 10, 5, 1);
Base.setRotationPoint(-8F, -8F, -10F); keyboard.setRotationPoint(-5F, 14F, -5F);
Base.setTextureSize(256, 256); keyboard.setTextureSize(256, 128);
Base.mirror = true; keyboard.mirror = true;
setRotation(Base, 0F, 0F, 0F); setRotation(keyboard, -1.082104F, 0.0174533F, 0F);
Back = new ModelRenderer(this, 77, 0); keyboardBottom = new ModelRenderer(this, 120, 26);
Back.addBox(0F, 0F, 0F, 17, 20, 18); keyboardBottom.addBox(0F, -2.5F, -0.5F, 8, 4, 1);
Back.setRotationPoint(7F, -7F, -9F); keyboardBottom.setRotationPoint(-4F, 14F, -5F);
Back.setTextureSize(256, 256); keyboardBottom.setTextureSize(256, 128);
Back.mirror = true; keyboardBottom.mirror = true;
setRotation(Back, 0F, 0F, 0F); setRotation(keyboardBottom, -0.9075712F, 0F, 0F);
Panel = new ModelRenderer(this, 0, 43); keyboardSupportExt1 = new ModelRenderer(this, 138, 26);
Panel.addBox(-2F, -8F, -7.5F, 2, 12, 15); keyboardSupportExt1.addBox(0F, 0F, -1F, 1, 1, 1);
Panel.setRotationPoint(-13F, 2F, 0F); keyboardSupportExt1.setRotationPoint(2F, 14F, -5F);
Panel.setTextureSize(256, 256); keyboardSupportExt1.setTextureSize(256, 128);
Panel.mirror = true; keyboardSupportExt1.mirror = true;
setRotation(Panel, 0F, 0F, -0.2478574F); setRotation(keyboardSupportExt1, 0F, 0F, 0F);
PanelStem = new ModelRenderer(this, 0, 71); keyboardSupportExt2 = new ModelRenderer(this, 138, 26);
PanelStem.addBox(-7F, 0F, 0F, 7, 4, 4); keyboardSupportExt2.addBox(0F, 0F, -1F, 1, 1, 1);
PanelStem.setRotationPoint(-7F, -2F, -2F); keyboardSupportExt2.setRotationPoint(-3F, 14F, -5F);
PanelStem.setTextureSize(256, 256); keyboardSupportExt2.setTextureSize(256, 128);
PanelStem.mirror = true; keyboardSupportExt2.mirror = true;
setRotation(PanelStem, 0F, 0F, -0.2230717F); setRotation(keyboardSupportExt2, 0F, 0F, 0F);
KeyboardStem = new ModelRenderer(this, 0, 80); keyboardSupport1 = new ModelRenderer(this, 142, 20);
KeyboardStem.addBox(-7F, 0F, -2F, 7, 1, 4); keyboardSupport1.addBox(0F, -1F, 0F, 1, 2, 4);
KeyboardStem.setRotationPoint(-7F, 8F, 0F); keyboardSupport1.setRotationPoint(-3F, 14F, -5F);
KeyboardStem.setTextureSize(256, 256); keyboardSupport1.setTextureSize(256, 128);
KeyboardStem.mirror = true; keyboardSupport1.mirror = true;
setRotation(KeyboardStem, 0F, 0F, -0.3965719F); setRotation(keyboardSupport1, 0F, 0F, 0F);
Keyboard = new ModelRenderer(this, 0, 86); keyboardSupport2 = new ModelRenderer(this, 142, 20);
Keyboard.addBox(-5F, 0F, -5F, 5, 1, 10); keyboardSupport2.addBox(0F, -1F, 0F, 1, 2, 4);
Keyboard.setRotationPoint(-12F, 10.5F, 0F); keyboardSupport2.setRotationPoint(2F, 14F, -5F);
Keyboard.setTextureSize(256, 256); keyboardSupport2.setTextureSize(256, 128);
Keyboard.mirror = true; keyboardSupport2.mirror = true;
setRotation(Keyboard, 0F, 0F, -0.2230717F); setRotation(keyboardSupport2, 0F, 0F, 0F);
LaserBase = new ModelRenderer(this, 0, 98); monitor1back = new ModelRenderer(this, 88, 32);
LaserBase.addBox(0F, 0F, 0F, 10, 5, 10); monitor1back.addBox(-13F, -3F, 0F, 12, 6, 1);
LaserBase.setRotationPoint(-5F, 12F, -5F); monitor1back.setRotationPoint(-8F, 3F, -3F);
LaserBase.setTextureSize(256, 256); monitor1back.setTextureSize(256, 128);
LaserBase.mirror = true; monitor1back.mirror = true;
setRotation(LaserBase, 0F, 0F, 0F); setRotation(monitor1back, 0.0872665F, -0.2094395F, 0F);
LegRight = new ModelRenderer(this, 0, 114); monitor2back = new ModelRenderer(this, 88, 32);
LegRight.addBox(0F, 0F, 0F, 6, 26, 4); monitor2back.addBox(0F, -4F, 0F, 12, 6, 1);
LegRight.setRotationPoint(-3F, -4F, -23F); monitor2back.setRotationPoint(-6F, 4F, -3F);
LegRight.setTextureSize(256, 256); monitor2back.setTextureSize(256, 128);
LegRight.mirror = true; monitor2back.mirror = true;
setRotation(LegRight, 0F, 0F, 0F); setRotation(monitor2back, 0.0872665F, 0F, 0F);
UpperLegRight = new ModelRenderer(this, 21, 114); monitor3back = new ModelRenderer(this, 88, 32);
UpperLegRight.addBox(0F, 0F, 0F, 4, 5, 13); monitor3back.addBox(1F, -3F, 0F, 12, 6, 1);
UpperLegRight.setRotationPoint(-2F, 0F, -22F); monitor3back.setRotationPoint(8F, 3F, -3F);
UpperLegRight.setTextureSize(256, 256); monitor3back.setTextureSize(256, 128);
UpperLegRight.mirror = true; monitor3back.mirror = true;
setRotation(UpperLegRight, 0F, 0F, 0F); setRotation(monitor3back, 0.0872665F, 0.2094395F, 0F);
ToeTopRight1 = new ModelRenderer(this, 21, 134); monitorBar1 = new ModelRenderer(this, 114, 36);
ToeTopRight1.addBox(0F, 0F, 0F, 3, 1, 3); monitorBar1.addBox(-3.5F, -2F, -0.2F, 4, 2, 1);
ToeTopRight1.setRotationPoint(-4F, 19F, -20.5F); monitorBar1.setRotationPoint(-6F, 4F, -3F);
ToeTopRight1.setTextureSize(256, 256); monitorBar1.setTextureSize(256, 128);
ToeTopRight1.mirror = true; monitorBar1.mirror = true;
setRotation(ToeTopRight1, 0F, 0F, 0F); setRotation(monitorBar1, 0.0872665F, -0.0523599F, 0F);
ToeTopRight2 = new ModelRenderer(this, 21, 134); monitorBar2 = new ModelRenderer(this, 114, 36);
ToeTopRight2.addBox(0F, 0F, 0F, 3, 1, 3); monitorBar2.addBox(0.5F, -2F, -0.2F, 4, 2, 1);
ToeTopRight2.setRotationPoint(1.5F, 19F, -20.5F); monitorBar2.setRotationPoint(5F, 4F, -3F);
ToeTopRight2.setTextureSize(256, 256); monitorBar2.setTextureSize(256, 128);
ToeTopRight2.mirror = true; monitorBar2.mirror = true;
setRotation(ToeTopRight2, 0F, 0F, 0F); setRotation(monitorBar2, 0.0872665F, 0.0523599F, 0F);
ToeRight1 = new ModelRenderer(this, 35, 134); led1 = new ModelRenderer(this, 0, 0);
ToeRight1.addBox(0F, 0F, 0F, 3, 6, 3); led1.addBox(-2F, 4.5F, -1.9F, 1, 1, 1);
ToeRight1.setRotationPoint(1.5F, 22F, -20.5F); led1.setRotationPoint(-8F, 3F, -3F);
ToeRight1.setTextureSize(256, 256); led1.setTextureSize(256, 128);
ToeRight1.mirror = true; led1.mirror = true;
setRotation(ToeRight1, 1.047198F, 0.3490659F, 0F); setRotation(led1, 0.0872665F, -0.2094395F, 0F);
LegHoldRight1 = new ModelRenderer(this, 0, 146); led2 = new ModelRenderer(this, 0, 0);
LegHoldRight1.addBox(0F, 0F, 0F, 2, 3, 12); led2.addBox(12F, 4.466667F, -1.9F, 1, 1, 1);
LegHoldRight1.setRotationPoint(2F, 2F, -18F); led2.setRotationPoint(-7F, 3F, -3F);
LegHoldRight1.setTextureSize(256, 256); led2.setTextureSize(256, 128);
LegHoldRight1.mirror = true; led2.mirror = true;
setRotation(LegHoldRight1, 0.6543436F, 0F, 0F); setRotation(led2, 0.0872665F, 0F, 0F);
LegHoldRight2 = new ModelRenderer(this, 0, 146); led3 = new ModelRenderer(this, 0, 0);
LegHoldRight2.addBox(0F, 0F, 0F, 2, 3, 12); led3.addBox(12F, 4.5F, -1.9F, 1, 1, 1);
LegHoldRight2.setRotationPoint(-4F, 2F, -18F); led3.setRotationPoint(8F, 3F, -3F);
LegHoldRight2.setTextureSize(256, 256); led3.setTextureSize(256, 128);
LegHoldRight2.mirror = true; led3.mirror = true;
setRotation(LegHoldRight2, 0.6543436F, 0F, 0F); setRotation(led3, 0.0872665F, 0.2094395F, 0F);
FootBaseRight = new ModelRenderer(this, 0, 162); monitorMount1 = new ModelRenderer(this, 114, 32);
FootBaseRight.addBox(0F, 0F, 0F, 8, 2, 7); monitorMount1.addBox(0F, -1F, 0F, 2, 2, 2);
FootBaseRight.setRotationPoint(-4F, 22F, -24F); monitorMount1.setRotationPoint(-4F, 3F, -3F);
FootBaseRight.setTextureSize(256, 256); monitorMount1.setTextureSize(256, 128);
FootBaseRight.mirror = true; monitorMount1.mirror = true;
setRotation(FootBaseRight, 0F, 0F, 0F); setRotation(monitorMount1, 0F, 0F, 0F);
ToeRight2 = new ModelRenderer(this, 35, 134); monitorMount2 = new ModelRenderer(this, 114, 32);
ToeRight2.addBox(0F, 0F, 0F, 3, 6, 3); monitorMount2.addBox(0F, -1F, 0F, 2, 2, 2);
ToeRight2.setRotationPoint(-4.5F, 22F, -20.5F); monitorMount2.setRotationPoint(2F, 3F, -3F);
ToeRight2.setTextureSize(256, 256); monitorMount2.setTextureSize(256, 128);
ToeRight2.mirror = true; monitorMount2.mirror = true;
setRotation(ToeRight2, 1.047198F, -0.3490659F, 0F); setRotation(monitorMount2, 0F, 0F, 0F);
FootBaseLeft = new ModelRenderer(this, 0, 178); frame1 = new ModelRenderer(this, 0, 0);
FootBaseLeft.addBox(0F, 0F, 0F, 8, 2, 7); frame1.addBox(0F, 0F, 0F, 32, 29, 12);
FootBaseLeft.setRotationPoint(-4F, 22F, 17F); frame1.setRotationPoint(-16F, -8F, -1F);
FootBaseLeft.setTextureSize(256, 256); frame1.setTextureSize(256, 128);
FootBaseLeft.mirror = true; frame1.mirror = true;
setRotation(FootBaseLeft, 0F, 0F, 0F); setRotation(frame1, 0F, 0F, 0F);
UpperLegLeft = new ModelRenderer(this, 0, 189); frame3 = new ModelRenderer(this, 0, 0);
UpperLegLeft.addBox(0F, 0F, 0F, 4, 5, 13); frame3.addBox(0F, 0F, 0F, 32, 29, 12);
UpperLegLeft.setRotationPoint(-2F, 0F, 9F); frame3.setRotationPoint(-16F, -8F, 28F);
UpperLegLeft.setTextureSize(256, 256); frame3.setTextureSize(256, 128);
UpperLegLeft.mirror = true; frame3.mirror = true;
setRotation(UpperLegLeft, 0F, 0F, 0F); setRotation(frame3, 0F, 0F, 0F);
LegHoldLeft1 = new ModelRenderer(this, 0, 208); plate5 = new ModelRenderer(this, 88, 90);
LegHoldLeft1.addBox(0F, 0F, -12F, 2, 3, 12); plate5.addBox(0F, 0F, 0F, 32, 5, 15);
LegHoldLeft1.setRotationPoint(2F, 2F, 18F); plate5.setRotationPoint(-16F, 16F, 12F);
LegHoldLeft1.setTextureSize(256, 256); plate5.setTextureSize(256, 128);
LegHoldLeft1.mirror = true; plate5.mirror = true;
setRotation(LegHoldLeft1, -0.6543414F, 0F, 0F); setRotation(plate5, 0F, 0F, 0F);
ToeTopLeft2 = new ModelRenderer(this, 31, 178); bracket1 = new ModelRenderer(this, 16, 85);
ToeTopLeft2.addBox(0F, 0F, 0F, 3, 1, 3); bracket1.addBox(0F, 0F, 0F, 5, 5, 2);
ToeTopLeft2.setRotationPoint(1.5F, 19F, 17.5F); bracket1.setRotationPoint(-21F, -5F, 0F);
ToeTopLeft2.setTextureSize(256, 256); bracket1.setTextureSize(256, 128);
ToeTopLeft2.mirror = true; bracket1.mirror = true;
setRotation(ToeTopLeft2, 0F, 0F, 0F); setRotation(bracket1, 0F, 0F, 0F);
ToeTopLeft1 = new ModelRenderer(this, 31, 178); bracket2 = new ModelRenderer(this, 16, 85);
ToeTopLeft1.addBox(0F, 0F, 0F, 3, 1, 3); bracket2.addBox(0F, 0F, 0F, 5, 5, 2);
ToeTopLeft1.setRotationPoint(-4F, 19F, 17.5F); bracket2.setRotationPoint(-21F, -5F, 8F);
ToeTopLeft1.setTextureSize(256, 256); bracket2.setTextureSize(256, 128);
ToeTopLeft1.mirror = true; bracket2.mirror = true;
setRotation(ToeTopLeft1, 0F, 0F, 0F); setRotation(bracket2, 0F, 0F, 0F);
LegHoldLeft2 = new ModelRenderer(this, 0, 208); bracket3 = new ModelRenderer(this, 16, 85);
LegHoldLeft2.addBox(0F, 0F, -12F, 2, 3, 12); bracket3.addBox(0F, 0F, 0F, 5, 5, 2);
LegHoldLeft2.setRotationPoint(-4F, 2F, 18F); bracket3.setRotationPoint(-21F, -5F, 29F);
LegHoldLeft2.setTextureSize(256, 256); bracket3.setTextureSize(256, 128);
LegHoldLeft2.mirror = true; bracket3.mirror = true;
setRotation(LegHoldLeft2, -0.6543414F, 0F, 0F); setRotation(bracket3, 0F, 0F, 0F);
ToeLeft1 = new ModelRenderer(this, 44, 178); bracket4 = new ModelRenderer(this, 16, 85);
ToeLeft1.addBox(0F, 0F, -3F, 3, 6, 3); bracket4.addBox(0F, 0F, 0F, 5, 5, 2);
ToeLeft1.setRotationPoint(1.5F, 22F, 20.5F); bracket4.setRotationPoint(-21F, -5F, 37F);
ToeLeft1.setTextureSize(256, 256); bracket4.setTextureSize(256, 128);
ToeLeft1.mirror = true; bracket4.mirror = true;
setRotation(ToeLeft1, -1.047198F, -0.3490659F, 0F); setRotation(bracket4, 0F, 0F, 0F);
ToeLeft2 = new ModelRenderer(this, 44, 178); bracket5 = new ModelRenderer(this, 16, 85);
ToeLeft2.addBox(0F, 0F, -3F, 3, 6, 3); bracket5.addBox(0F, 0F, 0F, 5, 5, 2);
ToeLeft2.setRotationPoint(-4.5F, 22F, 20.5F); bracket5.setRotationPoint(16F, -5F, 0F);
ToeLeft2.setTextureSize(256, 256); bracket5.setTextureSize(256, 128);
ToeLeft2.mirror = true; bracket5.mirror = true;
setRotation(ToeLeft2, -1.047198F, 0.3490659F, 0F); setRotation(bracket5, 0F, 0F, 0F);
LegLeft = new ModelRenderer(this, 35, 189); bracket5.mirror = false;
LegLeft.addBox(0F, 0F, 0F, 6, 26, 4); bracket6 = new ModelRenderer(this, 16, 85);
LegLeft.setRotationPoint(-3F, -4F, 19F); bracket6.addBox(0F, 0F, 0F, 5, 5, 2);
LegLeft.setTextureSize(256, 256); bracket6.setRotationPoint(16F, -5F, 8F);
LegLeft.mirror = true; bracket6.setTextureSize(256, 128);
setRotation(LegLeft, 0F, 0F, 0F); bracket6.mirror = true;
RightAxil = new ModelRenderer(this, 78, 43); setRotation(bracket6, 0F, 0F, 0F);
RightAxil.addBox(0F, 0F, 0F, 4, 4, 6); bracket7 = new ModelRenderer(this, 16, 85);
RightAxil.setRotationPoint(17F, 7F, -15F); bracket7.addBox(0F, 0F, 0F, 5, 5, 2);
RightAxil.setTextureSize(256, 256); bracket7.setRotationPoint(16F, -5F, 29F);
RightAxil.mirror = true; bracket7.setTextureSize(256, 128);
setRotation(RightAxil, 0F, 0F, 0F); bracket7.mirror = true;
RightBackUpperLeg = new ModelRenderer(this, 78, 54); setRotation(bracket7, 0F, 0F, 0F);
RightBackUpperLeg.addBox(-2.5F, -3F, 0F, 5, 12, 1); bracket8 = new ModelRenderer(this, 16, 85);
RightBackUpperLeg.setRotationPoint(19F, 9F, -15.95556F); bracket8.addBox(0F, 0F, 0F, 5, 5, 2);
RightBackUpperLeg.setTextureSize(256, 256); bracket8.setRotationPoint(16F, -5F, 37F);
RightBackUpperLeg.mirror = true; bracket8.setTextureSize(256, 128);
setRotation(RightBackUpperLeg, 0F, 0F, 0F); bracket8.mirror = true;
RightBackLowerLeg = new ModelRenderer(this, 78, 68); setRotation(bracket8, 0F, 0F, 0F);
RightBackLowerLeg.addBox(-2F, 7F, -0.5F, 4, 6, 2); bracket8.mirror = false;
RightBackLowerLeg.setRotationPoint(19F, 9F, -16F); bracketPlate1 = new ModelRenderer(this, 30, 85);
RightBackLowerLeg.setTextureSize(256, 256); bracketPlate1.addBox(0F, 0F, 0F, 1, 5, 6);
RightBackLowerLeg.mirror = true; bracketPlate1.setRotationPoint(-17F, -5F, 2F);
setRotation(RightBackLowerLeg, 0F, 0F, 0F); bracketPlate1.setTextureSize(256, 128);
RightBackFoot = new ModelRenderer(this, 99, 43); bracketPlate1.mirror = true;
RightBackFoot.addBox(-3F, 0F, -2.5F, 8, 2, 5); setRotation(bracketPlate1, 0F, 0F, 0F);
RightBackFoot.setRotationPoint(19F, 22F, -15.5F); bracketPlate2 = new ModelRenderer(this, 30, 85);
RightBackFoot.setTextureSize(256, 256); bracketPlate2.addBox(0F, 0F, 0F, 1, 5, 6);
RightBackFoot.mirror = true; bracketPlate2.setRotationPoint(-17F, -5F, 31F);
setRotation(RightBackFoot, 0F, 0F, 0F); bracketPlate2.setTextureSize(256, 128);
LeftAxil = new ModelRenderer(this, 78, 80); bracketPlate2.mirror = true;
LeftAxil.addBox(0F, 0F, 0F, 4, 4, 6); setRotation(bracketPlate2, 0F, 0F, 0F);
LeftAxil.setRotationPoint(17F, 7F, 9F); bracketPlate3 = new ModelRenderer(this, 30, 85);
LeftAxil.setTextureSize(256, 256); bracketPlate3.addBox(0F, 0F, 0F, 1, 5, 6);
LeftAxil.mirror = true; bracketPlate3.setRotationPoint(16F, -5F, 2F);
setRotation(LeftAxil, 0F, 0F, 0F); bracketPlate3.setTextureSize(256, 128);
LeftBackUpperLeg = new ModelRenderer(this, 78, 91); bracketPlate3.mirror = true;
LeftBackUpperLeg.addBox(-2.5F, -3F, 0F, 5, 12, 1); setRotation(bracketPlate3, 0F, 0F, 0F);
LeftBackUpperLeg.setRotationPoint(19F, 9F, 15.04444F); bracketPlate4 = new ModelRenderer(this, 30, 85);
LeftBackUpperLeg.setTextureSize(256, 256); bracketPlate4.addBox(0F, 0F, 0F, 1, 5, 6);
LeftBackUpperLeg.mirror = true; bracketPlate4.setRotationPoint(16F, -5F, 31F);
setRotation(LeftBackUpperLeg, 0F, 0F, 0F); bracketPlate4.setTextureSize(256, 128);
LeftBackLowerLeg = new ModelRenderer(this, 78, 105); bracketPlate4.mirror = true;
LeftBackLowerLeg.addBox(-2F, 7F, -0.5F, 4, 6, 2); setRotation(bracketPlate4, 0F, 0F, 0F);
LeftBackLowerLeg.setRotationPoint(19F, 9F, 15F); supportBeam1 = new ModelRenderer(this, 0, 85);
LeftBackLowerLeg.setTextureSize(256, 256); supportBeam1.addBox(0F, 0F, 0F, 4, 28, 8);
LeftBackLowerLeg.mirror = true; supportBeam1.setRotationPoint(-22F, -6F, 1F);
setRotation(LeftBackLowerLeg, 0F, 0F, 0F); supportBeam1.setTextureSize(256, 128);
LeftBackFoot = new ModelRenderer(this, 99, 80); supportBeam1.mirror = true;
LeftBackFoot.addBox(-3F, 0F, -2.5F, 8, 2, 5); setRotation(supportBeam1, 0F, 0F, 0F);
LeftBackFoot.setRotationPoint(19F, 22F, 15.5F); supportBeam2 = new ModelRenderer(this, 0, 85);
LeftBackFoot.setTextureSize(256, 256); supportBeam2.addBox(0F, 0F, 0F, 4, 28, 8);
LeftBackFoot.mirror = true; supportBeam2.setRotationPoint(-22F, -6F, 30F);
setRotation(LeftBackFoot, 0F, 0F, 0F); supportBeam2.setTextureSize(256, 128);
Laser1 = new ModelRenderer(this, 35, 43); supportBeam2.mirror = true;
Laser1.addBox(0F, 0F, 0F, 2, 4, 2); setRotation(supportBeam2, 0F, 0F, 0F);
Laser1.setRotationPoint(2.5F, 17F, 2.5F); supportBeam3 = new ModelRenderer(this, 0, 85);
Laser1.setTextureSize(256, 256); supportBeam3.addBox(0F, 0F, 0F, 4, 28, 8);
Laser1.mirror = true; supportBeam3.setRotationPoint(18F, -6F, 1F);
setRotation(Laser1, 0F, 0F, 0F); supportBeam3.setTextureSize(256, 128);
Laser2 = new ModelRenderer(this, 35, 43); supportBeam3.mirror = true;
Laser2.addBox(0F, 0F, 0F, 2, 4, 2); setRotation(supportBeam3, 0F, 0F, 0F);
Laser2.setRotationPoint(2.5F, 17F, -4.5F); supportBeam4 = new ModelRenderer(this, 0, 85);
Laser2.setTextureSize(256, 256); supportBeam4.addBox(0F, 0F, 0F, 4, 28, 8);
Laser2.mirror = true; supportBeam4.setRotationPoint(18F, -6F, 30F);
setRotation(Laser2, 0F, 0F, 0F); supportBeam4.setTextureSize(256, 128);
Laser3 = new ModelRenderer(this, 35, 43); supportBeam4.mirror = true;
Laser3.addBox(0F, 0F, 0F, 2, 4, 2); setRotation(supportBeam4, 0F, 0F, 0F);
Laser3.setRotationPoint(-4.5F, 17F, 2.5F); supportBeam4.mirror = false;
Laser3.setTextureSize(256, 256); foot1 = new ModelRenderer(this, 44, 85);
Laser3.mirror = true; foot1.addBox(0F, 0F, 0F, 7, 2, 10);
setRotation(Laser3, 0F, 0F, 0F); foot1.setRotationPoint(-23F, 22F, 0F);
Laser4 = new ModelRenderer(this, 35, 43); foot1.setTextureSize(256, 128);
Laser4.addBox(0F, 0F, 0F, 2, 4, 2); foot1.mirror = true;
Laser4.setRotationPoint(-4.5F, 17F, -4.5F); setRotation(foot1, 0F, 0F, 0F);
Laser4.setTextureSize(256, 256); foot2 = new ModelRenderer(this, 44, 85);
Laser4.mirror = true; foot2.addBox(0F, 0F, 0F, 7, 2, 10);
setRotation(Laser4, 0F, 0F, 0F); foot2.setRotationPoint(-23F, 22F, 29F);
foot2.setTextureSize(256, 128);
foot2.mirror = true;
setRotation(foot2, 0F, 0F, 0F);
foot3 = new ModelRenderer(this, 44, 85);
foot3.addBox(0F, 0F, 0F, 7, 2, 10);
foot3.setRotationPoint(16F, 22F, 29F);
foot3.setTextureSize(256, 128);
foot3.mirror = true;
setRotation(foot3, 0F, 0F, 0F);
foot4 = new ModelRenderer(this, 44, 85);
foot4.addBox(0F, 0F, 0F, 7, 2, 10);
foot4.setRotationPoint(16F, 22F, 0F);
foot4.setTextureSize(256, 128);
foot4.mirror = true;
setRotation(foot4, 0F, 0F, 0F);
core = new ModelRenderer(this, 0, 41);
core.addBox(0F, 0F, 0F, 30, 27, 17);
core.setRotationPoint(-15F, -7F, 11F);
core.setTextureSize(256, 128);
core.mirror = true;
setRotation(core, 0F, 0F, 0F);
powerCable1a = new ModelRenderer(this, 88, 39);
powerCable1a.addBox(0F, 0F, 0F, 6, 2, 11);
powerCable1a.setRotationPoint(-3F, 20F, 2F);
powerCable1a.setTextureSize(256, 128);
powerCable1a.mirror = true;
setRotation(powerCable1a, 0F, 0F, 0F);
powerCable1b = new ModelRenderer(this, 94, 52);
powerCable1b.addBox(0F, 0F, 0F, 6, 3, 6);
powerCable1b.setRotationPoint(-3F, 20F, 13F);
powerCable1b.setTextureSize(256, 128);
powerCable1b.mirror = true;
setRotation(powerCable1b, 0F, 0F, 0F);
powerCable2 = new ModelRenderer(this, 42, 109);
powerCable2.addBox(0F, 0F, 0F, 9, 6, 6);
powerCable2.setRotationPoint(14F, 13F, 13F);
powerCable2.setTextureSize(256, 128);
powerCable2.mirror = true;
setRotation(powerCable2, 0F, 0F, 0F);
powerCable3 = new ModelRenderer(this, 42, 109);
powerCable3.addBox(0F, 0F, 0F, 9, 6, 6);
powerCable3.setRotationPoint(-23F, 13F, 13F);
powerCable3.setTextureSize(256, 128);
powerCable3.mirror = true;
setRotation(powerCable3, 0F, 0F, 0F);
powerConnector1 = new ModelRenderer(this, 94, 61);
powerConnector1.addBox(0F, 0F, 0F, 8, 1, 8);
powerConnector1.setRotationPoint(-4F, 23F, 12F);
powerConnector1.setTextureSize(256, 128);
powerConnector1.mirror = true;
setRotation(powerConnector1, 0F, 0F, 0F);
powerConnector2a = new ModelRenderer(this, 24, 105);
powerConnector2a.addBox(0F, 0F, 0F, 1, 8, 8);
powerConnector2a.setRotationPoint(23F, 12F, 12F);
powerConnector2a.setTextureSize(256, 128);
powerConnector2a.mirror = true;
setRotation(powerConnector2a, 0F, 0F, 0F);
powerConnector2b = new ModelRenderer(this, 24, 105);
powerConnector2b.addBox(0F, 0F, 0F, 1, 8, 8);
powerConnector2b.setRotationPoint(16F, 12F, 12F);
powerConnector2b.setTextureSize(256, 128);
powerConnector2b.mirror = true;
setRotation(powerConnector2b, 0F, 0F, 0F);
powerCpnnector3a = new ModelRenderer(this, 24, 105);
powerCpnnector3a.addBox(0F, 0F, 0F, 1, 8, 8);
powerCpnnector3a.setRotationPoint(-24F, 12F, 12F);
powerCpnnector3a.setTextureSize(256, 128);
powerCpnnector3a.mirror = true;
setRotation(powerCpnnector3a, 0F, 0F, 0F);
powerConnector3b = new ModelRenderer(this, 24, 105);
powerConnector3b.addBox(0F, 0F, 0F, 1, 8, 8);
powerConnector3b.setRotationPoint(-17F, 12F, 12F);
powerConnector3b.setTextureSize(256, 128);
powerConnector3b.mirror = true;
setRotation(powerConnector3b, 0F, 0F, 0F);
frame2a = new ModelRenderer(this, 88, 0);
frame2a.addBox(0F, 0F, 0F, 32, 5, 15);
frame2a.setRotationPoint(-16F, -8F, 12F);
frame2a.setTextureSize(256, 128);
frame2a.mirror = true;
setRotation(frame2a, 0F, 0F, 0F);
frame2b = new ModelRenderer(this, 126, 50);
frame2b.addBox(0F, 0F, 0F, 32, 5, 15);
frame2b.setRotationPoint(-16F, -2F, 12F);
frame2b.setTextureSize(256, 128);
frame2b.mirror = true;
setRotation(frame2b, 0F, 0F, 0F);
frame2c = new ModelRenderer(this, 126, 50);
frame2c.addBox(0F, 0F, 0F, 32, 5, 15);
frame2c.setRotationPoint(-16F, 4F, 12F);
frame2c.setTextureSize(256, 128);
frame2c.mirror = true;
setRotation(frame2c, 0F, 0F, 0F);
frame2d = new ModelRenderer(this, 88, 70);
frame2d.addBox(0F, 0F, 0F, 32, 5, 15);
frame2d.setRotationPoint(-16F, 10F, 12F);
frame2d.setTextureSize(256, 128);
frame2d.mirror = true;
setRotation(frame2d, 0F, 0F, 0F);
monitor1 = new ModelRenderer(this, 88, 20);
monitor1.addBox(-14F, -5F, -2F, 14, 10, 2);
monitor1.setRotationPoint(-8F, 3F, -3F);
monitor1.setTextureSize(256, 128);
monitor1.mirror = true;
setRotation(monitor1, 0.0872665F, -0.2094395F, 0F);
monitor2 = new ModelRenderer(this, 88, 20);
monitor2.addBox(0F, -5F, -2F, 14, 10, 2);
monitor2.setRotationPoint(-7F, 3F, -3F);
monitor2.setTextureSize(256, 128);
monitor2.mirror = true;
setRotation(monitor2, 0.0872665F, 0F, 0F);
monitor3 = new ModelRenderer(this, 88, 20);
monitor3.addBox(0F, -5F, -2F, 14, 10, 2);
monitor3.setRotationPoint(8F, 3F, -3F);
monitor3.setTextureSize(256, 128);
monitor3.mirror = true;
setRotation(monitor3, 0.0872665F, 0.2094395F, 0F);
} }
public void render(float size, boolean on) public void render(float size, boolean on)
{ {
Base.render(size); keyboard.render(size);
Back.render(size); keyboardBottom.render(size);
keyboardSupportExt1.render(size);
keyboardSupportExt2.render(size);
keyboardSupport1.render(size);
keyboardSupport2.render(size);
monitor1back.render(size);
monitor2back.render(size);
monitor3back.render(size);
monitorBar1.render(size);
monitorBar2.render(size);
if(on) if(on)
{ {
MekanismRenderer.glowOn(); MekanismRenderer.glowOn();
} }
Panel.render(size); led1.render(size);
led2.render(size);
led3.render(size);
monitor1.render(size);
monitor2.render(size);
monitor3.render(size);
if(on) if(on)
{ {
MekanismRenderer.glowOff(); MekanismRenderer.glowOff();
} }
PanelStem.render(size); monitorMount1.render(size);
KeyboardStem.render(size); monitorMount2.render(size);
Keyboard.render(size); frame1.render(size);
LaserBase.render(size); frame3.render(size);
LegRight.render(size); plate5.render(size);
UpperLegRight.render(size); bracket1.render(size);
ToeTopRight1.render(size); bracket2.render(size);
ToeTopRight2.render(size); bracket3.render(size);
ToeRight1.render(size); bracket4.render(size);
LegHoldRight1.render(size); bracket5.render(size);
LegHoldRight2.render(size); bracket6.render(size);
FootBaseRight.render(size); bracket7.render(size);
ToeRight2.render(size); bracket8.render(size);
FootBaseLeft.render(size); bracketPlate1.render(size);
UpperLegLeft.render(size); bracketPlate2.render(size);
LegHoldLeft1.render(size); bracketPlate3.render(size);
ToeTopLeft2.render(size); bracketPlate4.render(size);
ToeTopLeft1.render(size); supportBeam1.render(size);
LegHoldLeft2.render(size); supportBeam2.render(size);
ToeLeft1.render(size); supportBeam3.render(size);
ToeLeft2.render(size); supportBeam4.render(size);
LegLeft.render(size); foot1.render(size);
RightAxil.render(size); foot2.render(size);
RightBackUpperLeg.render(size); foot3.render(size);
RightBackLowerLeg.render(size); foot4.render(size);
RightBackFoot.render(size); core.render(size);
LeftAxil.render(size); powerCable1a.render(size);
LeftBackUpperLeg.render(size); powerCable1b.render(size);
LeftBackLowerLeg.render(size); powerCable2.render(size);
LeftBackFoot.render(size); powerCable3.render(size);
Laser1.render(size); powerConnector1.render(size);
Laser2.render(size); powerConnector2a.render(size);
Laser3.render(size); powerConnector2b.render(size);
Laser4.render(size); powerCpnnector3a.render(size);
powerConnector3b.render(size);
frame2a.render(size);
frame2b.render(size);
frame2c.render(size);
frame2d.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.rotateAngleX = x;
model.rotateAngleY = y; model.rotateAngleY = y;

View file

@ -106,10 +106,10 @@ public class MachineRenderingHandler implements ISimpleBlockRenderingHandler
else if(type == MachineType.DIGITAL_MINER) else if(type == MachineType.DIGITAL_MINER)
{ {
GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F); GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
GL11.glRotatef(90F, 0.0F, 1.0F, 0.0F); GL11.glRotatef(-180F, 0.0F, 1.0F, 0.0F);
GL11.glTranslatef(-0.2F, -0.3F, 0.0F); GL11.glTranslatef(0.35F, 0.1F, 0.0F);
Minecraft.getMinecraft().renderEngine.bindTexture(MekanismUtils.getResource(ResourceType.RENDER, "DigitalMiner.png")); Minecraft.getMinecraft().renderEngine.bindTexture(MekanismUtils.getResource(ResourceType.RENDER, "DigitalMiner.png"));
digitalMiner.render(0.03125F, false); digitalMiner.render(0.022F, false);
} }
else if(type == MachineType.ROTARY_CONDENSENTRATOR) else if(type == MachineType.ROTARY_CONDENSENTRATOR)
{ {

View file

@ -33,10 +33,22 @@ public class RenderDigitalMiner extends TileEntitySpecialRenderer
switch(tileEntity.facing) switch(tileEntity.facing)
{ {
case 2: GL11.glRotatef(90, 0.0F, 1.0F, 0.0F); break; case 2:
case 3: GL11.glRotatef(270, 0.0F, 1.0F, 0.0F); break; GL11.glRotatef(0, 0.0F, 1.0F, 0.0F);
case 4: GL11.glRotatef(180, 0.0F, 1.0F, 0.0F); break; GL11.glTranslatef(0.0F, 0.0F, -1.0F);
case 5: GL11.glRotatef(0, 0.0F, 1.0F, 0.0F); break; break;
case 3:
GL11.glRotatef(180, 0.0F, 1.0F, 0.0F);
GL11.glTranslatef(0.0F, 0.0F, -1.0F);
break;
case 4:
GL11.glRotatef(90, 0.0F, 1.0F, 0.0F);
GL11.glTranslatef(0.0F, 0.0F, -1.0F);
break;
case 5:
GL11.glRotatef(270, 0.0F, 1.0F, 0.0F);
GL11.glTranslatef(0.0F, 0.0F, -1.0F);
break;
} }
GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F); GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);

View file

@ -34,6 +34,7 @@ import mekanism.common.inventory.container.ContainerFactory;
import mekanism.common.inventory.container.ContainerFilter; import mekanism.common.inventory.container.ContainerFilter;
import mekanism.common.inventory.container.ContainerFluidTank; import mekanism.common.inventory.container.ContainerFluidTank;
import mekanism.common.inventory.container.ContainerFluidicPlenisher; import mekanism.common.inventory.container.ContainerFluidicPlenisher;
import mekanism.common.inventory.container.ContainerFormulaicAssemblicator;
import mekanism.common.inventory.container.ContainerGasTank; import mekanism.common.inventory.container.ContainerGasTank;
import mekanism.common.inventory.container.ContainerInductionMatrix; import mekanism.common.inventory.container.ContainerInductionMatrix;
import mekanism.common.inventory.container.ContainerLaserAmplifier; import mekanism.common.inventory.container.ContainerLaserAmplifier;
@ -88,6 +89,7 @@ import mekanism.common.tile.TileEntityEnrichmentChamber;
import mekanism.common.tile.TileEntityFactory; import mekanism.common.tile.TileEntityFactory;
import mekanism.common.tile.TileEntityFluidTank; import mekanism.common.tile.TileEntityFluidTank;
import mekanism.common.tile.TileEntityFluidicPlenisher; import mekanism.common.tile.TileEntityFluidicPlenisher;
import mekanism.common.tile.TileEntityFormulaicAssemblicator;
import mekanism.common.tile.TileEntityGasTank; import mekanism.common.tile.TileEntityGasTank;
import mekanism.common.tile.TileEntityInductionCasing; import mekanism.common.tile.TileEntityInductionCasing;
import mekanism.common.tile.TileEntityInductionCell; import mekanism.common.tile.TileEntityInductionCell;
@ -372,6 +374,7 @@ public class CommonProxy implements IGuiProvider
usage.laserUsage = Mekanism.configuration.get("usage", "LaserUsage", 5000D).getDouble(); usage.laserUsage = Mekanism.configuration.get("usage", "LaserUsage", 5000D).getDouble();
usage.gasCentrifugeUsage = Mekanism.configuration.get("usage", "GasCentrifugeUsage", 100D).getDouble(); usage.gasCentrifugeUsage = Mekanism.configuration.get("usage", "GasCentrifugeUsage", 100D).getDouble();
usage.heavyWaterElectrolysisUsage = Mekanism.configuration.get("usage", "HeavyWaterElectrolysisUsage", 800D).getDouble(); usage.heavyWaterElectrolysisUsage = Mekanism.configuration.get("usage", "HeavyWaterElectrolysisUsage", 800D).getDouble();
usage.formulaicAssemblicatorUsage = Mekanism.configuration.get("usage", "FormulaicAssemblicatorUsage", 100D).getDouble();
Tier.loadConfig(); Tier.loadConfig();
@ -549,6 +552,8 @@ public class CommonProxy implements IGuiProvider
return new ContainerFilter(player.inventory, (TileEntityContainerBlock)tileEntity); return new ContainerFilter(player.inventory, (TileEntityContainerBlock)tileEntity);
case 55: case 55:
return new ContainerNull(player, (TileEntityContainerBlock)tileEntity); return new ContainerNull(player, (TileEntityContainerBlock)tileEntity);
case 56:
return new ContainerFormulaicAssemblicator(player.inventory, (TileEntityFormulaicAssemblicator)tileEntity);
} }
return null; return null;

View file

@ -10,7 +10,7 @@ import net.minecraft.world.World;
public class RecipeFormula public class RecipeFormula
{ {
public InventoryCrafting dummy = MekanismUtils.getDummyCraftingInv(); private InventoryCrafting dummy = MekanismUtils.getDummyCraftingInv();
public ItemStack[] input = new ItemStack[9]; public ItemStack[] input = new ItemStack[9];

View file

@ -1,6 +1,7 @@
package mekanism.common.inventory.container; package mekanism.common.inventory.container;
import mekanism.common.inventory.slot.SlotEnergy.SlotDischarge; import mekanism.common.inventory.slot.SlotEnergy.SlotDischarge;
import mekanism.common.inventory.slot.SlotOutput;
import mekanism.common.inventory.slot.SlotSpecific; import mekanism.common.inventory.slot.SlotSpecific;
import mekanism.common.item.ItemCraftingFormula; import mekanism.common.item.ItemCraftingFormula;
import mekanism.common.tile.TileEntityFormulaicAssemblicator; import mekanism.common.tile.TileEntityFormulaicAssemblicator;
@ -10,7 +11,12 @@ import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.inventory.Container; import net.minecraft.inventory.Container;
import net.minecraft.inventory.Slot; import net.minecraft.inventory.Slot;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraftforge.fluids.FluidContainerRegistry; import net.minecraft.util.IIcon;
import org.lwjgl.opengl.GL11;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class ContainerFormulaicAssemblicator extends Container public class ContainerFormulaicAssemblicator extends Container
{ {
@ -36,7 +42,34 @@ public class ContainerFormulaicAssemblicator extends Container
{ {
for(int slotX = 0; slotX < 3; slotX++) for(int slotX = 0; slotX < 3; slotX++)
{ {
addSlotToContainer(new Slot(tentity, slotX + slotY * 9 + 27, 26 + slotX * 18, 17 + slotY * 18)); addSlotToContainer(new Slot(tentity, slotX + slotY * 9 + 27, 26 + slotX * 18, 17 + slotY * 18) {
@Override
public boolean isItemValid(ItemStack stack)
{
return !tileEntity.autoMode;
}
@SideOnly(Side.CLIENT)
public boolean func_111238_b()
{
return !tileEntity.autoMode;
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getBackgroundIconIndex()
{
if(tileEntity.formula != null)
{
ItemStack stack = tileEntity.formula.input[getSlotIndex()-27];
GL11.glColor4f(1, 1, 1, 0.4F);
return stack != null ? stack.getIconIndex() : null;
}
return null;
}
});
} }
} }
@ -44,7 +77,7 @@ public class ContainerFormulaicAssemblicator extends Container
{ {
for(int slotX = 0; slotX < 2; slotX++) for(int slotX = 0; slotX < 2; slotX++)
{ {
addSlotToContainer(new Slot(tentity, slotX + slotY * 9 + 21, 116 + slotX * 18, 17 + slotY * 18)); addSlotToContainer(new SlotOutput(tentity, slotX + slotY * 9 + 21, 116 + slotX * 18, 17 + slotY * 18));
} }
} }
@ -92,22 +125,6 @@ public class ContainerFormulaicAssemblicator extends Container
stack = slotStack.copy(); stack = slotStack.copy();
if(ChargeUtils.canBeDischarged(slotStack)) if(ChargeUtils.canBeDischarged(slotStack))
{
if(slotID != 2)
{
if(!mergeItemStack(slotStack, 2, 3, false))
{
return null;
}
}
else {
if(!mergeItemStack(slotStack, 3, inventorySlots.size(), true))
{
return null;
}
}
}
else if(FluidContainerRegistry.isEmptyContainer(slotStack))
{ {
if(slotID != 0) if(slotID != 0)
{ {
@ -116,38 +133,60 @@ public class ContainerFormulaicAssemblicator extends Container
return null; return null;
} }
} }
else if(slotID == 0) else {
{ if(!mergeItemStack(slotStack, 34, inventorySlots.size(), true))
if(!mergeItemStack(slotStack, 3, inventorySlots.size(), true))
{ {
return null; return null;
} }
} }
} }
else if(slotID == 1) else if(slotStack.getItem() instanceof ItemCraftingFormula)
{ {
if(!mergeItemStack(slotStack, 3, inventorySlots.size(), true)) if(slotID != 1)
{ {
return null; if(!mergeItemStack(slotStack, 1, 2, false))
}
}
else {
if(slotID >= 3 && slotID <= 29)
{
if(!mergeItemStack(slotStack, 30, inventorySlots.size(), false))
{
return null;
}
}
else if(slotID > 29)
{
if(!mergeItemStack(slotStack, 3, 29, false))
{ {
return null; return null;
} }
} }
else { else {
if(!mergeItemStack(slotStack, 3, inventorySlots.size(), true)) if(!mergeItemStack(slotStack, 34, inventorySlots.size(), true))
{
return null;
}
}
}
else if(slotID >= 2 && slotID <= 19)
{
if(!mergeItemStack(slotStack, 34, inventorySlots.size(), true))
{
return null;
}
}
else if(tileEntity.formula == null || tileEntity.formula.isIngredient(tileEntity.getWorldObj(), slotStack))
{
if(!mergeItemStack(slotStack, 2, 20, false))
{
return null;
}
}
else {
if(slotID >= 34 && slotID <= 60)
{
if(!mergeItemStack(slotStack, 61, inventorySlots.size(), false))
{
return null;
}
}
else if(slotID > 60)
{
if(!mergeItemStack(slotStack, 34, 60, false))
{
return null;
}
}
else {
if(!mergeItemStack(slotStack, 34, inventorySlots.size(), true))
{ {
return null; return null;
} }

View file

@ -99,6 +99,7 @@ public class PacketConfigSync implements IMessageHandler<ConfigSyncMessage, IMes
dataStream.writeDouble(usage.fluidicPlenisherUsage); dataStream.writeDouble(usage.fluidicPlenisherUsage);
dataStream.writeDouble(usage.gasCentrifugeUsage); dataStream.writeDouble(usage.gasCentrifugeUsage);
dataStream.writeDouble(usage.heavyWaterElectrolysisUsage); dataStream.writeDouble(usage.heavyWaterElectrolysisUsage);
dataStream.writeDouble(usage.formulaicAssemblicatorUsage);
Tier.writeConfig(dataStream); Tier.writeConfig(dataStream);
@ -185,6 +186,7 @@ public class PacketConfigSync implements IMessageHandler<ConfigSyncMessage, IMes
usage.fluidicPlenisherUsage = dataStream.readDouble(); usage.fluidicPlenisherUsage = dataStream.readDouble();
usage.gasCentrifugeUsage = dataStream.readDouble(); usage.gasCentrifugeUsage = dataStream.readDouble();
usage.heavyWaterElectrolysisUsage = dataStream.readDouble(); usage.heavyWaterElectrolysisUsage = dataStream.readDouble();
usage.formulaicAssemblicatorUsage = dataStream.readDouble();
Tier.readConfig(dataStream); Tier.readConfig(dataStream);

View file

@ -8,7 +8,7 @@ import mekanism.generators.client.model.ModelBioGenerator;
import mekanism.generators.client.model.ModelGasGenerator; import mekanism.generators.client.model.ModelGasGenerator;
import mekanism.generators.client.model.ModelHeatGenerator; import mekanism.generators.client.model.ModelHeatGenerator;
import mekanism.generators.client.model.ModelSolarGenerator; import mekanism.generators.client.model.ModelSolarGenerator;
import mekanism.generators.client.model.ModelWindTurbine; import mekanism.generators.client.model.ModelWindGenerator;
import mekanism.generators.common.GeneratorsBlocks; import mekanism.generators.common.GeneratorsBlocks;
import mekanism.generators.common.block.BlockGenerator.GeneratorType; import mekanism.generators.common.block.BlockGenerator.GeneratorType;
import net.minecraft.block.Block; import net.minecraft.block.Block;
@ -30,7 +30,7 @@ public class BlockRenderingHandler implements ISimpleBlockRenderingHandler
public ModelBioGenerator bioGenerator = new ModelBioGenerator(); public ModelBioGenerator bioGenerator = new ModelBioGenerator();
public ModelHeatGenerator heatGenerator = new ModelHeatGenerator(); public ModelHeatGenerator heatGenerator = new ModelHeatGenerator();
public ModelGasGenerator hydrogenGenerator = new ModelGasGenerator(); public ModelGasGenerator hydrogenGenerator = new ModelGasGenerator();
public ModelWindTurbine windTurbine = new ModelWindTurbine(); public ModelWindGenerator windTurbine = new ModelWindGenerator();
@Override @Override
public void renderInventoryBlock(Block block, int metadata, int modelID, RenderBlocks renderer) public void renderInventoryBlock(Block block, int metadata, int modelID, RenderBlocks renderer)
@ -84,9 +84,9 @@ public class BlockRenderingHandler implements ISimpleBlockRenderingHandler
{ {
GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F); GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
GL11.glRotatef(180F, 0.0F, 1.0F, 0.0F); GL11.glRotatef(180F, 0.0F, 1.0F, 0.0F);
GL11.glTranslatef(0.0F, 0.35F, 0.0F); GL11.glTranslatef(0.0F, 0.4F, 0.0F);
Minecraft.getMinecraft().renderEngine.bindTexture(MekanismUtils.getResource(ResourceType.RENDER, "WindTurbine.png")); Minecraft.getMinecraft().renderEngine.bindTexture(MekanismUtils.getResource(ResourceType.RENDER, "WindGenerator.png"));
windTurbine.render(0.018F, 0); windTurbine.render(0.016F, 0);
} }
else if(metadata != 2) else if(metadata != 2)
{ {

View file

@ -21,7 +21,7 @@ import mekanism.generators.client.render.RenderIndustrialTurbine;
import mekanism.generators.client.render.RenderReactor; import mekanism.generators.client.render.RenderReactor;
import mekanism.generators.client.render.RenderSolarGenerator; import mekanism.generators.client.render.RenderSolarGenerator;
import mekanism.generators.client.render.RenderTurbineRotor; import mekanism.generators.client.render.RenderTurbineRotor;
import mekanism.generators.client.render.RenderWindTurbine; import mekanism.generators.client.render.RenderWindGenerator;
import mekanism.generators.client.render.item.GeneratorsItemRenderer; import mekanism.generators.client.render.item.GeneratorsItemRenderer;
import mekanism.generators.common.GeneratorsBlocks; import mekanism.generators.common.GeneratorsBlocks;
import mekanism.generators.common.GeneratorsCommonProxy; import mekanism.generators.common.GeneratorsCommonProxy;
@ -63,7 +63,7 @@ public class GeneratorsClientProxy extends GeneratorsCommonProxy
ClientRegistry.registerTileEntity(TileEntityBioGenerator.class, "BioGenerator", new RenderBioGenerator()); ClientRegistry.registerTileEntity(TileEntityBioGenerator.class, "BioGenerator", new RenderBioGenerator());
ClientRegistry.registerTileEntity(TileEntityHeatGenerator.class, "HeatGenerator", new RenderHeatGenerator()); ClientRegistry.registerTileEntity(TileEntityHeatGenerator.class, "HeatGenerator", new RenderHeatGenerator());
ClientRegistry.registerTileEntity(TileEntityGasGenerator.class, "GasGenerator", new RenderGasGenerator()); ClientRegistry.registerTileEntity(TileEntityGasGenerator.class, "GasGenerator", new RenderGasGenerator());
ClientRegistry.registerTileEntity(TileEntityWindGenerator.class, "WindTurbine", new RenderWindTurbine()); ClientRegistry.registerTileEntity(TileEntityWindGenerator.class, "WindTurbine", new RenderWindGenerator());
ClientRegistry.registerTileEntity(TileEntityReactorController.class, "ReactorController", new RenderReactor()); ClientRegistry.registerTileEntity(TileEntityReactorController.class, "ReactorController", new RenderReactor());
ClientRegistry.registerTileEntity(TileEntityTurbineRotor.class, "TurbineRod", new RenderTurbineRotor()); ClientRegistry.registerTileEntity(TileEntityTurbineRotor.class, "TurbineRod", new RenderTurbineRotor());
ClientRegistry.registerTileEntity(TileEntityTurbineCasing.class, "TurbineCasing", new RenderIndustrialTurbine()); ClientRegistry.registerTileEntity(TileEntityTurbineCasing.class, "TurbineCasing", new RenderIndustrialTurbine());

View file

@ -1,301 +1,154 @@
package mekanism.generators.client.model; package mekanism.generators.client.model;
import mekanism.client.render.MekanismRenderer;
import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelRenderer; import net.minecraft.client.model.ModelRenderer;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class ModelAdvancedSolarGenerator extends ModelBase @SideOnly(Side.CLIENT)
public class ModelAdvancedSolarGenerator extends ModelBase
{ {
ModelRenderer foot1; ModelRenderer Shape1;
ModelRenderer foot2; ModelRenderer Shape2;
ModelRenderer foot3; ModelRenderer Shape3;
ModelRenderer foot1side; ModelRenderer Shape4;
ModelRenderer foot2side; ModelRenderer Shape5;
ModelRenderer foot3side; ModelRenderer Shape6;
ModelRenderer smallfoot; ModelRenderer Shape7;
ModelRenderer base; ModelRenderer Shape8;
ModelRenderer outputbox; ModelRenderer Shape9;
ModelRenderer outputboxbottom; ModelRenderer Shape10;
ModelRenderer basebeam; ModelRenderer Shape11;
ModelRenderer connectorbox; ModelRenderer Shape12;
ModelRenderer panelpivotbar; ModelRenderer Shape13;
ModelRenderer bar1; ModelRenderer Shape14;
ModelRenderer bar2; ModelRenderer Shape15;
ModelRenderer bar3; ModelRenderer Shape16;
ModelRenderer bar4;
ModelRenderer Panel1;
ModelRenderer Panel2;
ModelRenderer Panel3;
ModelRenderer Panel4;
ModelRenderer Panel5;
ModelRenderer Panel6;
ModelRenderer Panel7;
ModelRenderer Panel8;
ModelRenderer Panel9;
ModelRenderer Panel10;
ModelRenderer Panel11;
ModelRenderer Panel12;
ModelRenderer Inputlight;
ModelRenderer light1;
ModelRenderer light2;
ModelRenderer light3;
ModelRenderer light4;
public ModelAdvancedSolarGenerator() public ModelAdvancedSolarGenerator()
{ {
textureWidth = 128; textureWidth = 256;
textureHeight = 64; textureHeight = 256;
foot1 = new ModelRenderer(this, 16, 30); Shape1 = new ModelRenderer(this, 0, 95);
foot1.addBox(16F, 13F, -2F, 6, 1, 4); Shape1.addBox(0F, -1F, -1F, 40, 2, 2);
foot1.setRotationPoint(0F, 0F, 0F); Shape1.setRotationPoint(-20F, -17F, 0F);
foot1.setTextureSize(128, 64); Shape1.setTextureSize(256, 256);
foot1.mirror = true; Shape1.mirror = true;
setRotation(foot1, 0F, 0F, 0.7330383F); setRotation(Shape1, 0.3490659F, 0F, 0F);
foot1.mirror = false; Shape2 = new ModelRenderer(this, 0, 49);
foot2 = new ModelRenderer(this, 16, 23); Shape2.addBox(0F, -1F, -23F, 16, 1, 45);
foot2.addBox(-2F, 13F, -22F, 4, 1, 6); Shape2.setRotationPoint(7F, -17F, 0F);
foot2.setRotationPoint(0F, 0F, 0F); Shape2.setTextureSize(256, 256);
foot2.setTextureSize(128, 64); Shape2.mirror = true;
foot2.mirror = true; setRotation(Shape2, 0.3490659F, 0F, 0F);
setRotation(foot2, 0.7330383F, 0F, 0F); Shape3 = new ModelRenderer(this, 0, 0);
foot3 = new ModelRenderer(this, 16, 30); Shape3.addBox(0F, -2F, -24F, 18, 1, 48);
foot3.addBox(-22F, 13F, -2F, 6, 1, 4); Shape3.setRotationPoint(6F, -17F, 0F);
foot3.setRotationPoint(0F, 0F, 0F); Shape3.setTextureSize(256, 256);
foot3.setTextureSize(128, 64); Shape3.mirror = true;
foot3.mirror = true; setRotation(Shape3, 0.3490659F, 0F, 0F);
setRotation(foot3, 0F, 0F, -0.7330383F); Shape4 = new ModelRenderer(this, 86, 21);
foot1side = new ModelRenderer(this, 16, 35); Shape4.addBox(0F, 0F, 0F, 6, 6, 10);
foot1side.addBox(4F, 14F, -2F, 1, 8, 4); Shape4.setRotationPoint(-3F, 13F, -7F);
foot1side.setRotationPoint(0F, 0F, 0F); Shape4.setTextureSize(256, 256);
foot1side.setTextureSize(128, 64); Shape4.mirror = true;
foot1side.mirror = true; setRotation(Shape4, 0F, 0F, 0F);
setRotation(foot1side, 0F, 0F, 0F); Shape5 = new ModelRenderer(this, 0, 0);
foot1side.mirror = false; Shape5.addBox(0F, 0F, 0F, 4, 40, 4);
foot2side = new ModelRenderer(this, 0, 47); Shape5.setRotationPoint(-2F, -16F, -2F);
foot2side.addBox(-2F, 9F, -5F, 4, 13, 3); Shape5.setTextureSize(256, 256);
foot2side.setRotationPoint(0F, 0F, 0F); Shape5.mirror = true;
foot2side.setTextureSize(128, 64); setRotation(Shape5, 0F, 0F, 0F);
foot2side.mirror = true; Shape6 = new ModelRenderer(this, 16, 28);
setRotation(foot2side, 0F, 0F, 0F); Shape6.addBox(0F, 0F, 0F, 2, 2, 12);
foot3side = new ModelRenderer(this, 26, 35); Shape6.setRotationPoint(1F, -14F, -6F);
foot3side.addBox(-4.866667F, 12F, -2F, 1, 8, 4); Shape6.setTextureSize(256, 256);
foot3side.setRotationPoint(0F, 2F, 0F); Shape6.mirror = true;
foot3side.setTextureSize(128, 64); setRotation(Shape6, 0F, 0F, 0F);
foot3side.mirror = true; Shape7 = new ModelRenderer(this, 0, 50);
setRotation(foot3side, 0F, 0F, 0F); Shape7.addBox(0F, 0F, 0F, 1, 7, 7);
smallfoot = new ModelRenderer(this, 38, 32); Shape7.setRotationPoint(1.5F, -20.5F, -3.5F);
smallfoot.addBox(-0.5F, 21F, 5F, 1, 3, 1); Shape7.setTextureSize(256, 256);
smallfoot.setRotationPoint(0F, 0F, 0F); Shape7.mirror = true;
smallfoot.setTextureSize(128, 64); setRotation(Shape7, 0F, 0F, 0F);
smallfoot.mirror = true; Shape8 = new ModelRenderer(this, 16, 28);
setRotation(smallfoot, 0F, 0F, 0F); Shape8.addBox(0F, 0F, 0F, 2, 2, 12);
base = new ModelRenderer(this, 61, 42); Shape8.setRotationPoint(-3F, -14F, -6F);
base.addBox(-4F, 10F, -4F, 8, 13, 8); Shape8.setTextureSize(256, 256);
base.setRotationPoint(0F, 0F, 0F); Shape8.mirror = true;
base.setTextureSize(128, 64); setRotation(Shape8, 0F, 0F, 0F);
base.mirror = true; Shape9 = new ModelRenderer(this, 16, 0);
setRotation(base, 0F, 0F, 0F); Shape9.addBox(0F, 0F, 0F, 8, 6, 6);
outputbox = new ModelRenderer(this, 36, 36); Shape9.setRotationPoint(-4F, -20F, -3F);
outputbox.addBox(-4F, 16F, 4F, 8, 8, 4); Shape9.setTextureSize(256, 256);
outputbox.setRotationPoint(0F, -4F, 0F); Shape9.mirror = true;
outputbox.setTextureSize(128, 64); setRotation(Shape9, 0F, 0F, 0F);
outputbox.mirror = true; Shape10 = new ModelRenderer(this, 0, 50);
setRotation(outputbox, 0F, 0F, 0F); Shape10.addBox(0F, 0F, 0F, 1, 7, 7);
outputboxbottom = new ModelRenderer(this, 42, 31); Shape10.setRotationPoint(-2.5F, -20.5F, -3.5F);
outputboxbottom.addBox(-2F, 20F, 4F, 4, 1, 4); Shape10.setTextureSize(256, 256);
outputboxbottom.setRotationPoint(0F, 0F, 0F); Shape10.mirror = true;
outputboxbottom.setTextureSize(128, 64); setRotation(Shape10, 0F, 0F, 0F);
outputboxbottom.mirror = true; Shape11 = new ModelRenderer(this, 0, 0);
setRotation(outputboxbottom, 0F, 0F, 0F); Shape11.addBox(0F, -2F, -24F, 18, 1, 48);
basebeam = new ModelRenderer(this, 0, 14); Shape11.setRotationPoint(-24F, -17F, 0F);
basebeam.addBox(-2F, -19F, -2F, 4, 29, 4); Shape11.setTextureSize(256, 256);
basebeam.setRotationPoint(0F, 0F, 0F); Shape11.mirror = true;
basebeam.setTextureSize(128, 64); setRotation(Shape11, 0.3490659F, 0F, 0F);
basebeam.mirror = true; Shape12 = new ModelRenderer(this, 0, 49);
setRotation(basebeam, 0F, 0F, 0F); Shape12.addBox(0F, -1F, -23F, 16, 1, 45);
connectorbox = new ModelRenderer(this, 14, 47); Shape12.setRotationPoint(-23F, -17F, 0F);
connectorbox.addBox(-2.5F, -21F, -2.5F, 5, 3, 5); Shape12.setTextureSize(256, 256);
connectorbox.setRotationPoint(0F, 0F, 0F); Shape12.mirror = true;
connectorbox.setTextureSize(128, 64); setRotation(Shape12, 0.3490659F, 0F, 0F);
connectorbox.mirror = true; Shape13 = new ModelRenderer(this, 78, 50);
setRotation(connectorbox, 0F, 0F, 0F); Shape13.addBox(0F, 0F, 0F, 16, 2, 16);
panelpivotbar = new ModelRenderer(this, 0, 0); Shape13.setRotationPoint(-8F, 22F, -8F);
panelpivotbar.addBox(-15F, -20.5F, -0.5F, 30, 2, 1); Shape13.setTextureSize(256, 256);
panelpivotbar.setRotationPoint(0F, 0F, 0F); Shape13.mirror = true;
panelpivotbar.setTextureSize(128, 64); setRotation(Shape13, 0F, 0F, 0F);
panelpivotbar.mirror = true; Shape14 = new ModelRenderer(this, 86, 12);
setRotation(panelpivotbar, 0F, 0F, 0F); Shape14.addBox(0F, 0F, 0F, 8, 8, 1);
bar1 = new ModelRenderer(this, 60, 30); Shape14.setRotationPoint(-4F, 12F, -8F);
bar1.addBox(12.7F, -20.5F, -16F, 1, 1, 33); Shape14.setTextureSize(256, 256);
bar1.setRotationPoint(0F, 0F, 0F); Shape14.mirror = true;
bar1.setTextureSize(128, 64); setRotation(Shape14, 0F, 0F, 0F);
bar1.mirror = true; Shape15 = new ModelRenderer(this, 16, 12);
setRotation(bar1, 0F, 0F, 0F); Shape15.addBox(0F, 0F, 0F, 8, 8, 8);
bar2 = new ModelRenderer(this, 60, 30); Shape15.setRotationPoint(-4F, 14F, -4F);
bar2.addBox(2.6F, -20.5F, -16F, 1, 1, 33); Shape15.setTextureSize(256, 256);
bar2.setRotationPoint(0F, 0F, 0F); Shape15.mirror = true;
bar2.setTextureSize(128, 64); setRotation(Shape15, 0F, 0F, 0F);
bar2.mirror = true; Shape16 = new ModelRenderer(this, 86, 0);
setRotation(bar2, 0F, 0F, 0F); Shape16.addBox(0F, 0F, 0F, 10, 2, 10);
bar3 = new ModelRenderer(this, 60, 30); Shape16.setRotationPoint(-5F, 21F, -5F);
bar3.addBox(-3.6F, -20.5F, -16F, 1, 1, 33); Shape16.setTextureSize(256, 256);
bar3.setRotationPoint(0F, 0F, 0F); Shape16.mirror = true;
bar3.setTextureSize(128, 64); setRotation(Shape16, 0F, 0F, 0F);
bar3.mirror = true;
setRotation(bar3, 0F, 0F, 0F);
bar4 = new ModelRenderer(this, 60, 30);
bar4.addBox(-13.7F, -20.5F, -16F, 1, 1, 33);
bar4.setRotationPoint(0F, 0F, 0F);
bar4.setTextureSize(128, 64);
bar4.mirror = true;
setRotation(bar4, 0F, 0F, 0F);
Panel1 = new ModelRenderer(this, 70, 10);
Panel1.addBox(13.5F, -21F, -23.8F, 10, 1, 16);
Panel1.setRotationPoint(0F, 0F, 0F);
Panel1.setTextureSize(128, 64);
Panel1.mirror = true;
setRotation(Panel1, 0F, 0F, 0F);
Panel2 = new ModelRenderer(this, 16, 8);
Panel2.addBox(13.5F, -21F, -6.5F, 10, 1, 13);
Panel2.setRotationPoint(0F, 0F, 0F);
Panel2.setTextureSize(128, 64);
Panel2.mirror = true;
setRotation(Panel2, 0F, 0F, 0F);
Panel3 = new ModelRenderer(this, 70, 10);
Panel3.addBox(13.5F, -21F, 7.8F, 10, 1, 16);
Panel3.setRotationPoint(0F, 0F, 0F);
Panel3.setTextureSize(128, 64);
Panel3.mirror = true;
setRotation(Panel3, 0F, 0F, 0F);
Panel4 = new ModelRenderer(this, 70, 10);
Panel4.addBox(3F, -21F, -23.8F, 10, 1, 16);
Panel4.setRotationPoint(0F, 0F, 0F);
Panel4.setTextureSize(128, 64);
Panel4.mirror = true;
setRotation(Panel4, 0F, 0F, 0F);
Panel5 = new ModelRenderer(this, 16, 8);
Panel5.addBox(3F, -21F, -6.5F, 10, 1, 13);
Panel5.setRotationPoint(0F, 0F, 0F);
Panel5.setTextureSize(128, 64);
Panel5.mirror = true;
setRotation(Panel5, 0F, 0F, 0F);
Panel6 = new ModelRenderer(this, 70, 10);
Panel6.addBox(3F, -21F, 7.8F, 10, 1, 16);
Panel6.setRotationPoint(0F, 0F, 0F);
Panel6.setTextureSize(128, 64);
Panel6.mirror = true;
setRotation(Panel6, 0F, 0F, 0F);
Panel7 = new ModelRenderer(this, 70, 10);
Panel7.addBox(-13F, -21F, -23.8F, 10, 1, 16);
Panel7.setRotationPoint(0F, 0F, 0F);
Panel7.setTextureSize(128, 64);
Panel7.mirror = true;
setRotation(Panel7, 0F, 0F, 0F);
Panel8 = new ModelRenderer(this, 16, 8);
Panel8.addBox(-13F, -21F, -6.5F, 10, 1, 13);
Panel8.setRotationPoint(0F, 0F, 0F);
Panel8.setTextureSize(128, 64);
Panel8.mirror = true;
setRotation(Panel8, 0F, 0F, 0F);
Panel9 = new ModelRenderer(this, 70, 10);
Panel9.addBox(-13F, -21F, 7.8F, 10, 1, 16);
Panel9.setRotationPoint(0F, 0F, 0F);
Panel9.setTextureSize(128, 64);
Panel9.mirror = true;
setRotation(Panel9, 0F, 0F, 0F);
Panel10 = new ModelRenderer(this, 70, 10);
Panel10.addBox(-23.5F, -21F, -23.8F, 10, 1, 16);
Panel10.setRotationPoint(0F, 0F, 0F);
Panel10.setTextureSize(128, 64);
Panel10.mirror = true;
setRotation(Panel10, 0F, 0F, 0F);
Panel11 = new ModelRenderer(this, 16, 8);
Panel11.addBox(-23.5F, -21F, -6.5F, 10, 1, 13);
Panel11.setRotationPoint(0F, 0F, 0F);
Panel11.setTextureSize(128, 64);
Panel11.mirror = true;
setRotation(Panel11, 0F, 0F, 0F);
Panel12 = new ModelRenderer(this, 70, 10);
Panel12.addBox(-23.5F, -21F, 7.8F, 10, 1, 16);
Panel12.setRotationPoint(0F, 0F, 0F);
Panel12.setTextureSize(128, 64);
Panel12.mirror = true;
setRotation(Panel12, 0F, 0F, 0F);
Inputlight = new ModelRenderer(this, 5, 6);
Inputlight.addBox(-1F, 15F, 7.2F, 2, 2, 1);
Inputlight.setRotationPoint(0F, 0F, 0F);
Inputlight.setTextureSize(128, 64);
Inputlight.mirror = true;
setRotation(Inputlight, 0F, 0F, 0F);
light1 = new ModelRenderer(this, 5, 4);
light1.addBox(3.2F, 15F, 6F, 1, 2, 1);
light1.setRotationPoint(0F, 0F, 0F);
light1.setTextureSize(128, 64);
light1.mirror = true;
setRotation(light1, 0F, 0F, 0F);
light2 = new ModelRenderer(this, 5, 4);
light2.addBox(-4.2F, 15F, 6F, 1, 2, 1);
light2.setRotationPoint(0F, 0F, 0F);
light2.setTextureSize(128, 64);
light2.mirror = true;
setRotation(light2, 0F, 0F, 0F);
light3 = new ModelRenderer(this, 5, 4);
light3.addBox(3.2F, 15F, 2F, 1, 2, 3);
light3.setRotationPoint(0F, 0F, 0F);
light3.setTextureSize(128, 64);
light3.mirror = true;
setRotation(light3, 0F, 0F, 0F);
light4 = new ModelRenderer(this, 5, 4);
light4.addBox(-4.2F, 15F, 2F, 1, 2, 3);
light4.setRotationPoint(0F, 0F, 0F);
light4.setTextureSize(128, 64);
light4.mirror = true;
setRotation(light4, 0F, 0F, 0F);
} }
public void render(float size) public void render(float size)
{ {
foot1.render(size); Shape1.render(size);
foot2.render(size); Shape2.render(size);
foot3.render(size); Shape3.render(size);
foot1side.render(size); Shape4.render(size);
foot2side.render(size); Shape5.render(size);
foot3side.render(size); Shape6.render(size);
smallfoot.render(size); Shape7.render(size);
base.render(size); Shape8.render(size);
outputbox.render(size); Shape9.render(size);
outputboxbottom.render(size); Shape10.render(size);
basebeam.render(size); Shape11.render(size);
connectorbox.render(size); Shape12.render(size);
panelpivotbar.render(size); Shape13.render(size);
bar1.render(size); Shape14.render(size);
bar2.render(size); Shape15.render(size);
bar3.render(size); Shape16.render(size);
bar4.render(size);
Panel1.render(size);
Panel2.render(size);
Panel3.render(size);
Panel4.render(size);
Panel5.render(size);
Panel6.render(size);
Panel7.render(size);
Panel8.render(size);
Panel9.render(size);
Panel10.render(size);
Panel11.render(size);
Panel12.render(size);
MekanismRenderer.glowOn();
Inputlight.render(size);
light1.render(size);
light2.render(size);
light3.render(size);
light4.render(size);
MekanismRenderer.glowOff();
} }
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.rotateAngleX = x;
model.rotateAngleY = y; model.rotateAngleY = y;

View file

@ -3,53 +3,85 @@ package mekanism.generators.client.model;
import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelRenderer; import net.minecraft.client.model.ModelRenderer;
public class ModelSolarGenerator extends ModelBase public class ModelSolarGenerator extends ModelBase
{ {
ModelRenderer Base; ModelRenderer solarPanelPipeBase;
ModelRenderer Base2; ModelRenderer solarPanel;
ModelRenderer Stand; ModelRenderer solarPanelBottom;
ModelRenderer PhotovoltaicCells; ModelRenderer solarPanelConnector;
ModelRenderer solarPanelPipeU;
ModelRenderer solarPanelPipeConnector;
ModelRenderer solarPanelPipeBase1;
ModelRenderer solarPanelPipeU1;
public ModelSolarGenerator() public ModelSolarGenerator()
{ {
textureWidth = 64; textureWidth = 64;
textureHeight = 32; textureHeight = 64;
Base = new ModelRenderer(this, 0, 16); solarPanelPipeBase = new ModelRenderer(this, 48, 33);
Base.addBox(0F, 0F, 0F, 6, 1, 6); solarPanelPipeBase.addBox(0F, 0F, 0F, 1, 6, 6);
Base.setRotationPoint(-3F, 23F, -3F); solarPanelPipeBase.setRotationPoint(3F, 23F, -3F);
Base.setTextureSize(64, 32); solarPanelPipeBase.setTextureSize(64, 64);
Base.mirror = true; solarPanelPipeBase.mirror = true;
setRotation(Base, 0F, 0F, 0F); setRotation(solarPanelPipeBase, 0F, 0F, 1.570796F);
Base2 = new ModelRenderer(this, 0, 24); solarPanel = new ModelRenderer(this, 0, 0);
Base2.addBox(0F, 0F, 0F, 3, 1, 3); solarPanel.addBox(0F, 0F, 0F, 16, 2, 16);
Base2.setRotationPoint(-1.5F, 22F, -1.5F); solarPanel.setRotationPoint(-8F, 13F, -8F);
Base2.setTextureSize(64, 32); solarPanel.setTextureSize(64, 64);
Base2.mirror = true; solarPanel.mirror = true;
setRotation(Base2, 0F, 0F, 0F); setRotation(solarPanel, 0F, 0F, 0F);
Stand = new ModelRenderer(this, 25, 16); solarPanelBottom = new ModelRenderer(this, 0, 18);
Stand.addBox(0F, 0F, 0F, 1, 7, 1); solarPanelBottom.addBox(0F, 0F, 0F, 14, 1, 14);
Stand.setRotationPoint(-0.5F, 15F, -0.5F); solarPanelBottom.setRotationPoint(-7F, 15F, -7F);
Stand.setTextureSize(64, 32); solarPanelBottom.setTextureSize(64, 64);
Stand.mirror = true; solarPanelBottom.mirror = true;
setRotation(Stand, 0F, 0F, 0F); setRotation(solarPanelBottom, 0F, 0F, 0F);
PhotovoltaicCells = new ModelRenderer(this, 0, 0); solarPanelConnector = new ModelRenderer(this, 0, 33);
PhotovoltaicCells.addBox(-7F, -1F, -7F, 14, 1, 14); solarPanelConnector.addBox(0F, 0F, 0F, 4, 2, 4);
PhotovoltaicCells.setRotationPoint(0F, 15F, 0F); solarPanelConnector.setRotationPoint(-2F, 15F, -2F);
PhotovoltaicCells.setTextureSize(64, 32); solarPanelConnector.setTextureSize(64, 64);
PhotovoltaicCells.mirror = true; solarPanelConnector.mirror = true;
setRotation(PhotovoltaicCells, 0F, 0F, 0F); setRotation(solarPanelConnector, 0F, 0F, 0F);
solarPanelPipeU = new ModelRenderer(this, 16, 33);
solarPanelPipeU.addBox(0F, 0F, 0F, 2, 3, 2);
solarPanelPipeU.setRotationPoint(-1F, 19F, -1F);
solarPanelPipeU.setTextureSize(64, 64);
solarPanelPipeU.mirror = true;
setRotation(solarPanelPipeU, 0F, 0F, 0F);
solarPanelPipeConnector = new ModelRenderer(this, 24, 33);
solarPanelPipeConnector.addBox(0F, 0F, 0F, 3, 3, 3);
solarPanelPipeConnector.setRotationPoint(-1.5F, 18F, -1.5F);
solarPanelPipeConnector.setTextureSize(64, 64);
solarPanelPipeConnector.mirror = true;
setRotation(solarPanelPipeConnector, 0F, 0F, 0F);
solarPanelPipeBase1 = new ModelRenderer(this, 36, 33);
solarPanelPipeBase1.addBox(0F, 0F, 0F, 2, 4, 4);
solarPanelPipeBase1.setRotationPoint(2F, 22F, -2F);
solarPanelPipeBase1.setTextureSize(64, 64);
solarPanelPipeBase1.mirror = true;
setRotation(solarPanelPipeBase1, 0F, 0F, 1.570796F);
solarPanelPipeU1 = new ModelRenderer(this, 16, 33);
solarPanelPipeU1.addBox(0F, 0F, 0F, 2, 3, 2);
solarPanelPipeU1.setRotationPoint(-1F, 16F, -1F);
solarPanelPipeU1.setTextureSize(64, 64);
solarPanelPipeU1.mirror = true;
setRotation(solarPanelPipeU1, 0F, 0F, 0F);
} }
public void render(float size) public void render(float size)
{ {
Base.render(size); solarPanelPipeBase.render(size);
Base2.render(size); solarPanel.render(size);
Stand.render(size); solarPanelBottom.render(size);
PhotovoltaicCells.render(size); solarPanelConnector.render(size);
solarPanelPipeU.render(size);
solarPanelPipeConnector.render(size);
solarPanelPipeBase1.render(size);
solarPanelPipeU1.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.rotateAngleX = x;
model.rotateAngleY = y; model.rotateAngleY = y;

View file

@ -0,0 +1,214 @@
package mekanism.generators.client.model;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelRenderer;
public class ModelWindGenerator extends ModelBase
{
ModelRenderer head;
ModelRenderer plateConnector2;
ModelRenderer plateConnector;
ModelRenderer plate;
ModelRenderer bladeCap;
ModelRenderer bladeCenter;
ModelRenderer baseRim;
ModelRenderer base;
ModelRenderer wire;
ModelRenderer rearPlate1;
ModelRenderer rearPlate2;
ModelRenderer blade1a;
ModelRenderer blade2a;
ModelRenderer blade3a;
ModelRenderer blade1b;
ModelRenderer blade2b;
ModelRenderer blade3b;
ModelRenderer post1a;
ModelRenderer post1b;
ModelRenderer post1c;
ModelRenderer post1d;
public ModelWindGenerator()
{
textureWidth = 128;
textureHeight = 128;
head = new ModelRenderer(this, 20, 0);
head.addBox(-3.5F, -3.5F, 0F, 7, 7, 9);
head.setRotationPoint(0F, -48F, -4F);
head.setTextureSize(128, 128);
head.mirror = true;
setRotation(head, 0F, 0F, 0F);
plateConnector2 = new ModelRenderer(this, 42, 34);
plateConnector2.addBox(0F, 0F, 0F, 6, 6, 10);
plateConnector2.setRotationPoint(-3F, 13F, -7F);
plateConnector2.setTextureSize(128, 128);
plateConnector2.mirror = true;
setRotation(plateConnector2, 0F, 0F, 0F);
plateConnector = new ModelRenderer(this, 0, 75);
plateConnector.addBox(0F, 0F, 0F, 4, 2, 2);
plateConnector.setRotationPoint(-2F, 19F, -5.5F);
plateConnector.setTextureSize(128, 128);
plateConnector.mirror = true;
setRotation(plateConnector, 0F, 0F, 0F);
plate = new ModelRenderer(this, 42, 25);
plate.addBox(0F, 0F, 0F, 8, 8, 1);
plate.setRotationPoint(-4F, 12F, -8F);
plate.setTextureSize(128, 128);
plate.mirror = true;
setRotation(plate, 0F, 0F, 0F);
bladeCap = new ModelRenderer(this, 22, 0);
bladeCap.addBox(-1F, -1F, -8F, 2, 2, 1);
bladeCap.setRotationPoint(0F, -48F, 0F);
bladeCap.setTextureSize(128, 128);
bladeCap.mirror = true;
setRotation(bladeCap, 0F, 0F, 0F);
bladeCenter = new ModelRenderer(this, 20, 25);
bladeCenter.addBox(-2F, -2F, -7F, 4, 4, 3);
bladeCenter.setRotationPoint(0F, -48F, 0F);
bladeCenter.setTextureSize(128, 128);
bladeCenter.mirror = true;
setRotation(bladeCenter, 0F, 0F, 0F);
baseRim = new ModelRenderer(this, 26, 50);
baseRim.addBox(0F, 0F, 0F, 12, 2, 12);
baseRim.setRotationPoint(-6F, 21F, -6F);
baseRim.setTextureSize(128, 128);
baseRim.mirror = true;
setRotation(baseRim, 0F, 0F, 0F);
base = new ModelRenderer(this, 10, 64);
base.addBox(0F, 0F, 0F, 16, 2, 16);
base.setRotationPoint(-8F, 22F, -8F);
base.setTextureSize(128, 128);
base.mirror = true;
setRotation(base, 0F, 0F, 0F);
wire = new ModelRenderer(this, 74, 0);
wire.addBox(-1F, 0F, -1.1F, 2, 65, 2);
wire.setRotationPoint(0F, -46F, -1.5F);
wire.setTextureSize(128, 128);
wire.mirror = true;
setRotation(wire, -0.0349066F, 0F, 0F);
rearPlate1 = new ModelRenderer(this, 20, 16);
rearPlate1.addBox(-2.5F, -6F, 0F, 5, 6, 3);
rearPlate1.setRotationPoint(0F, -44.5F, 4F);
rearPlate1.setTextureSize(128, 128);
rearPlate1.mirror = true;
setRotation(rearPlate1, 0.122173F, 0F, 0F);
rearPlate2 = new ModelRenderer(this, 36, 16);
rearPlate2.addBox(-1.5F, -5F, -1F, 3, 5, 2);
rearPlate2.setRotationPoint(0F, -45F, 7F);
rearPlate2.setTextureSize(128, 128);
rearPlate2.mirror = true;
setRotation(rearPlate2, 0.2094395F, 0F, 0F);
blade1a = new ModelRenderer(this, 20, 32);
blade1a.addBox(-1F, -32F, 0F, 2, 32, 1);
blade1a.setRotationPoint(0F, -48F, -5.99F);
blade1a.setTextureSize(128, 128);
blade1a.mirror = true;
setRotation(blade1a, 0F, 0F, 0F);
blade2a = new ModelRenderer(this, 20, 32);
blade2a.addBox(-1F, 0F, 0F, 2, 32, 1);
blade2a.setRotationPoint(0F, -48F, -6F);
blade2a.setTextureSize(128, 128);
blade2a.mirror = true;
setRotation(blade2a, 0F, 0F, 1.047198F);
blade3a = new ModelRenderer(this, 20, 32);
blade3a.addBox(-1F, 0F, 0F, 2, 32, 1);
blade3a.setRotationPoint(0F, -48F, -6F);
blade3a.setTextureSize(128, 128);
blade3a.mirror = true;
setRotation(blade3a, 0F, 0F, -1.047198F);
blade1b = new ModelRenderer(this, 26, 32);
blade1b.addBox(-2F, -28F, 0F, 2, 28, 1);
blade1b.setRotationPoint(0F, -48F, -6F);
blade1b.setTextureSize(128, 128);
blade1b.mirror = true;
setRotation(blade1b, 0F, 0F, 0.0349066F);
blade2b = new ModelRenderer(this, 26, 32);
blade2b.addBox(0F, 0F, 0F, 2, 28, 1);
blade2b.setRotationPoint(0F, -48F, -6.01F);
blade2b.setTextureSize(128, 128);
blade2b.mirror = true;
setRotation(blade2b, 0F, 0F, 1.082104F);
blade3b = new ModelRenderer(this, 26, 32);
blade3b.addBox(0F, 0F, 0F, 2, 28, 1);
blade3b.setRotationPoint(0F, -48F, -6.01F);
blade3b.setTextureSize(128, 128);
blade3b.mirror = true;
setRotation(blade3b, 0F, 0F, -1.012291F);
post1a = new ModelRenderer(this, 0, 0);
post1a.addBox(-2.5F, 0F, -2.5F, 5, 68, 5);
post1a.setRotationPoint(0F, -46F, 0F);
post1a.setTextureSize(128, 128);
post1a.mirror = true;
setRotation(post1a, -0.0349066F, 0F, 0.0349066F);
post1b = new ModelRenderer(this, 0, 0);
post1b.addBox(-2.5F, 0F, -2.5F, 5, 68, 5);
post1b.setRotationPoint(0F, -46F, 0F);
post1b.setTextureSize(128, 128);
post1b.mirror = true;
setRotation(post1b, 0.0349066F, 0F, -0.0349066F);
post1c = new ModelRenderer(this, 0, 0);
post1c.addBox(-2.5F, 0F, -2.5F, 5, 68, 5);
post1c.setRotationPoint(0F, -46F, 0F);
post1c.setTextureSize(128, 128);
post1c.mirror = true;
setRotation(post1c, 0.0347321F, 0F, 0.0347321F);
post1d = new ModelRenderer(this, 0, 0);
post1d.addBox(-2.5F, 0F, -2.5F, 5, 68, 5);
post1d.setRotationPoint(0F, -46F, 0F);
post1d.setTextureSize(128, 128);
post1d.mirror = true;
setRotation(post1d, -0.0347321F, 0F, -0.0347321F);
}
public void render(float size, double angle)
{
head.render(size);
plateConnector2.render(size);
plateConnector.render(size);
plate.render(size);
bladeCap.render(size);
bladeCenter.render(size);
baseRim.render(size);
base.render(size);
wire.render(size);
rearPlate1.render(size);
rearPlate2.render(size);
post1a.render(size);
post1b.render(size);
post1c.render(size);
post1d.render(size);
setRotation(blade1a, 0F, 0F, getRotation(getAbsoluteAngle(angle)));
setRotation(blade1b, 0F, 0F, 0.0349066F + getRotation(getAbsoluteAngle(angle)));
setRotation(blade2a, 0F, 0F, getRotation(getAbsoluteAngle(angle - 60)));
setRotation(blade2b, 0F, 0F, 0.0349066F + getRotation(getAbsoluteAngle(angle - 60)));
setRotation(blade3a, 0F, 0F, getRotation(getAbsoluteAngle(angle + 60)));
setRotation(blade3b, 0F, 0F, 0.0349066F + getRotation(getAbsoluteAngle(angle + 60)));
blade1a.render(size);
blade2a.render(size);
blade3a.render(size);
blade1b.render(size);
blade2b.render(size);
blade3b.render(size);
}
public float getRotation(double angle)
{
return ((float)angle / (float) 180) * (float)Math.PI;
}
public double getAbsoluteAngle(double angle)
{
return angle % 360;
}
private void setRotation(ModelRenderer model, float x, float y, float z)
{
model.rotateAngleX = x;
model.rotateAngleY = y;
model.rotateAngleZ = z;
}
}

View file

@ -1,151 +0,0 @@
package mekanism.generators.client.model;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelRenderer;
public class ModelWindTurbine extends ModelBase
{
ModelRenderer Base;
ModelRenderer TowerFront;
ModelRenderer TowerLeft;
ModelRenderer TowerBack;
ModelRenderer TowerRight;
ModelRenderer TowerMoterFront;
ModelRenderer TowerBaseMotor;
ModelRenderer TowerBaseMotorBack;
ModelRenderer TowerMotor;
ModelRenderer Rotor;
ModelRenderer RotorCover;
ModelRenderer BladeBaseC;
ModelRenderer BladeBaseB;
ModelRenderer BladeBaseA;
public ModelWindTurbine()
{
textureWidth = 128;
textureHeight = 64;
Base = new ModelRenderer(this, 0, 0);
Base.addBox(-8F, 0F, -8F, 16, 6, 16);
Base.setRotationPoint(0F, 18F, 0F);
Base.setTextureSize(128, 64);
Base.mirror = true;
setRotation(Base, 0F, 0F, 0F);
TowerFront = new ModelRenderer(this, 104, 0);
TowerFront.addBox(-5F, -62F, -7F, 10, 63, 2);
TowerFront.setRotationPoint(0F, 19F, 0F);
TowerFront.setTextureSize(128, 64);
TowerFront.mirror = true;
setRotation(TowerFront, -0.0872665F, 0F, 0F);
TowerLeft = new ModelRenderer(this, 104, 0);
TowerLeft.addBox(-5F, -62F, 5F, 10, 63, 2);
TowerLeft.setRotationPoint(0F, 19F, 0F);
TowerLeft.setTextureSize(128, 64);
TowerLeft.mirror = true;
setRotation(TowerLeft, 0.0872665F, 1.570796F, 0F);
TowerBack = new ModelRenderer(this, 104, 0);
TowerBack.addBox(-5F, -62F, 5F, 10, 63, 2);
TowerBack.setRotationPoint(0F, 19F, 0F);
TowerBack.setTextureSize(128, 64);
TowerBack.mirror = true;
setRotation(TowerBack, 0.0872665F, 0F, 0F);
TowerRight = new ModelRenderer(this, 104, 0);
TowerRight.addBox(-5F, -62F, 5F, 10, 63, 2);
TowerRight.setRotationPoint(0F, 19F, 0F);
TowerRight.setTextureSize(128, 64);
TowerRight.mirror = true;
setRotation(TowerRight, 0.0872665F, -1.570796F, 0F);
TowerMoterFront = new ModelRenderer(this, 40, 38);
TowerMoterFront.addBox(-6F, -7.3F, -5F, 12, 9, 6);
TowerMoterFront.setRotationPoint(0F, -45F, -1F);
TowerMoterFront.setTextureSize(128, 64);
TowerMoterFront.mirror = true;
setRotation(TowerMoterFront, 0F, 0F, 0F);
TowerBaseMotor = new ModelRenderer(this, 65, 0);
TowerBaseMotor.addBox(-6F, -0.3F, 0F, 12, 2, 7);
TowerBaseMotor.setRotationPoint(0F, -45F, 0F);
TowerBaseMotor.setTextureSize(128, 64);
TowerBaseMotor.mirror = true;
setRotation(TowerBaseMotor, 0F, 0F, 0F);
TowerBaseMotorBack = new ModelRenderer(this, 65, 30);
TowerBaseMotorBack.addBox(-4F, -3.3F, 7F, 8, 4, 3);
TowerBaseMotorBack.setRotationPoint(0F, -45F, 0F);
TowerBaseMotorBack.setTextureSize(128, 64);
TowerBaseMotorBack.mirror = true;
setRotation(TowerBaseMotorBack, 0F, 0F, 0F);
TowerMotor = new ModelRenderer(this, 65, 15);
TowerMotor.addBox(-4F, -6.3F, 0F, 8, 6, 7);
TowerMotor.setRotationPoint(0F, -45F, 0F);
TowerMotor.setTextureSize(128, 64);
TowerMotor.mirror = true;
setRotation(TowerMotor, 0F, 0F, 0F);
Rotor = new ModelRenderer(this, 88, 30);
Rotor.addBox(-0.5F, -0.5F, 0F, 1, 1, 3);
Rotor.setRotationPoint(0F, -48F, -8F);
Rotor.setTextureSize(128, 64);
Rotor.mirror = true;
setRotation(Rotor, 0F, 0F, 0F);
RotorCover = new ModelRenderer(this, 88, 35);
RotorCover.addBox(-2F, -2F, -1F, 4, 4, 1);
RotorCover.setRotationPoint(0F, -48F, -8F);
RotorCover.setTextureSize(128, 64);
RotorCover.mirror = true;
setRotation(RotorCover, 0F, 0F, 0F);
BladeBaseC = new ModelRenderer(this, 0, 54);
BladeBaseC.addBox(1F, -1F, 0F, 32, 2, 1);
BladeBaseC.setRotationPoint(0F, -48F, -8F);
BladeBaseC.setTextureSize(128, 64);
BladeBaseC.mirror = true;
setRotation(BladeBaseC, 0F, 0F, getRotation(120));
BladeBaseB = new ModelRenderer(this, 0, 54);
BladeBaseB.addBox(1F, -1F, 0F, 32, 2, 1);
BladeBaseB.setRotationPoint(0F, -48F, -8F);
BladeBaseB.setTextureSize(128, 64);
BladeBaseB.mirror = true;
setRotation(BladeBaseB, 0F, 0F, 0F);
BladeBaseA = new ModelRenderer(this, 0, 54);
BladeBaseA.addBox(1F, -1F, 0F, 32, 2, 1);
BladeBaseA.setRotationPoint(0F, -48F, -8F);
BladeBaseA.setTextureSize(128, 64);
BladeBaseA.mirror = true;
setRotation(BladeBaseA, 0F, 0F, getRotation(240));
}
public void render(float size, double angle)
{
Base.render(size);
TowerFront.render(size);
TowerLeft.render(size);
TowerBack.render(size);
TowerRight.render(size);
TowerMoterFront.render(size);
TowerBaseMotor.render(size);
TowerBaseMotorBack.render(size);
TowerMotor.render(size);
Rotor.render(size);
RotorCover.render(size);
setRotation(BladeBaseC, 0.0F, 0.0F, getRotation(getAbsoluteAngle(120 + angle)));
BladeBaseC.render(size);
setRotation(BladeBaseB, 0.0F, 0.0F, getRotation(getAbsoluteAngle(angle)));
BladeBaseB.render(size);
setRotation(BladeBaseA, 0.0F, 0.0F, getRotation(getAbsoluteAngle(240 + angle)));
BladeBaseA.render(size);
}
public float getRotation(double angle)
{
return ((float)angle/(float)180)*(float)Math.PI;
}
public double getAbsoluteAngle(double angle)
{
return angle % 360;
}
private void setRotation(ModelRenderer model, float x, float y, float z)
{
model.rotateAngleX = x;
model.rotateAngleY = y;
model.rotateAngleZ = z;
}
}

View file

@ -31,10 +31,10 @@ public class RenderAdvancedSolarGenerator extends TileEntitySpecialRenderer
switch(tileEntity.facing) switch(tileEntity.facing)
{ {
case 2: GL11.glRotatef(180, 0.0F, 1.0F, 0.0F); break; case 2: GL11.glRotatef(0, 0.0F, 1.0F, 0.0F); break;
case 3: 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(270, 0.0F, 1.0F, 0.0F); break; case 4: GL11.glRotatef(90, 0.0F, 1.0F, 0.0F); break;
case 5: GL11.glRotatef(90, 0.0F, 1.0F, 0.0F); break; case 5: GL11.glRotatef(270, 0.0F, 1.0F, 0.0F); break;
} }
GL11.glRotatef(180, 0F, 0F, 1F); GL11.glRotatef(180, 0F, 0F, 1F);

View file

@ -3,16 +3,16 @@ package mekanism.generators.client.render;
import mekanism.common.Mekanism; import mekanism.common.Mekanism;
import mekanism.common.util.MekanismUtils; import mekanism.common.util.MekanismUtils;
import mekanism.common.util.MekanismUtils.ResourceType; import mekanism.common.util.MekanismUtils.ResourceType;
import mekanism.generators.client.model.ModelWindTurbine; import mekanism.generators.client.model.ModelWindGenerator;
import mekanism.generators.common.tile.TileEntityWindGenerator; import mekanism.generators.common.tile.TileEntityWindGenerator;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntity;
import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.GL11;
public class RenderWindTurbine extends TileEntitySpecialRenderer public class RenderWindGenerator extends TileEntitySpecialRenderer
{ {
private ModelWindTurbine model = new ModelWindTurbine(); private ModelWindGenerator model = new ModelWindGenerator();
@Override @Override
public void renderTileEntityAt(TileEntity tileEntity, double x, double y, double z, float partialTick) public void renderTileEntityAt(TileEntity tileEntity, double x, double y, double z, float partialTick)
@ -24,7 +24,7 @@ public class RenderWindTurbine extends TileEntitySpecialRenderer
{ {
GL11.glPushMatrix(); GL11.glPushMatrix();
GL11.glTranslatef((float)x + 0.5F, (float)y + 1.5F, (float)z + 0.5F); GL11.glTranslatef((float)x + 0.5F, (float)y + 1.5F, (float)z + 0.5F);
bindTexture(MekanismUtils.getResource(ResourceType.RENDER, "WindTurbine.png")); bindTexture(MekanismUtils.getResource(ResourceType.RENDER, "WindGenerator.png"));
switch(tileEntity.facing) switch(tileEntity.facing)
{ {

View file

@ -588,7 +588,7 @@ public class BlockGenerator extends BlockContainer implements ISpecialBounds, IB
if(metadata == GeneratorType.SOLAR_GENERATOR.meta) if(metadata == GeneratorType.SOLAR_GENERATOR.meta)
{ {
setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 0.65F, 1.0F); setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 0.7F, 1.0F);
} }
else if(metadata == GeneratorType.TURBINE_ROTOR.meta) else if(metadata == GeneratorType.TURBINE_ROTOR.meta)
{ {
@ -788,7 +788,7 @@ public class BlockGenerator extends BlockContainer implements ISpecialBounds, IB
{ {
if(metadata == GeneratorType.SOLAR_GENERATOR.meta) if(metadata == GeneratorType.SOLAR_GENERATOR.meta)
{ {
block.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 0.65F, 1.0F); block.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 0.7F, 1.0F);
} }
else if(metadata == GeneratorType.TURBINE_ROTOR.meta) else if(metadata == GeneratorType.TURBINE_ROTOR.meta)
{ {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.5 KiB

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

After

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.6 KiB