[SOLVED] Despawn certain items upon player death

Started by Josephemer on

Topic category: Help with Minecraft modding (Java Edition)

Joined Nov 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
[SOLVED] Despawn certain items upon player death
Wed, 11/24/2021 - 04:26 (edited)

I'm looking to, upon a player dying, despawn only certain types of items that drop from their inventory.

For a specific example: Player dies. Player had sticks, diamonds and coal in their inventory. Sticks and diamonds drop on the ground like normal and stay there, but all dropped coal is immediately despawned.

I believe it's possible to do so with all dropped items as they are counted as a type entitity, but would it be possible to only target one specific type of dropped item?

Edited by Josephemer on Wed, 11/24/2021 - 04:26
Joined Nov 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Create a procedure and set…
Sun, 11/07/2021 - 14:24

Create a procedure and set thetrigger to ''entity dies''

Add 3 ''remove (number) (item) from (event/target entity) main inventory''

Set the first two to 1000, and the last one to 304.

This way if your inventory is full of stacks, it still removes all the chosen items.

64x9x4=2304

1000+1000+304=2304

https://imgur.com/a/uher1YM

Joined Feb 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How about when you want an…
Sat, 03/09/2024 - 11:27

How about when you want an entity to despawn after killing a player??