Command Block Tutorial #162: Item Gravity/Gravity Gun Commands in Minecraft (1.19+)
In this video I will show you how to summon any Minecraft item and make it float in the air instantly. I'll also show how to give yourself a special item that allows you give an item you throw out of your inventory or dropped on a block no gravity and being able to give items back their gravity with ease.
Commands:
* To summon an item with no gravity:
- Example (Impulse Command Block): /summon item ~ ~1.5 ~ {NoGravity:1,Item:{id:"minecraft:diamond",Count:1b}}
* To get the Item Gravity Gun (Impulse command Block):
/give @p minecraft:carrot_on_a_stick{display:{Name:"{\"text\":\"Item Gravity Gun\"}"}}
* To activate the Item Gravity Gun:
Scoreboard Commands (To add and remove):
- /scoreboard objectives add Item_Gravity minecraft.used:minecraft.carrot_on_a_stick
- /scoreboard objectives remove Item_Gravity
1. Repeater Command Block: /execute as @a[nbt={Inventory:[{Slot:-106b,id:"minecraft:carrot_on_a_stick",tag:{display:{Name:"{\"text\":\"Item Gravity Gun\"}"}}}]}] run scoreboard players set @e[scores={Item_Gravity=1..}] Item_Gravity 0
2. Chain Command Block: /execute at @p run data merge entity @e[type=minecraft:item,sort=nearest,limit=1] {NoGravity:1}
3. Repeater Command Block: /execute if entity @a[nbt={SelectedItem:{id:"minecraft:carrot_on_a_stick",tag:{display:{Name:"{\"text\":\"Item Gravity Gun\"}"}}}}] run scoreboard players set @e[scores={Item_Gravity=1..}] Item_Gravity 0
4. Chain Command Block: /execute at @p run data merge entity @e[type=minecraft:item,sort=nearest,limit=1] {NoGravity:0}
5. Chain Command Block: /execute at @p run execute if entity @e[type=item,nbt={OnGround:1b},distance=0..8] run tp @e[type=minecraft:item,distance=0..8,sort=nearest,limit=1] @p
Music:
1. Gaming Sound FX:
* Monkeys Spinning Monkeys (Kevin MacLeod) - Gaming Background Music (HD):
https://www.youtube.com/watch?v=pr42a...
Other Videos By RedstoneKnightX
Other Statistics
Minecraft Statistics For RedstoneKnightX
RedstoneKnightX presently has 1,527,317 views for Minecraft across 384 videos, with His channel uploaded over 2 days worth of Minecraft videos. This is 85.45% of the total watchable video on RedstoneKnightX's YouTube channel.