1

Test if player is carrying nothing

Veritas025's Avatar Veritas0253/4/15 5:57 pm
1 emeralds 262 3
3/4/2015 6:18 pm
Veritas025's Avatar Veritas025
So I'm making a command block mechanism, but I need to test if the player is carrying something other than a specified item like testfor @p {SelectedItem:{id:minecraft:stick}}, whereas this instance it'd activate if the player is carrying anything but a stick. If that is impossible is there a way to test if the player is not carrying anything at all?
Posted by Veritas025's Avatar
Veritas025
Level 55 : Grandmaster Engineer
37

Create an account or sign in to comment.

3

1
03/04/2015 6:18 pm
Level 55 : Grandmaster Engineer
Veritas025
Veritas025's Avatar
wow that was the biggest facepalm of my life thanks for responses
1
03/04/2015 6:17 pm
Level 33 : Artisan Engineer
Jmal116
Jmal116's Avatar
If you run the command you currently have on a fill clock, a comparator will output a signal whenever the player is holding a stick. To see when a player is not holding the stick, simply invert the output of the comparator. The torch will then go off when a player holds the stick, and back on when they select something else.
1
03/04/2015 6:10 pm
Level 19 : Journeyman Scribe
Akeustlom
Akeustlom's Avatar
That same command, but invert the signal for anything but a stick. Maybe if you make one of those for every single item, it would work? I'm not the best redstoner in the world, but I think that might work.
Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome