Guest User

Untitled

a guest
Jul 25th, 2014
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.06 KB | None | 0 0
  1. package lavaInfusionRenderers;
  2.  
  3. import lavaInfusionMain.Base;
  4. import lavaInfusionModels.ModelStonePedestal;
  5. import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
  6. import net.minecraft.tileentity.TileEntity;
  7. import net.minecraft.util.ResourceLocation;
  8.  
  9. import org.lwjgl.opengl.GL11;
  10.  
  11. public class RenderStonePedestal extends TileEntitySpecialRenderer
  12. {
  13.     private static final ResourceLocation texture = new ResourceLocation(Base.MODID + ":" + "textures/tileentity/stonePedestal.png");
  14.     private ModelStonePedestal model;
  15.    
  16.     public RenderStonePedestal()
  17.     {
  18.         this.model = new ModelStonePedestal();
  19.     }
  20.    
  21.     @Override
  22.     public void renderTileEntityAt(TileEntity te, double x, double y, double z, float f)
  23.     {
  24.         GL11.glPushMatrix(); //rotations and translates
  25.         GL11.glTranslatef((float)x + 0.5F, (float)y + 1.5F, (float)z + 0.5F);
  26.         GL11.glRotatef(180, 0.0F, 0.0F, 1.0F);
  27.        
  28.         this.bindTexture(texture);
  29.        
  30.         GL11.glPushMatrix(); //rendering model
  31.         this.model.renderModel(0.0625F);
  32.        
  33.         GL11.glPopMatrix();
  34.         GL11.glPopMatrix();
  35.     }
  36. }
Advertisement
Add Comment
Please, Sign In to add comment