Started by
Josephemer
on
Topic category: Help with Minecraft modding (Java Edition)
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
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
How about when you want an entity to despawn after killing a player??