mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-08-10 17:55:44 +00:00
39 lines
1.0 KiB
Java
39 lines
1.0 KiB
Java
package com.hbm.render.tileentity;
|
|
|
|
import org.lwjgl.opengl.GL11;
|
|
|
|
import com.hbm.main.ResourceManager;
|
|
import com.hbm.tileentity.machine.oil.TileEntityMachineGasFlare;
|
|
|
|
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
|
import net.minecraft.tileentity.TileEntity;
|
|
|
|
public class RenderGasFlare extends TileEntitySpecialRenderer {
|
|
|
|
@Override
|
|
public void renderTileEntityAt(TileEntity tileEntity, double x, double y, double z, float f) {
|
|
|
|
GL11.glPushMatrix();
|
|
GL11.glTranslated(x + 0.5D, y, z + 0.5D);
|
|
GL11.glEnable(GL11.GL_LIGHTING);
|
|
GL11.glRotatef(180, 0F, 1F, 0F);
|
|
|
|
TileEntityMachineGasFlare flare = (TileEntityMachineGasFlare) tileEntity;
|
|
|
|
if(flare.tilted) {
|
|
GL11.glTranslated(0, -0.25, 0);
|
|
GL11.glRotated(10, 0, 0, 1);
|
|
GL11.glRotated(5, 0, 1, 0);
|
|
}
|
|
|
|
GL11.glDisable(GL11.GL_CULL_FACE);
|
|
GL11.glShadeModel(GL11.GL_SMOOTH);
|
|
bindTexture(ResourceManager.oilflare_tex);
|
|
ResourceManager.oilflare.renderAll();
|
|
GL11.glShadeModel(GL11.GL_FLAT);
|
|
GL11.glEnable(GL11.GL_CULL_FACE);
|
|
|
|
GL11.glPopMatrix();
|
|
}
|
|
}
|