Guest User

Untitled

a guest
May 23rd, 2014
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.06 KB | None | 0 0
  1. package com.CraigTheMailman.MinecraftExpansion.renderer;
  2.  
  3. import org.lwjgl.opengl.GL11;
  4.  
  5. import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
  6. import net.minecraft.tileentity.TileEntity;
  7. import net.minecraft.util.ResourceLocation;
  8.  
  9. import com.CraigTheMailman.MinecraftExpansion.models.ModelWorksurface;
  10.  
  11. public class RenderWorksurface extends TileEntitySpecialRenderer {
  12.  
  13. private static final ResourceLocation texture = new ResourceLocation("mcexpansion:textures/model/Worksurface.png");
  14.  
  15. private ModelWorksurface model;
  16.  
  17. public RenderWorksurface() {
  18. this.model = new ModelWorksurface();
  19. }
  20.  
  21. @Override
  22. public void renderTileEntityAt(TileEntity tileentity, double y, double z,
  23. double x, float f) {
  24. GL11.glPushMatrix();
  25.  
  26.  
  27. GL11.glPopMatrix();
  28. GL11.glTranslatef((float) x + 0.5F, (float) y + 1.5F, (float) z + 0.5F);
  29. GL11.glRotatef(180, 0F, 0F, 1F);
  30.  
  31. this.bindTexture(texture);
  32.  
  33. GL11.glPushMatrix();
  34. this.model.renderModel(0.0625F);
  35. GL11.glPopMatrix();
  36. GL11.glPopMatrix();
  37.  
  38. }
  39.  
  40. }
Advertisement
Add Comment
Please, Sign In to add comment