Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void drawArmorStatus(int x, int y) {
- ItemStack helmet = mc.thePlayer.inventory.armorItemInSlot(3);
- ItemStack chestplate = mc.thePlayer.inventory.armorItemInSlot(2);
- ItemStack leggings = mc.thePlayer.inventory.armorItemInSlot(1);
- ItemStack boots = mc.thePlayer.inventory.armorItemInSlot(0);
- ItemStack inHand = mc.thePlayer.inventory.getCurrentItem();
- int position = 0;
- if (inHand != null && (inHand.getItem() instanceof ItemSword || inHand.getItem() instanceof ItemBow
- || inHand.getItem() instanceof ItemTool || inHand.getItem() instanceof ItemFlintAndSteel)) {
- mc.fontRenderer.drawString( getFormat(inHand) + (inHand.getMaxDamage() - inHand.getItemDamageForDisplay()) + "", x - 25, y / 2+ 7 - 18 * position, 16777215);
- itemRenderer.renderItemAndEffectIntoGUI(mc.fontRenderer, mc.getTextureManager(), inHand, x, y / 2+ 2 - 18 * position);
- GL11.glDisable(GL11.GL_LIGHTING);
- ++position;
- }
- if (boots != null) {
- mc.fontRenderer.drawString( getFormat(boots) + (boots.getMaxDamage() - boots.getItemDamageForDisplay()) + "", x - 25, y / 2+ 7 - 18 * position, 16777215);
- itemRenderer.renderItemAndEffectIntoGUI(mc.fontRenderer, mc.getTextureManager(), boots, x, y / 2+ 2 - 18 * position);
- GL11.glDisable(GL11.GL_LIGHTING);
- ++position;
- }
- if (leggings != null) {
- mc.fontRenderer.drawString( getFormat(leggings) + (leggings.getMaxDamage() - leggings.getItemDamageForDisplay()) + "", x - 25, y / 2+ 7 - 18 * position, 16777215);
- itemRenderer.renderItemAndEffectIntoGUI(mc.fontRenderer, mc.getTextureManager(), leggings, x, y / 2+ 2 - 18 * position);
- GL11.glDisable(GL11.GL_LIGHTING);
- ++position;
- }
- if (chestplate != null) {
- mc.fontRenderer.drawString( getFormat(chestplate) + (chestplate.getMaxDamage() - chestplate.getItemDamageForDisplay()) + "", x - 25, y / 2+ 7 - 18 * position, 16777215);
- itemRenderer.renderItemAndEffectIntoGUI(mc.fontRenderer, mc.getTextureManager(), chestplate, x, y / 2+ 2 - 18 * position);
- GL11.glDisable(GL11.GL_LIGHTING);
- ++position;
- }
- if (helmet != null) {
- mc.fontRenderer.drawString( getFormat(helmet) + (helmet.getMaxDamage() - helmet.getItemDamageForDisplay()) + "", x - 25, y / 2+ 7 - 18 * position, 16777215);
- itemRenderer.renderItemAndEffectIntoGUI(mc.fontRenderer, mc.getTextureManager(), helmet, x, y / 2+ 2 - 18 * position);
- GL11.glDisable(GL11.GL_LIGHTING);
- ++position;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement