icbm/src/main/java/icbm/zhapin/render/REmpTower.java

47 lines
1.4 KiB
Java
Raw Normal View History

2022-11-09 22:15:45 +01:00
package icbm.zhapin.render;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import icbm.zhapin.jiqi.TEmpTower;
import icbm.zhapin.muoxing.jiqi.MDianCiQi;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.ResourceLocation;
import org.lwjgl.opengl.GL11;
@SideOnly(Side.CLIENT)
public class REmpTower extends TileEntitySpecialRenderer {
2022-11-09 22:16:55 +01:00
public static final MDianCiQi MODEL;
public static final String TEXTURE_FILE = "emp_tower.png";
2022-11-09 22:15:45 +01:00
2022-11-09 22:16:55 +01:00
public void renderAModelAt(
final TEmpTower tileEntity,
final double x,
final double y,
final double z,
final float f
) {
GL11.glPushMatrix();
GL11.glTranslatef((float) x + 0.5f, (float) y + 1.5f, (float) z + 0.5f);
this.bindTexture(new ResourceLocation("icbm", "textures/models/emp_tower.png"));
GL11.glRotatef(180.0f, 0.0f, 0.0f, 1.0f);
2022-11-10 21:41:55 +01:00
REmpTower.MODEL.render(tileEntity.rotation, 0.0625f);
2022-11-09 22:16:55 +01:00
GL11.glPopMatrix();
}
2022-11-09 22:15:45 +01:00
2022-11-09 22:16:55 +01:00
@Override
public void renderTileEntityAt(
final TileEntity tileentity,
final double x,
final double y,
final double z,
final float f
) {
this.renderAModelAt((TEmpTower) tileentity, x, y, z, f);
}
2022-11-09 22:15:45 +01:00
2022-11-09 22:16:55 +01:00
static {
MODEL = new MDianCiQi();
}
2022-11-09 22:15:45 +01:00
}