1

Need help with 1.9 command

MrCatSquid's Avatar MrCatSquid2/17/16 5:07 pm
1 emeralds 324 2
2/17/2016 10:36 pm
Jmal116's Avatar Jmal116
Hey guys, MrCatSquid here. I've been playing some 1.9 recently, and I need a command that I just can't figure out. I guess I could if I tried, because I've done it before, but I'm way too tired right now. Basically, I need to give a player levetation 1 whenever they hold a feather. That's all I need figured out. It doesn't need to detect nams or slot, just the item in hand. If someone could figure this out for me, that'd help alot!
Posted by MrCatSquid's Avatar
MrCatSquid
Level 21 : Expert Fish
12

Create an account or sign in to comment.

2

1
02/17/2016 10:36 pm
Level 33 : Artisan Engineer
Jmal116
Jmal116's Avatar
Skitto493You would need to make 9 commands, 1 for each of the hotbar slots. Each of these commands would look like this:

/scoreboard players tag @a add YourTag {SelectedItemSlot:0,Inventory:[{Slot:0b,id:"minecraft:feather"}]}

-snip-

Actually, there's a SelectedItem tag. It makes things like this much easier:scoreboard players tag @a add YourTag {SelectedItem:{id:"minecraft:feather"}}
Everything was good. I just thought this was worth pointing out.
1
02/17/2016 7:14 pm
Level 55 : Grandmaster Dragon
Skitto493
Skitto493's Avatar
You would need to make 9 commands, 1 for each of the hotbar slots. Each of these commands would look like this:

/scoreboard players tag @a add YourTag {SelectedItemSlot:0,Inventory:[{Slot:0b,id:"minecraft:feather"}]}

Then you would need this command:

/effect @a[tag=YourTag] levitation 1 1 true

Then, you would need this command:

/scoreboard players tag @a remove YourTag

You will need to hook these up in a sequence.
# = repeating command block
@ = chain command block
> = Direction command block is facing

#>@>@>
#
#
#
#
#
#
#
#

Each # has one of the tagging commands, the first @ has the second command, and the last symbol has the last command.
Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome