I want to spawn an egg when I breed my mob, could someone help me with that? I've been at it for hours now.

Started by Ghtrefg on

Topic category: Help with Minecraft modding (Java Edition)

Joined Oct 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I want to spawn an egg when I breed my mob, could someone help me with that? I've been at it for hours now.
Thu, 12/26/2024 - 01:38 (edited)

All I want is for my mob to lay an egg when bred with another of its kind. Clicking on my mob with a spawn egg should still spawn a baby, however, to mimic typical Vanilla mobs. I have everything pertaining to the egg itself finished, I just need my mob to lay it.

Edited by Ghtrefg on Thu, 12/26/2024 - 01:38
Joined Oct 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
And no, I cannot simply…
Thu, 12/26/2024 - 01:05

And no, I cannot simply despawn the babies and put an egg in their place, for that would mean having no babies at all, which I'm not particularily fond of.

You can use your entitys…
Thu, 12/26/2024 - 09:44

You can use your entitys tick and synced data to count ticks since last lay. Then on given interval (with random changes if you will), spawn item entity that represents your egg

I suggest you check our…
Thu, 12/26/2024 - 09:44

I suggest you check our tutorials collection playlist on our YouTube channel which contains many examples and tutorials that can help you get started with MCreator: https://www.youtube.com/playlist?list=PLAeL-oIFIEngE6jRgFYeFMfuj8WQsO3Ei