mirror of
https://github.com/neoStudiosLCE/neoLegacy.git
synced 2026-06-09 00:33:00 +00:00
refactor: remove duplicate custom name handling in boss renderers
The custom name assignment for boss mobs is already handled inside the `BossMobGuiInfo::setBossHealth` method. The removed code in both `WitherBossRenderer` and `EnderDragonRenderer` was redundant and not working.
This commit is contained in:
parent
506ebd2176
commit
a0d5c649b9
|
|
@ -89,10 +89,11 @@ void EnderDragonRenderer::render(shared_ptr<Entity> _mob, double x, double y, do
|
|||
// 4J - dynamic cast required because we aren't using templates/generics in our version
|
||||
shared_ptr<EnderDragon> mob = dynamic_pointer_cast<EnderDragon>(_mob);
|
||||
BossMobGuiInfo::setBossHealth(mob, false);
|
||||
if (!mob->getCustomName().empty())
|
||||
{
|
||||
BossMobGuiInfo::name = mob->getCustomName();
|
||||
}
|
||||
// GeorgeV22 - BossMobGuiInfo::setBossHealth already handles this
|
||||
// if (!mob->getCustomName().empty())
|
||||
// {
|
||||
// BossMobGuiInfo::name = mob->getCustomName();
|
||||
// }
|
||||
|
||||
MobRenderer::render(mob, x, y, z, rot, a);
|
||||
if (mob->nearestCrystal != nullptr)
|
||||
|
|
|
|||
|
|
@ -20,10 +20,11 @@ void WitherBossRenderer::render(shared_ptr<Entity> entity, double x, double y, d
|
|||
shared_ptr<WitherBoss> mob = dynamic_pointer_cast<WitherBoss>(entity);
|
||||
|
||||
BossMobGuiInfo::setBossHealth(mob, true);
|
||||
if (!mob->getCustomName().empty())
|
||||
{
|
||||
BossMobGuiInfo::name = mob->getCustomName();
|
||||
}
|
||||
// GeorgeV22 - BossMobGuiInfo::setBossHealth already handles this
|
||||
// if (!mob->getCustomName().empty())
|
||||
// {
|
||||
// BossMobGuiInfo::name = mob->getCustomName();
|
||||
// }
|
||||
|
||||
int modelVersion = dynamic_cast<WitherBossModel*>(model)->modelVersion();
|
||||
if (modelVersion != this->modelVersion)
|
||||
|
|
|
|||
Loading…
Reference in a new issue