'execute if items entity' is a great QoL change from using inventory nbt. However there is no single catch-all for players inventories to see if a player has a particular item anywhere at a given time. This usually requires blocking out the offhand, crafting inventory, cursor, and hotbar/extended inventory slots individually. Creating an additional sort type like players.* that targets ALL player inventory slots regardless of type would greatly shorten the call to check anywhere in a player's inventory for a specific item. While the 'contents' sort gets most player inventory slots, it neglects special slots like crafting or offhand. Honestly, seems like an oversight to not have it included initially. Examples below.
Current method (doesn't include armor slots either!) - unless items entity @s container.* paper unless items entity @s weapon.offhand paper unless items entity @s player.crafting.* paper unless items entity @s player.cursor
Proposed method - unless items entity @s players.*
Please sign in to leave a comment.
0 Comments