Guest User

LatexBarrelTileEntityRenderer

a guest
Feb 22nd, 2014
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.84 KB | None | 0 0
  1. package Periodicraft;
  2.  
  3. import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
  4. import net.minecraft.tileentity.TileEntity;
  5. import net.minecraft.util.ResourceLocation;
  6.  
  7. import org.lwjgl.opengl.GL11;
  8.  
  9. public class TileEntityLatexBarrelRenderer extends TileEntitySpecialRenderer {
  10.  
  11. private ModelLatexBarrel model = new ModelLatexBarrel();
  12. private static final ResourceLocation texture = new ResourceLocation("periodicraft", "textures/models/LatexBarrel.png");
  13.  
  14. @Override
  15. public void renderTileEntityAt(TileEntity tileentity, double x, double y, double z, float f) {
  16. GL11.glPushMatrix();
  17. GL11.glTranslatef((float)x + 0.5F, (float)y + 1.0f, (float)z + 0.5F);
  18. GL11.glRotatef(180.0F, 1.0F, 0.0F, 0.0F);
  19. GL11.glPushMatrix();
  20. bindTexture(texture);
  21. model.render();
  22. GL11.glPopMatrix();
  23. GL11.glPopMatrix();
  24. }
  25. }
Advertisement
Add Comment
Please, Sign In to add comment