Рет қаралды 9,534
Hi guys! I'am D'Henry PH today I will teach you how to detect which slot are you holding using command blocks.
Reminder: This is only for the proof of concept and there's still a lot of flaws in this creation, but you can have up to 9 different controls if you improve this.
Commands:
CB1: replaceitem entity @p slot.weapon.mainhand 0 keep redstone_torch 1 0 {"minecraft:item_lock":{ "mode": "lock_in_slot" }}
CB2:clear @p redstone_torch
CB3:replaceitem entity @a slot.hotbar 8 keep air
CB4:replaceitem entity @a slot.hotbar 7 keep air
CB5:replaceitem entity @a slot.hotbar 6 keep air
CB6:replaceitem entity @a slot.hotbar 6 air
CB7:replaceitem entity @a slot.hotbar 7 air
CB8:replaceitem entity @a slot.hotbar 6 air
CB9:replaceitem entity @a slot.hotbar 8 air
CB10:replaceitem entity @a slot.hotbar 7 air
CB11:replaceitem entity @a slot.hotbar 8 air
=================================
1st commenter:
/ @marcelokiraofc
2nd commenter:
/ channel
3rd commenter:
/ @bobateaboi
If you have any idea comment down below and I'll give you a shoutout if I created your suggestion
I also gives a shoutout on the first commenter in my vids so be sure to hit that notification bell to become the first commenter!
I'm Filipino!🇵🇭
Follow me on Instagram www.instagram....
Thank you for watching!
#Tutorial#Hotbar#Minecraft