Topic category: Help with Minecraft modding (Java Edition)
Hey guys, this is a pree simple problem but I am not sure why I am slightly struggling with this.
So, I made the AI behave in a way where they will follow the master but I want to set the condition where it will only follow owner if they are holding an item called a "whistle". The current block code that I have for this condition is:
IDK if the image works so I will paraphrase:
If item in main-hand of Event/target entity = whistle (all in red boxes except for Event/target entity) {
do Return true
}
do Return false
I tried following the examplegiven in the wiki but it did not work.
Is there something I did wrong? My guess would be that I am not referring to the correct entity (the target entity) but I don't know how to refer to the owner specifically in block or script code. Is there anyone who knows how?
TY in advance
Yea sorry guys the image doesn't work so I hope my paraphrase was enough. Please ask me if you guys have any trouble understanding it.