Started by
CluckNugget
on
Topic category: Help with Minecraft modding (Java Edition)
I'm trying to make a simple NPC that you can find around breaking trees, but the "Break block" task makes the NPC jump on the block (like a zombie on turtle eggs) to break it. My solution would be to make a procedure that activates on spawn with a while loop that checks if there is a wood block near it and if not go in a random direction, but I don't think there's any way to find the nearest block of a type. Is there some workaround I could use that would allow me to make this NPC?
Hello!
You could use an 'On Entity Tick Update' procedure, then inside 'Procedure templates' [found above the list],
click on 'check for block in 6x6x6 box', then edit it to suit your needs.
Hope this helps!
Thanks! I think I can get my mob to work using this.