Mekanism-tilera-Edition/common/mekanism/client/render/tileentity/RenderChemicalOxidizer.java
Aidan C. Brady 750bb2dab7 Rename Oxidation Chamber to Chemical Oxidizer and added model, will explain why below. This means a minor lang update @crafteverywhere, @VeryBigBro, @Vexatos
Notice that all Mekanism machines that perform similar tasks have a similar ending word; for example, the Metallurgic Infuser infuses alloys into ingots, and the Chemical Infuser infuses chemicals into other chemicals. Every ore processing machine has "Chamber" as the final word, and as this is not directly linked to ore processing, it would be best to move the "Oxidation" side of the machine to the end. Furthermore, for this chemical line, I am trying to keep "Chemical" as the first word in each machine title: Chemical Infuser, Chemical Oxidizer, Chemical Injection Chamber, etc. Hope that makes sense!
2013-12-31 15:07:09 -05:00

41 lines
1.4 KiB
Java

package mekanism.client.render.tileentity;
import mekanism.client.model.ModelChemicalOxidizer;
import mekanism.common.tileentity.TileEntityChemicalOxidizer;
import mekanism.common.util.MekanismUtils;
import mekanism.common.util.MekanismUtils.ResourceType;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.tileentity.TileEntity;
import org.lwjgl.opengl.GL11;
public class RenderChemicalOxidizer extends TileEntitySpecialRenderer
{
private ModelChemicalOxidizer model = new ModelChemicalOxidizer();
@Override
public void renderTileEntityAt(TileEntity tileEntity, double x, double y, double z, float partialTick)
{
renderAModelAt((TileEntityChemicalOxidizer)tileEntity, x, y, z, partialTick);
}
private void renderAModelAt(TileEntityChemicalOxidizer tileEntity, double x, double y, double z, float partialTick)
{
GL11.glPushMatrix();
GL11.glTranslatef((float)x + 0.5F, (float)y + 1.5F, (float)z + 0.5F);
bindTexture(MekanismUtils.getResource(ResourceType.RENDER, "ChemicalOxidizer.png"));
switch(tileEntity.facing)
{
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);
model.render(0.0625F);
GL11.glPopMatrix();
}
}