{
ItemStack stack = mc.thePlayer.inventory.getCurrentItem();
if(stack != null && stack.getItem() instanceof ItemGun)
{
ItemGun gunItem = (ItemGun)stack.getItem();
GunType gunType = gunItem.type;
int x = 0;
for(int n = 0; n < gunType.numAmmoItemsInGun; n++)
{
ItemStack bulletStack = ((ItemGun)stack.getItem()).getBulletItemStack(stack, n);
if(bulletStack != null && bulletStack.getItem() != null && bulletStack.getItemDamage() < bulletStack.getMaxDamage())
{
RenderHelper.enableGUIStandardItemLighting();
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, 240F, 240F);
drawSlotInventory(mc.fontRenderer, bulletStack, i / 2 + 16 + x, j - 65);
GL11.glDisable(GL12.GL_RESCALE_NORMAL);
RenderHelper.disableStandardItemLighting();
String s = (bulletStack.getMaxDamage() - bulletStack.getItemDamage()) + "/" + bulletStack.getMaxDamage();
if(bulletStack.getMaxDamage() == 1)
s = "";
mc.fontRenderer.drawString(s, i / 2 + 32 + x, j - 59, 0x000000);
mc.fontRenderer.drawString(s, i / 2 + 33 + x, j - 60, 0xffffff);
x += 16 + mc.fontRenderer.getStringWidth(s);
}
}
//Render secondary gun
PlayerData data = PlayerHandler.getPlayerData(mc.thePlayer, Side.CLIENT);
if(gunType.oneHanded && data.offHandGunSlot != 0)
{
ItemStack offHandStack = mc.thePlayer.inventory.getStackInSlot(data.offHandGunSlot - 1);
if(offHandStack != null && offHandStack.getItem() instanceof ItemGun)
{
GunType offHandGunType = ((ItemGun)offHandStack.getItem()).type;
x = 0;
for(int n = 0; n < offHandGunType.numAmmoItemsInGun; n++)
{
ItemStack bulletStack = ((ItemGun)offHandStack.getItem()).getBulletItemStack(offHandStack, n);
if(bulletStack != null && bulletStack.getItem() != null && bulletStack.getItemDamage() < bulletStack.getMaxDamage())