What does the gamerule /gamerule doPhysics do?

I accidentally put on that gamerule and I dont know what it does!

Also what is the default setting for that gamerule? Is it set to true or false by default?


Solution 1:

"doPhysics" is not a vanilla gamerule.

However, you can create your own custom gamerules by simply typing in the name of a gamerule that is not used. The game will not make use of that gamerule whatsoever, and nothing will change by it simply existing.

Map-makers can make use of the gamerule's value using CommandStats, requiring a clocking mechanism for detection. For instance, setting down a Repeating command block, standing on top of it, and typing the following yourself a single time (assuming there is a valid target and objective for the CommandStat):

/stats block ~ ~-1 ~ set QueryResult #doPhysics Gamerules

And placing the following command in the command block:

/gamerule doPhysics

Will set the "Gamerules" score of fake player "#doPhysics" equal to the numerical representation of the gamerule's value (0 for false, 1 for true) whenever the command is executed. You would then use that to detect the gamerule's value, such as determining if the value is "true":

/scoreboard players test #doPhysics Gamerules 1 1

But otherwise it will do nothing to your game if you are not detecting it yourself with other commands.