How can I fix this which is caused by return value of "java.util.Optional.orElse(Object)" is nul

Started by Xyther on

Topic category: Help with Minecraft modding (Java Edition)

Joined Mar 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How can I fix this which is caused by return value of "java.util.Optional.orElse(Object)" is nul

I'm trying to make a procedure which is going to make my custom mob able to move when I'm not looking at it with my crosshair but somehow ended up crashing when I put "Attempt to override motion vector" into the procedure. Is there an alternative way to this or a fix?

procedure

Joined Oct 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Try using "attempt to stop…
Mon, 03/17/2025 - 15:13

Try using "attempt to stop navigation of event/target entity".

Joined Mar 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I just tried using "attempt…
Tue, 03/18/2025 - 05:28

I just tried using "attempt to stop navigation of" block but it didn't stop the mob

MCreator ver: 2024.4
MC Ver: 1.20.1
 

Joined Mar 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
my bad, "attempt to stop…
Tue, 03/18/2025 - 06:05

my bad, "attempt to stop navigation of" does work but it just stops the mob for a second. How can I make it just stop completely?

Joined Oct 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I don't seem to have that…
Tue, 03/18/2025 - 13:53

I don't seem to have that problem? Maybe try using a while loop wit ha local var?