How to make an item that heals on pickup?

Started by Jacko22 on

Topic category: Help with Minecraft modding (Java Edition)

Joined Dec 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How to make an item that heals on pickup?

For those of you familiar with Terraria, I plan to add something akin to the small hearts that occasionally drop from enemies in that game. (if you are not familiar, they simply heal you a certain amount when picked up and then disappear) I'm having issues with my procedure, as events seem to not work half the time. I've put the procedure below, what I'm trying to do is first heal the player for 5 HP, and then remove the item from their inventory. I understand that there could then be issues if the player has a full inventory, if you have a possible fix for that it would be really appreciated.

Joined Jul 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
So change all event/target…
Thu, 06/04/2026 - 08:05

So change all event/target entity to source entity, other than the despawn

Joined Dec 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Yep, got that. Everything…
Thu, 06/04/2026 - 16:03

Yep, got that. Everything except the rotation is working (rotational equations are hella confusing)

Joined Dec 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I've messed around a bit,…
Thu, 06/04/2026 - 17:21

I've messed around a bit, and I actually kinda like it without the rotation, gives it bit of charm.

Joined Jul 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Alright then if you like it,…
Thu, 06/04/2026 - 18:10

Alright then if you like it, the equation should work though I have used it successfully multiple times, but nevermind

Joined Apr 2026
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
there is a call procedure,…
Sun, 06/28/2026 - 18:43

there is a call procedure, on item pickup, in the item triggers tab of items, you should be able to use that instead of tick update, I find it more reliable