Guest User

Untitled

a guest
Oct 21st, 2019
97
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. private void drawArmorStatus(int x, int y) {
  2. ItemStack helmet = mc.thePlayer.inventory.armorItemInSlot(3);
  3. ItemStack chestplate = mc.thePlayer.inventory.armorItemInSlot(2);
  4. ItemStack leggings = mc.thePlayer.inventory.armorItemInSlot(1);
  5. ItemStack boots = mc.thePlayer.inventory.armorItemInSlot(0);
  6. ItemStack inHand = mc.thePlayer.inventory.getCurrentItem();
  7. int position = 0;
  8.  
  9. if (inHand != null && (inHand.getItem() instanceof ItemSword || inHand.getItem() instanceof ItemBow
  10. || inHand.getItem() instanceof ItemTool || inHand.getItem() instanceof ItemFlintAndSteel)) {
  11. mc.fontRenderer.drawString( getFormat(inHand) + (inHand.getMaxDamage() - inHand.getItemDamageForDisplay()) + "", x - 25, y / 2+ 7 - 18 * position, 16777215);
  12. itemRenderer.renderItemAndEffectIntoGUI(mc.fontRenderer, mc.getTextureManager(), inHand, x, y / 2+ 2 - 18 * position);
  13. GL11.glDisable(GL11.GL_LIGHTING);
  14. ++position;
  15. }
  16. if (boots != null) {
  17. mc.fontRenderer.drawString( getFormat(boots) + (boots.getMaxDamage() - boots.getItemDamageForDisplay()) + "", x - 25, y / 2+ 7 - 18 * position, 16777215);
  18. itemRenderer.renderItemAndEffectIntoGUI(mc.fontRenderer, mc.getTextureManager(), boots, x, y / 2+ 2 - 18 * position);
  19. GL11.glDisable(GL11.GL_LIGHTING);
  20. ++position;
  21. }
  22. if (leggings != null) {
  23. mc.fontRenderer.drawString( getFormat(leggings) + (leggings.getMaxDamage() - leggings.getItemDamageForDisplay()) + "", x - 25, y / 2+ 7 - 18 * position, 16777215);
  24. itemRenderer.renderItemAndEffectIntoGUI(mc.fontRenderer, mc.getTextureManager(), leggings, x, y / 2+ 2 - 18 * position);
  25. GL11.glDisable(GL11.GL_LIGHTING);
  26. ++position;
  27. }
  28. if (chestplate != null) {
  29. mc.fontRenderer.drawString( getFormat(chestplate) + (chestplate.getMaxDamage() - chestplate.getItemDamageForDisplay()) + "", x - 25, y / 2+ 7 - 18 * position, 16777215);
  30. itemRenderer.renderItemAndEffectIntoGUI(mc.fontRenderer, mc.getTextureManager(), chestplate, x, y / 2+ 2 - 18 * position);
  31. GL11.glDisable(GL11.GL_LIGHTING);
  32. ++position;
  33. }
  34. if (helmet != null) {
  35. mc.fontRenderer.drawString( getFormat(helmet) + (helmet.getMaxDamage() - helmet.getItemDamageForDisplay()) + "", x - 25, y / 2+ 7 - 18 * position, 16777215);
  36. itemRenderer.renderItemAndEffectIntoGUI(mc.fontRenderer, mc.getTextureManager(), helmet, x, y / 2+ 2 - 18 * position);
  37. GL11.glDisable(GL11.GL_LIGHTING);
  38. ++position;
  39. }
  40.  
  41. }
RAW Paste Data