Hello everyone,
i’d like to know how some could modify the AI of an entity (in my case a villager). I want this villager to just stay where he is and optionally look at the nearest Player around. I looked through the avaiable data manipulators and found something that should fit my needs: AgentData
I just have the huge problem that i don’t even think of how i could work with it. It just accepts DataHolders and i found absolutely no documentation on how i should be able to modify his behaviour then.
Second:
InvulnerabilityData javadoc says:
Signifies that an Entity is "invulnerable" to any sort of damage for an expiring period of "tick"s. Usually applicable to all Entity.
So far so good, but when i look at the javadoc for the function setInvulnerableTicks
it says:
Sets the amount of ticks that the Wither should stay invulnerable for. Note: This causes an explosion when the time runs out.
Okay, neat feature, but i don’t want to sacrifice my villager when he isn’t god anymore…
Also, is there anyways a magic number to make him invulnerable forever?
Thank you very much!