Advertisement
tahg

Untitled

Oct 11th, 2014
327
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. public void renderItem(Item item) {
  2. IIcon icon = item.getIconFromDamage(0);
  3. float u0 = icon.getMinU();
  4. float u1 = icon.getMaxU();
  5. float v0 = icon.getMinV();
  6. float v1 = icon.getMaxV();
  7. if (item.getSpriteNumber() == 0)
  8. {
  9. this.bindTexture(TextureMap.locationBlocksTexture);
  10. }
  11. else
  12. {
  13. this.bindTexture(TextureMap.locationItemsTexture);
  14. }
  15. GL11.glTranslated(-.5, -.5, 0.03125);
  16. ItemRenderer.renderItemIn2D(Tessellator.instance, u1, v0, u0, v1, icon.getIconWidth(), icon.getIconHeight(), 0.0625f);
  17. GL11.glTranslated(.5, .5, -0.03125);
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement