An object falling under constant acceleration travels a distance in an amount of time given by
where is the object's starting velocity. For an object dropped from rest, . Plugging that in and solving for , we find
Using this equation, we can approximate the acceleration due to gravity in Minecraft by timing how long it takes something to fall some distance. This model assumes constant acceleration, which means it ignores things like drag forces from air resistance. It turns out, Minecraft actually does have air resistance, but we will get there a bit later.
Youtuber nopefully used the above approximation to determine the gravitational acceleration of sand blocks (further analyzed here). Since then, though, the addition of command blocks and scoreboards provide a simple way to time things in game, so that's the approach I'll take.
The experiment is simple: jump off of stuff, time it with command blocks, and plug the result in the above equation (1) to figure out the gravitational acceleration of a player. For timing, I used Sethbling's stopwatch design. The timer-starting command block (figure 1) is activated by a lever which also triggers a trapdoor, causing you to fall onto a pressure plate below, stopping the timer (figure 2).
I repeated this experiment five times at three different heights. The data is in the table below (remember, a Minecraft block is 1 meter on each side):
|Height (m)||Average Fall Time (s)||Acceleration (m/s2)|
So using model (1), Minecraft's gravitational acceleration is around 23 m/s2. But as I mentioned above, we're neglecting air resistance. There isn't an easy way to experimentally measure the air resistance, but luckily a video game provides us with something that nature does not: the source code. So let's cheat a little bit and take a look under the hood.
In the EntityLivingBase class, there's a method named moveEntityWithHeading that is called 20 times per second (each "tick"), updating the entity's velocity. If there isn't a block under the living entity (in other words, it's falling), the downward velocity is increased by 0.08 and decreased by 2% each tick. This means there's a constant acceleration component that is 0.08 blocks/tick2 = 32 m/s2 and a drag force that is directly proportional to the velocity. 32 m/s2 is a lot different than our measured 23 m/s2, so clearly the drag force is not something that can be ignored. Also, 32m/s2 is over 3 times greater than the gravity on Earth! (An inventory of cobble is seriously heavy.)
On Earth, the gravitational acceleration is about 9.8m/s2 near the surface, and is the same for all objects regardless of how much they weigh. This isn't the case in Minecraft, as you can see in the more detailed table on Minecraft wiki. The "drag" contribution is also different for different entities (which is slightly more realistic since air resistance depends on the size and shape of the object).
The existence of a non-negligible drag force complicates the task of experimentally determining Minecraft's gravitational acceleration. But it also means that we have a more fun differential equation to play with! We can start out by writing down the equations of motion for the object falling. From the source code, we know that the drag force is proportional to the velocity, so we can use a linear drag model for the forces:
where is the object's mass, is the total acceleration, is the acceleration due to gravity, is some sort of drag coefficient and is the object's velocity. Remembering from physics class that acceleration is the first derivative of velocity with respect to time (denoted ), we can substitute . Doing that and diving both sides by gives us an equation for the total acceleration:
We can take some values of and from the table and graph the velocity (equation 2) of each of the different entities as they fall:
The velocity increases for a bit, but the rate at which it increases (the acceleration) slows with time until the entity travels at a constant velocity. This is called terminal velocity, and it's reached when the gravitational force and the force due to air resistance balance out. You can see that a falling player can catch up to most other entities, except for fired arrows.*
You can see the raw data in a Google spreadsheet here. I encourage you to try out this set up and Minecraft physics experiments. Please share your findings!
*So if, for example, you're engaging in a PvP fight on Overcast Network and someone tries to jump out of the world to deny you a kill, look over the edge and shoot! Your arrow has a chance of catching up to them.