pryingtuna85649

TileEntity/Render Classes

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