Started by
MTOH
on
Topic category: Help with Minecraft modding (Java Edition)
Hello people!
I would like to ask how I would be able to make different behavioral phases for my horror entity. The phases individually work fine but changing between each phase and capping the amount of entities allowed to be on the world to 1 is proving to be quite hard. If it is of any help, the first phase is a weeping angel type phase that lasts from the moment it spawns till it gets within 5 blocks of the player. Then the chase phase is activated where the mob is given speed and is not restricted by the player looking at it. Right now I am using global variables that do not work and just despawn the entity every time. Are there any better ways to make this?
Cheers!
To do this, I would use a variable that holds the number of the stage you want. You could make a procedure to randomly change this, or change it when the mob is close to the player. Make it so that each phase is a different mob, and that if the phase 1 mob detects that the variable is in phase 2, despawn it and spawn in phase 2. This is what works for me.