Entity spawning on entity crash

Started by MrMoo100 on

Topic category: Help with Minecraft modding (Java Edition)

Joined Dec 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Entity spawning on entity crash
Tue, 12/30/2025 - 01:19 (edited)

In the Java mod that I am making (1.21.8), I need to make an item that spawns mobs on a block with a cooldown (kind of like a spawn egg). However, a strange crash occurs every time I try to spawn my mob when looking at the same mob. This doesn't happen when looking at other mobs though. Is there any way to fix this?

Edited by MrMoo100 on Tue, 12/30/2025 - 01:19
Joined Dec 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Update: The crash seems to…
Tue, 12/30/2025 - 01:08

Update: The crash seems to be due to an error when right clicking the entity. I have tried adding a blank script to when the entity is right clicked but it has not helped.

Joined Dec 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Just fixed it! The crash was…
Tue, 12/30/2025 - 01:19

Just fixed it! The crash was because the entity was tameable without a breeding item.