Fix Wither and Ender Dragon Boss Custom Names

This commit is contained in:
GabsPuNs
2026-05-09 21:48:01 -04:00
parent 759bd89247
commit 957dc14986
5 changed files with 27 additions and 11 deletions

View File

@@ -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;
}

View File

@@ -1968,3 +1968,11 @@ Vec3 *EnderDragon::getHeadLookVector(float a)
}
return result;
}
wstring EnderDragon::getAName()
{
if (hasCustomName())
return getCustomName();
return app.GetString(IDS_ENDERDRAGON);
}

View File

@@ -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; };

View File

@@ -582,3 +582,11 @@ void WitherBoss::ride(shared_ptr<Entity> e)
{
riding = nullptr;
}
wstring WitherBoss::getAName()
{
if (hasCustomName())
return getCustomName();
return app.GetString(IDS_WITHER);
}

View File

@@ -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();
};