I've added my own entity to pocketmine-mp server:
class DinosaurEntity extends Entity { ... }
and would like to add random moves for my entity. I don't want to implement my own movement logic. It looks more easy to clone the logic from some existing vanilla entity.
Looking at Entity.php source code, I see they generate movements at onUpdate()
function. Looks like I supposed to use their _construct
as well.
But I don't understand how to do it.