I was expecting the zombie's max health value to change.
The server gave me a critical error instead.
If I understood correctly, you simply spawned a zombie and this issue occurred? If so, I'm afraid I can't reproduce this.
ah, I think I see your issue. You're using a custom Zombie class by my eyes. When your initEntity() is called, have you called parent::initEntity() before attempting to do this? If you haven't, the attribute map will not yet be initialized.
My bad.
That solves it. I was trying to move my project over from G-fork to here.
All the mob classes had this:
public function initEntity(){
$this->setMaxHealth(20);
parent::initEntity();
}
Thanks <3
Most helpful comment
My bad.
That solves it. I was trying to move my project over from G-fork to here.
All the mob classes had this:
Thanks <3