Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.CraigTheMailman.MinecraftExpansion.renderer;
- import org.lwjgl.opengl.GL11;
- import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
- import net.minecraft.tileentity.TileEntity;
- import net.minecraft.util.ResourceLocation;
- import com.CraigTheMailman.MinecraftExpansion.models.ModelWorksurface;
- public class RenderWorksurface extends TileEntitySpecialRenderer {
- private static final ResourceLocation texture = new ResourceLocation("mcexpansion:textures/model/Worksurface.png");
- private ModelWorksurface model;
- public RenderWorksurface() {
- this.model = new ModelWorksurface();
- }
- @Override
- public void renderTileEntityAt(TileEntity tileentity, double y, double z,
- double x, float f) {
- GL11.glPushMatrix();
- GL11.glPopMatrix();
- GL11.glTranslatef((float) x + 0.5F, (float) y + 1.5F, (float) z + 0.5F);
- GL11.glRotatef(180, 0F, 0F, 1F);
- this.bindTexture(texture);
- GL11.glPushMatrix();
- this.model.renderModel(0.0625F);
- GL11.glPopMatrix();
- GL11.glPopMatrix();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment