Started by
fleWaf
on
Topic category: Help with Minecraft modding (Java Edition)
I'm making an entity called "Apex Hyperion" and when I spawn it the game crashes. I'm using a procedure to make a special attack and that seems to crash it. I removed the procedure and it worked fine. Apparently, it cannot get "getx" from the procedure.
Here´s crash log: https://pastebin.com/Ph1kTRVm
Procedure code (ApexHyperionPunch): https://pastebin.com/WAaBWBSw
It's kinda hard to tell without a picture of the procedure, but my guess is that you're somehow not giving it the correct entity to reference. Any entity function that has 'null' on it will return a null entity if its condition is not met, which can very easily crash the game. (Nearest entity, Entity targeted for attack, etc.) You generally want to first check that the nearest/targeted entity exists, (check if it's a subtype of 'living entity,') before doing anything with it. That may not fix the procedure, necessarily, but if this is the issue it should stop it from crashing.
Heres the procedure https://pasteboard.co/ESOOlieaNnm6.png
Though, I think it is what you are saying. I'll try to change it