Advertisement
Guest User

Render

a guest
Jul 13th, 2015
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.08 KB | None | 0 0
  1. package com.playprey.adventure_extreme.Render;
  2.  
  3. import org.lwjgl.opengl.GL11;
  4.  
  5. import com.playprey.adventure_extreme.Main;
  6. import com.playprey.adventure_extreme.Models.ModelTableLamp1;
  7.  
  8. import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
  9. import net.minecraft.tileentity.TileEntity;
  10. import net.minecraft.util.ResourceLocation;
  11.  
  12. public class RenderFurnitureTableLamp1 extends TileEntitySpecialRenderer
  13. {
  14.  
  15.    
  16.     ResourceLocation texture = new ResourceLocation(Main.MODID + ":textures/furniture/lamp/ModelTableLamp1.png");
  17.    
  18.     private ModelTableLamp1 model;
  19.    
  20.     public RenderFurnitureTableLamp1()
  21.     {
  22.         this.model = new ModelTableLamp1();
  23.     }
  24.    
  25.    
  26.    
  27.    
  28.     @Override
  29.     public void renderTileEntityAt(TileEntity entity, double x, double y, double z, float f)
  30.     {
  31.             GL11.glPushMatrix();
  32.             GL11.glTranslatef((float)x + 0.5f,(float)y + 1.5f,(float)z + 0.5f);
  33.             GL11.glRotatef(180, 0f, 0f, 1f);
  34.            
  35.             this.bindTexture(texture);
  36.            
  37.             GL11.glPushMatrix();
  38.             this.model.renderModel(0.0625f);
  39.             GL11.glPopMatrix();
  40.            
  41.             GL11.glPopMatrix();
  42.        
  43.     }
  44.  
  45. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement