Ceiling Hover: Difference between revisions
No edit summary |
mNo edit summary |
||
Line 3: | Line 3: | ||
<youtube>bijMuKlme7k</youtube> |
<youtube>bijMuKlme7k</youtube> |
||
Ceiling Hover is a glitch that makes the player "hover" |
Ceiling Hover is a glitch that makes the player "hover" between a ceiling and a bouncy block (slime, or beds since 1.12). |
||
It can be performed by jumping under a ceiling such that the block 2.001b below the ceiling has bouncing properties. |
|||
Line 11: | Line 12: | ||
== Explanation == |
== Explanation == |
||
Whenever the Player collides with a block ( |
Whenever the Player collides vertically with a block (floor or ceiling), the game will apply collision physics. |
||
For almost every block, that just means setting the Player's vertical speed to 0. |
For almost every block, that just means setting the Player's vertical speed to 0. |
||
Line 50: | Line 51: | ||
When the game detects a vertical collision, it will consider the block 0.2m under the Player's position to apply collision physics (yes, even for ceiling collisions...) |
When the game detects a vertical collision, it will consider the block 0.2m under the Player's position to apply collision physics (yes, even for ceiling collisions...) |
||
With a ceiling collision, that generally concerns a block of air. But for ceilings strictly less than 2b tall, the block considered is at ground level instead. |
|||
⚫ | |||
⚫ | |||
# Jumping under 1.8125bc applies vertical collision with the block |
# Jumping under 1.8125bc applies vertical collision with the block 0.2m below the Player (at ground level). |
||
# If |
# If that block is a slime block, then vertical speed won't be set to 0, and the Player remains suspended under the ceiling. |
||
# Repeat step (2) until the Player's speed becomes negative due to gravity. |
# Repeat step (2) until the Player's vertical speed becomes negative due to gravity. |
||
'''Note:''' This glitch happens for |
'''Note:''' This glitch happens for a few ticks, but with Jump Boost it would take longer. Ceiling Hover can be interrupted at any time by sneaking. |
||
Revision as of 17:21, 17 March 2020
Ceiling Hover is a glitch that makes the player "hover" between a ceiling and a bouncy block (slime, or beds since 1.12). It can be performed by jumping under a ceiling such that the block 2.001b below the ceiling has bouncing properties.
Explanation
Whenever the Player collides vertically with a block (floor or ceiling), the game will apply collision physics.
For almost every block, that just means setting the Player's vertical speed to 0.
/* in class Block */
public void onVerticalCollision(Entity entityIn)
{
entityIn.motionY = 0.0D;
}
There is one exception: Slime Blocks (and Beds in 1.12+).
/* in class BlockSlime */
public void onVerticalCollision(Entity entityIn)
{
if (entityIn.isSneaking())
super.onVerticalCollision(entityIn);
else if (entityIn.motionY < 0.0D)
entityIn.motionY = -entityIn.motionY;
}
- If the Player is sneaking, it's treated as a regular collision (Vertical motion is set to 0)
- Otherwise, it checks if the Player's speed is negative, then inverts it.
Note that nothing would happen if the Player is neither sneaking or moving at negative speed.
In fact, that's exactly what happens with this glitch.
When the game detects a vertical collision, it will consider the block 0.2m under the Player's position to apply collision physics (yes, even for ceiling collisions...)
Let's review the steps for the 1.8125bc Ceiling Hover setup:
- Jumping under 1.8125bc applies vertical collision with the block 0.2m below the Player (at ground level).
- If that block is a slime block, then vertical speed won't be set to 0, and the Player remains suspended under the ceiling.
- Repeat step (2) until the Player's vertical speed becomes negative due to gravity.
Note: This glitch happens for a few ticks, but with Jump Boost it would take longer. Ceiling Hover can be interrupted at any time by sneaking.
Consequences
This glitch is pretty insignificant: it isn't game-breaking in any way, and requires a very specific setup to perform.