I have a problem with mob's code, and idk what kind of problem is it.

Started by lightcat22u1 on

Topic category: Help with Minecraft modding (Java Edition)

Joined Jul 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I have a problem with mob's code, and idk what kind of problem is it.

https://imgur.com/a/TYbwmAK <-- code

I'm codding a boss enemy. It can break blocks near itself, summon mobs, throw projectiles, teleport you and dash.

Sometimes it just crushes the world and you can't save it and later you can't join it.

Idk what is problem with code, maybe you can help me?

Joined Jul 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
It isn't memory usage or CPU…
Sun, 05/04/2025 - 20:08

It isn't memory usage or CPU problem

Joined Apr 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I think the only block that…
Sun, 05/04/2025 - 21:57

I think the only block that could cause that is the while loop, if the condition to break out of it is not met it will execute forever, and since when a while loop is executing the game freezes it will never be met, causing the crash