Ceiling Hover/zh: Difference between revisions
Content added Content deleted
(Created page with "对于几乎每个方块,这只是意味着将玩家的垂直速度设置为 0。") |
No edit summary |
||
(35 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
<languages/> |
<languages/> |
||
[[File:Slime Hover Setup.png|thumb|在 1.8 中,这是唯一 |
[[File:Slime Hover Setup.png|thumb|在 1.8 中,这是唯一能触发天花板悬停的摆放(1.8125bc 下方有史莱姆)]] |
||
<youtube>bijMuKlme7k</youtube> |
<youtube>bijMuKlme7k</youtube> |
||
天花板悬停是一个能使玩家在天花板和有弹性的方块(史莱姆,或者 1.12 及以上的床)之间“悬停”的故障。 |
|||
<div lang="en" dir="ltr" class="mw-content-ltr"> |
|||
当跳跃,且天花板下方 2.001 格处的方块有弹性特性时会触发。 |
|||
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. |
|||
</div> |
|||
Line 14: | Line 12: | ||
<span id="Explanation"></span> |
|||
== 解释 == |
== 解释 == |
||
每当玩家与一个方块(地 |
每当玩家在垂直方向上与一个方块(地面或天花板)垂直碰撞时,游戏将应用碰撞物理。 |
||
对于几乎 |
对于几乎所有的方块来说,这代表将玩家的垂直速度设为 0。 |
||
<div lang="en" dir="ltr" class="mw-content-ltr"> |
|||
<syntaxhighlight lang="java"> |
<syntaxhighlight lang="java"> |
||
/* |
/* 在 Block 类中 */ |
||
public void onVerticalCollision(Entity entityIn) |
public void onVerticalCollision(Entity entityIn) |
||
{ |
{ |
||
Line 28: | Line 26: | ||
} |
} |
||
</syntaxhighlight> |
</syntaxhighlight> |
||
</div> |
|||
但有一个例外:粘液块(和 1.12+ 中的床)。 |
|||
<div lang="en" dir="ltr" class="mw-content-ltr"> |
|||
There is one exception: Slime Blocks (and Beds in 1.12+). |
|||
</div> |
|||
<div lang="en" dir="ltr" class="mw-content-ltr"> |
|||
<syntaxhighlight lang="java"> |
<syntaxhighlight lang="java"> |
||
/* |
/* 在 BlockSlime 类中 */ |
||
public void onVerticalCollision(Entity entityIn) |
public void onVerticalCollision(Entity entityIn) |
||
{ |
{ |
||
Line 47: | Line 41: | ||
} |
} |
||
</syntaxhighlight> |
</syntaxhighlight> |
||
</div> |
|||
* 若玩家在潜行,则会被视为常规碰撞(垂直速度被设为 0) |
|||
<div lang="en" dir="ltr" class="mw-content-ltr"> |
|||
* 否则程序会检查玩家的速度是否为负,然后将其反转。 |
|||
* 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. |
|||
</div> |
|||
需要注意,如果玩家以某种方式以正速度移动(且没有潜行),则什么都不会发生。 |
|||
<div lang="en" dir="ltr" class="mw-content-ltr"> |
|||
Note that nothing would happen if the player is somehow moving at a positive speed (and not sneaking). |
|||
</div> |
|||
这就是导致此错误的原因。 |
|||
<div lang="en" dir="ltr" class="mw-content-ltr"> |
|||
In fact, that's exactly what happens with this glitch. |
|||
</div> |
|||
当游戏检测到垂直碰撞时,它会考虑在玩家位置下 0.2 米的方块上应用碰撞物理(甚至碰到天花板也会如此……) |
|||
<div lang="en" dir="ltr" class="mw-content-ltr"> |
|||
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...) |
|||
</div> |
|||
让我们回顾一下 1.8125bc 天花板悬停摆放的步骤: |
|||
<div lang="en" dir="ltr" class="mw-content-ltr"> |
|||
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. |
|||
</div> |
|||
#在 1.8125bc 下跳跃会将垂直碰撞应用于玩家下方 0.2 米的方块(地面)。 |
|||
#如果下方方块是黏液块,那么垂直速度不会设置为 0,玩家仍然悬停在天花板下。 |
|||
#重复步骤(2),直到玩家的垂直速度由于重力而变为负值。 |
|||
<div lang="en" dir="ltr" class="mw-content-ltr"> |
|||
'''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. |
|||
</div> |
|||
'''注意:'''这个小故障只会发生几 Ticks,但可以通过跳跃提升延长持续时间。天花板悬停可以随时通过潜行来中断。 |
|||
<div lang="en" dir="ltr" class="mw-content-ltr"> |
|||
⚫ | |||
</div> |
|||
⚫ | |||
<div lang="en" dir="ltr" class="mw-content-ltr"> |
|||
== 结论 == |
|||
This glitch is pretty insignificant: it isn't game-breaking in any way, and requires very specific setups to be made use of. |
|||
</div> |
|||
这个故障影响极小:它不会以任何方式破坏游戏,并且需要非常精准的摆放才能利用。 |
Latest revision as of 04:58, 16 August 2023
天花板悬停是一个能使玩家在天花板和有弹性的方块(史莱姆,或者 1.12 及以上的床)之间“悬停”的故障。 当跳跃,且天花板下方 2.001 格处的方块有弹性特性时会触发。
解释
每当玩家在垂直方向上与一个方块(地面或天花板)垂直碰撞时,游戏将应用碰撞物理。
对于几乎所有的方块来说,这代表将玩家的垂直速度设为 0。
/* 在 Block 类中 */
public void onVerticalCollision(Entity entityIn)
{
entityIn.motionY = 0.0D;
}
但有一个例外:粘液块(和 1.12+ 中的床)。
/* 在 BlockSlime 类中 */
public void onVerticalCollision(Entity entityIn)
{
if (entityIn.isSneaking())
super.onVerticalCollision(entityIn);
else if (entityIn.motionY < 0.0D)
entityIn.motionY = -entityIn.motionY;
}
- 若玩家在潜行,则会被视为常规碰撞(垂直速度被设为 0)
- 否则程序会检查玩家的速度是否为负,然后将其反转。
需要注意,如果玩家以某种方式以正速度移动(且没有潜行),则什么都不会发生。
这就是导致此错误的原因。
当游戏检测到垂直碰撞时,它会考虑在玩家位置下 0.2 米的方块上应用碰撞物理(甚至碰到天花板也会如此……)
让我们回顾一下 1.8125bc 天花板悬停摆放的步骤:
- 在 1.8125bc 下跳跃会将垂直碰撞应用于玩家下方 0.2 米的方块(地面)。
- 如果下方方块是黏液块,那么垂直速度不会设置为 0,玩家仍然悬停在天花板下。
- 重复步骤(2),直到玩家的垂直速度由于重力而变为负值。
注意:这个小故障只会发生几 Ticks,但可以通过跳跃提升延长持续时间。天花板悬停可以随时通过潜行来中断。
结论
这个故障影响极小:它不会以任何方式破坏游戏,并且需要非常精准的摆放才能利用。