When entity dies, check if player has a specific item in inventory

Started by Chiwi on

Topic category: Help with Minecraft modding (Java Edition)

Joined Jun 2015
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
When entity dies, check if player has a specific item in inventory

Hello! I would like that when a specific entity dies, it checks whether the player has a specific item in their inventory, and if they do, it changes the custom data logic tag.

The problem is that when I create the procedure, it doesn’t let me select it in the “when entity dies” section because there are “missing dependencies.” I’ve tried to fix it in a thousand ways, but I can’t find the solution.

If anyone knows how I could solve it or has any clues, I would be very grateful. Thank you very much! :)

 

Joined May 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Which dependency is the…
Fri, 03/27/2026 - 09:54

Which dependency is the procedure missing? Screenshots of your procedure would also be helpful.

Joined Jul 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Probably the provided…
Sat, 03/28/2026 - 09:35

Probably the provided itemstack is wrong, switch with the exact item from the if statement before

Joined Jun 2015
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
You were right! It…
Tue, 03/31/2026 - 08:33

You were right! It recognizes it now, thank you so much! 😊