#is there any way to replace or remove items from the player on use?
1 messages · Page 1 of 1 (latest)
Sure. Detect the use with an advancement that then runs a reward function to replace the item in their hand with either an /item or /loot command
The above is the more versatile way of working and what you need for a bucket.
Food, projectiles, fully degraded items (0 durability) etc. have a more efficient way to achieve this by adding the use_remainder component. This does not trigger when "using" a fishing rod, sword etc. as the remainder only applies to the use that would otherwise "delete" or "convert" the item.