mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-25 14:24:35 +00:00
I accidentally a linear autominer.
Might make a really basic laser redirection block next - none of the refined controls of the Amplifier, none of the collection abilities of the Tractor Beam.
This commit is contained in:
1 parent
90f2086990
commit
44d852ee9b
18 files changed
+437
-30
No files matched your search
@@ -0,0 +1,65 @@
|
||||
package mekanism.client.render.tileentity;
|
||||
|
||||
import mekanism.client.model.ModelLaserAmplifier;
|
||||
import mekanism.client.render.MekanismRenderer;
|
||||
import mekanism.common.tile.TileEntityLaserTractorBeam;
|
||||
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 RenderLaserTractorBeam extends TileEntitySpecialRenderer
|
||||
{
|
||||
private ModelLaserAmplifier model = new ModelLaserAmplifier();
|
||||
|
||||
@Override
|
||||
public void renderTileEntityAt(TileEntity tileEntity, double x, double y, double z, float partialTick)
|
||||
{
|
||||
renderAModelAt((TileEntityLaserTractorBeam)tileEntity, x, y, z, partialTick);
|
||||
}
|
||||
|
||||
private void renderAModelAt(TileEntityLaserTractorBeam 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, "LaserTractorBeam.png"));
|
||||
|
||||
switch(tileEntity.facing)
|
||||
{
|
||||
case 0:
|
||||
GL11.glTranslatef(0.0F, -2.0F, 0.0F);
|
||||
GL11.glRotatef(180F, 1.0F, 0.0F, 0.0F);
|
||||
break;
|
||||
case 5:
|
||||
GL11.glTranslatef(0.0F, -1.0F, 0.0F);
|
||||
GL11.glTranslatef(1.0F, 0.0F, 0.0F);
|
||||
GL11.glRotatef(90, 0.0F, 0.0F, -1.0F);
|
||||
break;
|
||||
case 4:
|
||||
GL11.glTranslatef(0.0F, -1.0F, 0.0F);
|
||||
GL11.glTranslatef(-1.0F, 0.0F, 0.0F);
|
||||
GL11.glRotatef(90, 0.0F, 0.0F, 1.0F);
|
||||
break;
|
||||
case 2:
|
||||
GL11.glTranslatef(0.0F, -1.0F, 0.0F);
|
||||
GL11.glTranslatef(0.0F, 0.0F, -1.0F);
|
||||
GL11.glRotatef(90, -1.0F, 0.0F, 0.0F);
|
||||
break;
|
||||
case 3:
|
||||
GL11.glTranslatef(0.0F, -1.0F, 0.0F);
|
||||
GL11.glTranslatef(0.0F, 0.0F, 1.0F);
|
||||
GL11.glRotatef(90, 1.0F, 0.0F, 0.0F);
|
||||
break;
|
||||
}
|
||||
|
||||
GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
|
||||
MekanismRenderer.blendOn();
|
||||
model.render(0.0625F);
|
||||
MekanismRenderer.blendOff();
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user