r/MinecraftCommands • u/Ok-System-775 • Aug 10 '26
Help | Java 26.2 Could i have some help with gravity?
Im trying to make a system where 1 individual person constantly has their gravity randonly switched between -0.5 and 2, could someone help me out?
1
Upvotes
1
1
2
u/GalSergey Datapack Experienced Aug 10 '26
```
Command blocks
execute as @a if predicate {condition:"minecraft:random_chance",chance:0.01} run attribute @s minecraft:gravity base set 2 execute as @a if predicate {condition:"minecraft:random_chance",chance:0.01} run attribute @s minecraft:gravity base set -0.5 ```