From 379434097aa4c7e854c3debe44ce44fed7c24ca1 Mon Sep 17 00:00:00 2001 From: Prakhar Sharma <149769581+Prakhar1808@users.noreply.github.com> Date: Fri, 13 Mar 2026 17:11:47 +0530 Subject: Fix witches' bottle color (#1205) * fix: witches' bottle is now the right color * fix: add condition if item has mutiple layers --- Minecraft.Client/ItemInHandRenderer.cpp | 2 +- Minecraft.World/LivingEntity.cpp | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Minecraft.Client/ItemInHandRenderer.cpp b/Minecraft.Client/ItemInHandRenderer.cpp index 66c922b4..13d4fc20 100644 --- a/Minecraft.Client/ItemInHandRenderer.cpp +++ b/Minecraft.Client/ItemInHandRenderer.cpp @@ -228,7 +228,7 @@ void ItemInHandRenderer::renderItem(shared_ptr mob, shared_ptrid]->getColor(item,0); + int col = Item::items[item->id]->getColor(item, layer); float red = ((col >> 16) & 0xff) / 255.0f; float g = ((col >> 8) & 0xff) / 255.0f; float b = ((col) & 0xff) / 255.0f; diff --git a/Minecraft.World/LivingEntity.cpp b/Minecraft.World/LivingEntity.cpp index 3ace8806..3af9efe9 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 +} -- cgit v1.2.3