diff --git a/Minecraft.Client/Common/UI/UIControl_list.cpp b/Minecraft.Client/Common/UI/UIControl_list.cpp index 1dd15ec2..2871e360 100644 --- a/Minecraft.Client/Common/UI/UIControl_list.cpp +++ b/Minecraft.Client/Common/UI/UIControl_list.cpp @@ -15,15 +15,15 @@ bool UIControl_List::setupControl(UIScene* scene, IggyValuePath* parent, const s bool success = UIControl_Base::setupControl(scene, parent, controlName); - m_removeAllItemsFunc = registerFastName(L"removeAllItems"); - m_funcHighlightItem = registerFastName(L"HighlightItem"); - m_funcRemoveItem = registerFastName(L"RemoveItem"); - m_funcSetTouchFocus = registerFastName(L"SetTouchFocus"); - m_funcCanTouchFocus = registerFastName(L"CanTouchFocus"); - m_funcCanTouchTrigger = registerFastName(L"CanTouchTrigger"); - m_funcEnableItem = registerFastName(L"EnableItem"); - m_funcSetItemLabel = registerFastName(L"SetItemLabel"); - m_funcGetItemLabel = registerFastName(L"GetItemLabel"); + m_removeAllItemsFunc = registerFastName(L"removeAllItems"); + m_funcHighlightItem = registerFastName(L"HighlightItem"); + m_funcRemoveItem = registerFastName(L"RemoveItem"); + m_funcSetTouchFocus = registerFastName(L"SetTouchFocus"); + m_funcCanTouchFocus = registerFastName(L"CanTouchFocus"); + m_funcCanTouchTrigger = registerFastName(L"CanTouchTrigger"); + m_funcEnableItem = registerFastName(L"EnableItem"); + m_funcSetItemLabel = registerFastName(L"SetItemLabel"); + m_funcGetItemLabel = registerFastName(L"GetItemLabel"); return success; } diff --git a/Minecraft.World/EnderDragon.cpp b/Minecraft.World/EnderDragon.cpp index f8e4871f..240799f7 100644 --- a/Minecraft.World/EnderDragon.cpp +++ b/Minecraft.World/EnderDragon.cpp @@ -1968,3 +1968,11 @@ Vec3 *EnderDragon::getHeadLookVector(float a) } return result; } + +wstring EnderDragon::getAName() +{ + if (hasCustomName()) + return getCustomName(); + + return app.GetString(IDS_ENDERDRAGON); +} \ No newline at end of file diff --git a/Minecraft.World/EnderDragon.h b/Minecraft.World/EnderDragon.h index b4c33375..273fd87b 100644 --- a/Minecraft.World/EnderDragon.h +++ b/Minecraft.World/EnderDragon.h @@ -183,7 +183,7 @@ public: double getHeadPartYRotDiff(int partIndex, doubleArray bodyPos, doubleArray partPos); Vec3 *getHeadLookVector(float a); - virtual wstring getAName() { return app.GetString(IDS_ENDERDRAGON); }; + virtual wstring getAName(); virtual float getHealth() { return LivingEntity::getHealth(); }; virtual float getMaxHealth() { return LivingEntity::getMaxHealth(); }; virtual int getDimension() { return Entity::dimension; }; diff --git a/Minecraft.World/WitherBoss.cpp b/Minecraft.World/WitherBoss.cpp index af406a93..5df72704 100644 --- a/Minecraft.World/WitherBoss.cpp +++ b/Minecraft.World/WitherBoss.cpp @@ -582,3 +582,11 @@ void WitherBoss::ride(shared_ptr e) { riding = nullptr; } + +wstring WitherBoss::getAName() +{ + if (hasCustomName()) + return getCustomName(); + + return app.GetString(IDS_WITHER); +} \ No newline at end of file diff --git a/Minecraft.World/WitherBoss.h b/Minecraft.World/WitherBoss.h index 65b950d7..3941b567 100644 --- a/Minecraft.World/WitherBoss.h +++ b/Minecraft.World/WitherBoss.h @@ -106,5 +106,5 @@ public: virtual float getMaxHealth() { return Monster::getMaxHealth(); }; virtual float getHealth() { return Monster::getHealth(); }; virtual int getDimension() { return Entity::dimension; }; - virtual wstring getAName() { return app.GetString(IDS_WITHER); }; + virtual wstring getAName(); }; \ No newline at end of file