made the cache only render on the body

This commit is contained in:
Ellpeck 2018-10-21 14:44:16 +02:00
parent 00ba609408
commit baea1d91a9

View file

@ -101,6 +101,7 @@ public class ItemAuraCache extends ItemImpl implements ITrinketItem {
@Override @Override
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public void render(ItemStack stack, EntityPlayer player, RenderType type) { public void render(ItemStack stack, EntityPlayer player, RenderType type) {
if (type == RenderType.BODY) {
boolean armor = !player.inventory.armorInventory.get(EntityEquipmentSlot.CHEST.getIndex()).isEmpty(); boolean armor = !player.inventory.armorInventory.get(EntityEquipmentSlot.CHEST.getIndex()).isEmpty();
IRenderBauble.Helper.rotateIfSneaking(player); IRenderBauble.Helper.rotateIfSneaking(player);
GlStateManager.translate(-0.15F, 0.65F, armor ? -0.195F : -0.13F); GlStateManager.translate(-0.15F, 0.65F, armor ? -0.195F : -0.13F);
@ -109,3 +110,4 @@ public class ItemAuraCache extends ItemImpl implements ITrinketItem {
Helper.renderItemInWorld(stack); Helper.renderItemInWorld(stack);
} }
} }
}