fix: add condition if item has mutiple layers

This commit is contained in:
Prakhar1808 2026-03-13 13:49:17 +05:30
parent 6b39e661a4
commit 9c5df93e96

View file

@ -1354,6 +1354,10 @@ bool LivingEntity::shouldShowName()
Icon *LivingEntity::getItemInHandIcon(shared_ptr<ItemInstance> item, int layer)
{
if (item->getItem()->hasMultipleSpriteLayers())
{
return item->getItem()->getLayerIcon(item->getAuxValue(), layer);
}
return item->getIcon();
}
@ -1999,4 +2003,4 @@ bool LivingEntity::isAlliedTo(Team *other)
return getTeam()->isAlliedTo(other);
}
return false;
}
}