a mob that picks up items and brings them to the player

Started by Baryorex on

Topic category: Help with Minecraft modding (Java Edition)

Joined Feb 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
a mob that picks up items and brings them to the player

i want the oviraptor in my mod to pick up eggs and bring them to the player. how can i do this

Joined Feb 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I'm trying to do something…
Thu, 04/10/2025 - 22:24

I'm trying to do something similar, but I still haven't figured it out entirely. I think it is a bit easier if the eggs are living mobs on their own instead of blocks or items, then you can use the "For every entity of type in x, y, z within a radius of", then you get the coordinates of that entity and make your mob move towards it, you despawn the entity egg and give an item to the inventory of the oviraptor. When this item is used, it spawns the entity egg again. 

Then, you do another procedure that checks if the oviraptor has an item egg, and do the same "for every entity of type" but now for the player that has tamed them (I forgor to mention, add early an IF DO that checks if the oviraptor is tamed), and with a smaller radius. The idea is that this only works when the oviraptor is transported closer to the player. Then you can either make the oviraptor give the eggs it has collected to the player, or just wait until the player opens its inventory. There might be some details to fix, and I'm not sure if it would work exactly as I'm telling you, but it sounds like a fun idea, I might add it to my own mod.

Another maybe unnecessary detail is that I think the notion that gave the oviraptor their name was a bit exaggerated. The eggs it was found out were theirs, not stolen. So, you could maybe add a nest block where up to six eggs or something like that could be placed.  Make actually 7 blocks with a different custom model with one more egg than the previous, with a procedure that changes it (keeping the block's inventory) the more eggs you put on them, and then edit the first procedure so that if the oviraptor doesn't find any egg in the wild, but finds a nest (to find a block, look in the template procedure, it is one of the first in the list, but it is a bit annoying to configurate, at least for me), it sits above it. Then after some time, the eggs hatch. That way the oviraptor can be a surrogate mom for abandoned eggs.