mirror of
https://github.com/smartcmd/MinecraftConsoles.git
synced 2026-08-20 09:57:09 +00:00
fix: add condition if item has mutiple layers
This commit is contained in:
parent
6b39e661a4
commit
9c5df93e96
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue