In this video I will show how to give yourself a special item that allows you to have an invisible barrier that prevents all kinds of mobs and projectiles from even touching you.
Commands:
* To give yourself the item: /give @p minecraft:nether_star{display:{Name:"{\"text\":\"Force Field Star\"}"}}
1. Repeater Command Block: /execute as @a[nbt={Inventory:[{Slot:-106b,id:"minecraft:nether_star",tag:{display:{Name:"{\"text\":\"Force Field Star\"}"}}}]}] run execute at @p run tp @e[type=!minecraft:player,distance=0..5] ^ ^ ^5
2. Repeater Command Block: /execute as @a[nbt={Inventory:[{Slot:-106b,id:"minecraft:nether_star",tag:{display:{Name:"{\"text\":\"Force Field Star\"}"}}}]}] run execute at @p run effect give @e[type=!minecraft:player,distance=0..5] minecraft:levitation 5 2 true
3. Repeater Command Block: /execute as @a[nbt={Inventory:[{Slot:-106b,id:"minecraft:nether_star",tag:{display:{Name:"{\"text\":\"Force Field Star\"}"}}}]}] run execute at @p run execute at @e[type=!minecraft:player,distance=0..5] run particle minecraft:end_rod ~ ~1 ~ 0.2 0.2 0.2 0.001 10 force
Music:
1. Gaming Sound FX:
* Monkeys Spinning Monkeys (Kevin MacLeod) - Gaming Background Music (HD):
[ Ссылка ]...
![](https://s2.save4k.ru/pic/PZ5eewFa_Do/maxresdefault.jpg)