Ceiling Hover: Difference between revisions
m (MCPK moved page Ceiling Hover Glitch to Ceiling Hover without leaving a redirect: removed "glitch" from the name) |
(Marked this version for translation) |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
<languages/> |
|||
<translate> |
|||
<!--T:1--> |
|||
[[File:Slime Hover Setup.png|thumb|In 1.8, this is the only setup that can be used to perform a Ceiling Hover (1.8125bc with slime underneath)]] |
[[File:Slime Hover Setup.png|thumb|In 1.8, this is the only setup that can be used to perform a Ceiling Hover (1.8125bc with slime underneath)]] |
||
<!--T:2--> |
|||
<youtube>bijMuKlme7k</youtube> |
<youtube>bijMuKlme7k</youtube> |
||
<!--T:3--> |
|||
Ceiling Hover is a glitch that makes the player "hover" between a ceiling and a bouncy block (slime, or beds since 1.12). |
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. |
It can be performed by jumping under a ceiling such that the block 2.001b below the ceiling has bouncing properties. |
||
Line 10: | Line 15: | ||
⚫ | |||
⚫ | |||
⚫ | |||
<!--T:5--> |
|||
⚫ | |||
⚫ | |||
<!--T:6--> |
|||
⚫ | |||
<!--T:7--> |
|||
<syntaxhighlight lang="java"> |
<syntaxhighlight lang="java"> |
||
/* in class Block */ |
/* in class Block */ |
||
Line 26: | Line 35: | ||
<!--T:8--> |
|||
There is one exception: Slime Blocks (and Beds in 1.12+). |
There is one exception: Slime Blocks (and Beds in 1.12+). |
||
<!--T:9--> |
|||
<syntaxhighlight lang="java"> |
<syntaxhighlight lang="java"> |
||
/* in class BlockSlime */ |
/* in class BlockSlime */ |
||
Line 40: | Line 51: | ||
<!--T:10--> |
|||
* If the Player is sneaking, it's treated as a regular collision (Vertical motion is set to 0) |
* If the Player is sneaking, it's treated as a regular collision (Vertical motion is set to 0) |
||
* Otherwise, it checks if the |
* Otherwise, it checks if the player's speed is negative, then inverts it. |
||
⚫ | |||
<!--T:11--> |
|||
⚫ | |||
<!--T:12--> |
|||
In fact, that's exactly what happens with this glitch. |
In fact, that's exactly what happens with this glitch. |
||
⚫ | |||
<!--T:13--> |
|||
⚫ | |||
<!--T:14--> |
|||
Let's review the steps for the 1.8125bc Ceiling Hover setup: |
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 |
# 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 |
# 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 |
# Repeat step (2) until the player's vertical speed becomes negative due to gravity. |
||
<!--T:15--> |
|||
⚫ | |||
⚫ | |||
== Consequences == |
== Consequences == <!--T:16--> |
||
<!--T:17--> |
|||
This glitch is pretty insignificant: it isn't game-breaking in any way, and requires |
This glitch is pretty insignificant: it isn't game-breaking in any way, and requires very specific setups to be made use of. |
||
</translate> |
Latest revision as of 11:25, 26 August 2021
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 somehow moving at a positive speed (and not sneaking).
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 (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 very specific setups to be made use of.