4
This is just a dump of all the commands for the YouTube video. If you want to learn to add this to your game watch the video and follow the steps.
1./execute if entity @a[nbt={Inventory:[{Slot:-106b,id:"minecraft:red_stained_glass_pane",tag:{display:{Name:'{"text":"force choke"}'}}}]}] as @a[nbt={Inventory:[{Slot:-106b,id:"minecraft:red_stained_glass_pane",tag:{display:{Name:'{"text":"force choke"}'}}}]}] at @a[nbt={Inventory:[{Slot:-106b,id:"minecraft:red_stained_glass_pane",tag:{display:{Name:'{"text":"force choke"}'}}}]}] anchored eyes positioned ^ ^ ^7 run execute as @e[distance=..5,limit=1] run tp @s ^ ^ ^-4 ~180 0
2./execute if entity @a[nbt={Inventory:[{Slot:-106b,id:"minecraft:red_stained_glass_pane",tag:{display:{Name:'{"text":"force choke"}'}}}]}] as @a[nbt={Inventory:[{Slot:-106b,id:"minecraft:red_stained_glass_pane",tag:{display:{Name:'{"text":"force choke"}'}}}]}] at @a[nbt={Inventory:[{Slot:-106b,id:"minecraft:red_stained_glass_pane",tag:{display:{Name:'{"text":"force choke"}'}}}]}] anchored eyes positioned ^ ^ ^7 run execute as @e[distance=..5,limit=1] run effect give @s minecraft:wither 1 3 true
3./execute if entity @a[nbt={Inventory:[{Slot:-106b,id:"minecraft:red_stained_glass_pane",tag:{display:{Name:'{"text":"force choke"}'}}}]}] as @a[nbt={Inventory:[{Slot:-106b,id:"minecraft:red_stained_glass_pane",tag:{display:{Name:'{"text":"force choke"}'}}}]}] at @a[nbt={Inventory:[{Slot:-106b,id:"minecraft:red_stained_glass_pane",tag:{display:{Name:'{"text":"force choke"}'}}}]}] anchored eyes positioned ^ ^ ^7 run execute as @e[distance=..5,limit=1] run effect give @s minecraft:slow_falling 2 255 true
4.(OPTIONAL). /execute as @a[nbt={Inventory:[{Slot:-106b,id:"minecraft:red_stained_glass_pane",tag:{display:{Name:'{"text":"force choke"}'}}}]}] at @a[nbt={Inventory:[{Slot:-106b,id:"minecraft:red_stained_glass_pane",tag:{display:{Name:'{"text":"force choke"}'}}}]}] run tp @s @s
1./execute if entity @a[nbt={Inventory:[{Slot:-106b,id:"minecraft:red_stained_glass_pane",tag:{display:{Name:'{"text":"force choke"}'}}}]}] as @a[nbt={Inventory:[{Slot:-106b,id:"minecraft:red_stained_glass_pane",tag:{display:{Name:'{"text":"force choke"}'}}}]}] at @a[nbt={Inventory:[{Slot:-106b,id:"minecraft:red_stained_glass_pane",tag:{display:{Name:'{"text":"force choke"}'}}}]}] anchored eyes positioned ^ ^ ^7 run execute as @e[distance=..5,limit=1] run tp @s ^ ^ ^-4 ~180 0
2./execute if entity @a[nbt={Inventory:[{Slot:-106b,id:"minecraft:red_stained_glass_pane",tag:{display:{Name:'{"text":"force choke"}'}}}]}] as @a[nbt={Inventory:[{Slot:-106b,id:"minecraft:red_stained_glass_pane",tag:{display:{Name:'{"text":"force choke"}'}}}]}] at @a[nbt={Inventory:[{Slot:-106b,id:"minecraft:red_stained_glass_pane",tag:{display:{Name:'{"text":"force choke"}'}}}]}] anchored eyes positioned ^ ^ ^7 run execute as @e[distance=..5,limit=1] run effect give @s minecraft:wither 1 3 true
3./execute if entity @a[nbt={Inventory:[{Slot:-106b,id:"minecraft:red_stained_glass_pane",tag:{display:{Name:'{"text":"force choke"}'}}}]}] as @a[nbt={Inventory:[{Slot:-106b,id:"minecraft:red_stained_glass_pane",tag:{display:{Name:'{"text":"force choke"}'}}}]}] at @a[nbt={Inventory:[{Slot:-106b,id:"minecraft:red_stained_glass_pane",tag:{display:{Name:'{"text":"force choke"}'}}}]}] anchored eyes positioned ^ ^ ^7 run execute as @e[distance=..5,limit=1] run effect give @s minecraft:slow_falling 2 255 true
4.(OPTIONAL). /execute as @a[nbt={Inventory:[{Slot:-106b,id:"minecraft:red_stained_glass_pane",tag:{display:{Name:'{"text":"force choke"}'}}}]}] at @a[nbt={Inventory:[{Slot:-106b,id:"minecraft:red_stained_glass_pane",tag:{display:{Name:'{"text":"force choke"}'}}}]}] run tp @s @s
Tags |
tools/tracking
5347510
6
minecraft-starwars-force-choke
Create an account or sign in to comment.
Use a custom item tag instead
/give @p dirt{custom_tag:1b}
/execute if entity @p[nbt={SelectedItem:{id:"minecraft:dirt",tag:{custom_tag:1b}}}] run say hi
Notice how a lot less nbt is used; And then after, you can use @s because you've already selected that entity through the 'as' subcommand
e.g. For the 1st command:
/execute as @a[nbt={Inventory:[{Slot:-106b,id:"minecraft:red_stained_glass_pane",tag:{force_choke:1b}}]}] at @s anchored eyes positioned ^ ^ ^7 as @e[distance=..5,limit=1] run tp @s ^ ^ ^-4 ~180 0