Advertisement
totalytaco

renderCrate.java

Jun 21st, 2014
261
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.97 KB | None | 0 0
  1. package net.wowcraft.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. import net.wowcraft.mod.WowCraft;
  9. import net.wowcraft.model.ModelCrate;
  10.  
  11. public class RenderCrate extends TileEntitySpecialRenderer{
  12.  
  13.  
  14. private static final ResourceLocation texture = new ResourceLocation(WowCraft.modid + ":" + "textures/model/Crate.png");
  15.  
  16. private ModelCrate model;
  17.  
  18. public RenderCrate(){
  19. this.model = new ModelCrate();
  20. }
  21.  
  22. @Override
  23. public void renderTileEntityAt(TileEntity tileentity, double x, double y,double z, float f) {
  24. GL11.glPushMatrix();
  25.  
  26. GL11.glTranslatef((float)x + 0.5F, (float) y + 1.5F, (float) z + 0.5F);
  27.  
  28. GL11.glRotatef(180, 0F, 0F, 1F);
  29. this.bindTexture(texture);
  30.  
  31. GL11.glPushMatrix();
  32. this.model.renderModel(0.0625F);
  33. GL11.glPopMatrix();
  34.  
  35. GL11.glPopMatrix();
  36.  
  37. }
  38.  
  39. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement