Started by
Bunnie1000
on
Topic category: Help with Minecraft modding (Java Edition)
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.
Does anyone know why this happens?
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
waitprocedure block though.