Started by
JD_Plays73
on
Topic category: Help with Minecraft modding (Java Edition)
Hi! I've been trying to deal with procedures and conditioning for a little bit now, as I've been getting the hang of it. But there's just one thing I really want, which is whenever a player wears a type of armor, an entity will identify the player wearing armor and proceed to attack said player. My problem with that is I'm not entirely sure how I could have the detecting part of the condition work. I've made a procedure act like a condition for the entity, but I'm not sure why it won't work.
This is what I tried to do for the procedure (note, I still barely understand the logistics of coding and this kind of stuff, so do bear in mind):
in the AI, you can have it attack players.
Add a condition to the AI block with a procedure that returns true if the player has a type of armor.
That should do the trick.
Correction: Your return function works.
The problem is probably with the AI's condition weirdness. I tend to circumvent this by having the condition be in both the starting and continuous condition fields.
I have done that beforehand, but still nothing had changed. Give me a moment to do it again...
Alright, so they still didn't detect the armor... Maybe it's the components/logic I used? Or the entity AI Tasks?