How do i make my mobs pick up items in the world, and place them in their inventories?

Started by Chemistry101 on

Topic category: Help with Minecraft modding (Java Edition)

Joined May 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How do i make my mobs pick up items in the world, and place them in their inventories?

I am trying to make my mobs pick everything up they come in contact with and then convert them into emeralds in their inventories. I cant seem to find any info on how to make mobs pick stuff up that is recent.

Joined May 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
You might be able to do this…
Fri, 03/27/2026 - 10:43

You might be able to do this by looping through the entities within like 1 block every tick, checking if it is an item entity, and if so, then deleting the entity and adding an emerald to the mob's inventory.