1

Killing Items.

Dudamesh •5/23/15 5:57 am
•
610
•
5/24/2015 10:37 am
Some of you may not know, but you can clear dropped Items, by doing this command:
/kill @e[type=Item] if you hook it up to a clock, all dropped items will disappear almost instantly.

my question is how do I kill Items EXCEPT a certain Item.
If that's not possible, how do I detect an certain Item then.
Posted by
Dudamesh
Level 62 : High Grandmaster Senpai
74

  Have something to say?

Join • Sign in

5

Pepijn
• 05/24/2015 8:02 am
• Level 58 : Grandmaster Cyborg
You can use scoreboard to give a certain Item a score.

For example (for killing specific items!):
- set up a scoreboard dummy: /scoreboard objectives add Kill dummy
- make a clock with: /scoreboard players set @e[type=Item] Kill 1 {Item:{id:ITEM_NAME_HERE,Damage:DAMAGE_VALUE_HERE,tag:{ANY_ADDITIONAL_TAGS_HERE}}}

(Note that you can just leave out "Damage" and "tag" when you don't need them)

- add to the same clock: /kill @e[type=Item,score_Kill_min=1]

For example (for excluding specific items! This is what you want I think):
- set up a scorebord dummy: /scoreboard objectives add NoKill dummy
- make a clock with (IN THIS SPECIFIC ORDER, FILL CLOCKS WORK BEST):
> /scoreboard players set @e[type=Item] NoKill 0
(For each item, add this command:)
> /scoreboard players set @e[type=Item] NoKill 1 {Item:{id:ITEM_NAME_HERE,Damage:DAMAGE_VALUE_HERE,tag:{ANY_ADDITIONAL_TAGS_HERE}}}
> /kill @e[type=Item,score_NoKill=0]
1
Dudamesh
• 05/24/2015 10:37 am
• Level 62 : High Grandmaster Senpai
You sir are just the best
1
serdarminecraft
• 05/24/2015 9:19 am
• Level 18 : Journeyman Warrior
What if he is allready using scoreboards for another system and he needs to give an item that needs to be deleted the score of 1?
1
Pepijn
• 05/24/2015 9:43 am
• Level 58 : Grandmaster Cyborg
Dummy scoreboards don't interfere with eachother... if you're already using a scoreboard named Kill/NoKill, just use different names.
1
Dudamesh
• 05/24/2015 7:04 am
• Level 62 : High Grandmaster Senpai
Bump
1

Welcome