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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user