Started by
Coolmanz7
on
Topic category: Help with Minecraft modding (Java Edition)
I'm trying to make a mob that attacks all non-undead mobs. I used an attack all living entities block in the AI and used this for the condition.
This didn't work as I think the entity is the one attacking, not being attacked. I tried using a get entity (entity) is targeting for attack block, but that crashed it. Does anyone know how to check for this? Thanks in advance.
Here is the image if it didn't load:
https://imgur.com/a/5C55xgo
Target may be empty in some cases, so you wil need to add null check
That's not the problem. Event/target entity refers to the custom mob itself, not the mob it may attack. Using "get entity (entity) is targeting for attack" also doesn't work because it is not targeting the entity yet. Do you know how to get the entity that will be targeted?
Maybe use it for continue to use instead of start condition, at this point the target may have already been set
That partly worked. The mob is now attacking, but is also attacking other undead. Here is the function:
https://imgur.com/a/YDzJ5rh
Then check for particular entity type, not behaviour type
That didn't work. But after more testing, I've determined it isn't actually running the condition. I put an explode block at the start, and it didn't do that in-game.
Klemen after this can u pls help me Klemen https://mcreator.net/forum/121451/structure-spawn-weight https://mcreator.net/forum/121563/how-would-i-have-procedure-run-only-i…