Help with get entity procedure block

Started by Bunnie1000 on

Topic category: Help with Minecraft modding (Java Edition)

Joined Sep 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Help with get entity procedure block

I'm having trouble with finding an arrow shot form a vanilla bow using the "Get nearest entity" block, however as soon as the procedure is triggered, the game crashes. I have looked this up and it says to check if the variable is null, however I am only setting a local entity variable to the arrow.

Picture of my procedure

Does anyone know why this happens?

Joined Dec 2014
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
yeah so, simplified,…
Mon, 11/03/2025 - 20:33

yeah so, simplified, minecraft (mostly) runs all its, including yours, code one "procedure block" at a time. So it doesn't let any other code run in between it running the while loop. Therefore, when it doesn't find the arrow the first time the loop runs, it will never find it as it just gets stuck in that while loop, forever.

 

Since mcreator currently doesn't seem to have any shoot triggers this can't really be done cleanly without locking your procedure's code. You can try using a wait procedure block though.