From 9c5df93e96b4af7f343d09a844111f9038a63b67 Mon Sep 17 00:00:00 2001 From: Prakhar1808 Date: Fri, 13 Mar 2026 13:49:17 +0530 Subject: [PATCH] fix: add condition if item has mutiple layers --- Minecraft.World/LivingEntity.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Minecraft.World/LivingEntity.cpp b/Minecraft.World/LivingEntity.cpp index 3ace88068..3af9efe96 100644 --- a/Minecraft.World/LivingEntity.cpp +++ b/Minecraft.World/LivingEntity.cpp @@ -1354,6 +1354,10 @@ bool LivingEntity::shouldShowName() Icon *LivingEntity::getItemInHandIcon(shared_ptr 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; -} \ No newline at end of file +}