Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- PREREQUISITES:
- /scoreboard objectives add hasBONE dummy
- MECHANISM:
- http://i.imgur.com/VqqbTjj.png
- COMMANDS:
- 1. Sets player scores to 0 for 'hasBONE'. Required to do it this way since players are not automatically tracked in 1.8, and scores are being reset at the end.
- /scoreboard players set @a hasBONE 0
- 2. Sets player scores to 1 for 'hasBONE' if they have the bone in their inventory. This separates those who has bones from those who don't.
- /scoreboard players set @a hasBONE 1 {Inventory:[{id:minecraft:bone,tag:{display:{Name:"Custom Name"}}}]}
- 3. Gives players the bone if they don't have it.
- /give @a[score_hasBONE=0] minecraft:bone 1 0 {display:{Name:"Custom Name"}}
- 4. Sets item entities 'hasBONE' score to 1 if their item is the custom bone.
- /scoreboard players set @e[type=Item] hasBONE 1 {Item:{id:minecraft:bone,tag:{display:{Name:"Custom Name"}}}}
- 5. Kills those items that has that score (so only the special bones will be killed)
- /kill @e[type=Item,score_hasBONE_min=1]
- 6. And resetting the 'hasBONE' objective to prevent clutter from item entities being tracked.
- /scoreboard players reset * hasBONE
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement