Soulsand/ja: Difference between revisions

From Minecraft Parkour Wiki
Content added Content deleted
(Created page with "=== 1.13 ===")
 
No edit summary
 
(21 intermediate revisions by the same user not shown)
Line 1: Line 1:
<languages/>
<languages/>
<div lang="en" dir="ltr" class="mw-content-ltr">
__NOTOC__
__NOTOC__
[[File:Soulsand.png|right|frameless|236x236px]]
[[File:Soulsand.png|right|frameless|236x236px]]
ソウルサンドは、上を歩くと減速効果を受ける特殊ブロックである。
Soulsand is a special block that slows down entities walking on it.
</div>




=== 性質 ===
<div lang="en" dir="ltr" class="mw-content-ltr">
=== Properties ===
</div>


* ソウルサンドは高さが0.875bのため、氷とスライムの[[Special:MyLanguage/slipperiness|滑りやすさ]]の影響を受ける。<br>氷/スライムブロックが真下にあるソウルサンドの上では、通常のソウルサンドの上よりも更に速度が落ちる。
<div lang="en" dir="ltr" class="mw-content-ltr">
* Soulsand is 0.875b tall, meaning it's affected by the [[Special:MyLanguage/slipperiness|slipperiness]] of ice and slime blocks. <br> Walking on soulsand with ice or slime below is slower than walking on regular soulsand.
</div>


* ソウルサンド上では、各tick終了時に水平方向の速度が0.4倍される。
<div lang="en" dir="ltr" class="mw-content-ltr">
* Soulsand slows down entities by multiplying their horizontal velocity by 0.4 at the end of each tick.
</div>


* この効果はプレイヤーが空中にいる場合にも適用され、とりわけジャンプの最後のtickが影響を受ける。<br>プレイヤーのバウンディングボックスがソウルサンドの占めるマス(の各方向0.001mずつ短い範囲)に触れることが条件。
<div lang="en" dir="ltr" class="mw-content-ltr">
* This effect can be applied even when the player is airborne, notably on the last tick of a jump. <br> The only requirement is that the player's bounding box collides with the voxel occupied by the soulsand (minus 0.001m on each side).
</div>


* この効果は累積する: 足元のソウルサンドの数だけ、0.4倍の効果を受ける。<br>そのため、単体のソウルサンドの上を歩くよりも、2つのソウルサンドの間を歩く方が少し遅い。
<div lang="en" dir="ltr" class="mw-content-ltr">
* The effect is cumulative: the 0.4 multiplier is applied for each soulsand block the player is standing on. <br> Therefore, it's slightly slower to walk on the seam between two soulsand blocks than it is to walk on a single block.
</div>


* ソウルサンドの縁(0.001mまで)では、減速効果を受けない。<br>多くの場合、ソウルサンド関係のジャンプは立ち位置を正しく調整すればより簡単にできる。
<div lang="en" dir="ltr" class="mw-content-ltr">
* The player can stand on the outer edge of soulsand (up to 0.001m) without being slowed down. <br> In many cases, a soulsand jump can be made easier with the right alignment.
</div>






== 解説 ==
<div lang="en" dir="ltr" class="mw-content-ltr">
== Explanation ==
</div>


以下は前述の性質を解説するソースコードを少し簡略化したもの:<syntaxhighlight lang="java">
<div lang="en" dir="ltr" class="mw-content-ltr">
/* Entity.java内、各tickの終わりに呼び出される(Entity.moveEntityから) */
Below is a slightly simplified snippet of the code that explains the aforementioned properties:<syntaxhighlight lang="java">
/* In Entity.java, called at the end of each tick (from Entity.moveEntity) */
protected void doBlockCollisions()
protected void doBlockCollisions()
{
{
BlockPos posMin = new BlockPos(this.minX+0.001, this.minY+0.001, this.minZ+0.001);
BlockPos posMin = new BlockPos(this.minX+0.001, this.minY+0.001, this.minZ+0.001);
BlockPos posMax = new BlockPos(this.maxX-0.001, this.maxY-0.001, this.maxZ-0.001);
BlockPos posMax = new BlockPos(this.maxX-0.001, this.maxY-0.001, this.maxZ-0.001);
</div>


for (int i = posMin.getX(); i <= posMax.getX(); ++i)
<div lang="en" dir="ltr" class="mw-content-ltr">
for (int i = posMin.getX(); i <= posMax.getX(); ++i)
{
{
for (int j = posMin.getY(); j <= posMax.getY(); ++j)
for (int j = posMin.getY(); j <= posMax.getY(); ++j)
Line 55: Line 36:
BlockPos pos = new BlockPos(i, j, k);
BlockPos pos = new BlockPos(i, j, k);
Block block = getBlockState(pos);
Block block = getBlockState(pos);
block.onEntityCollidedWithBlock(this); //see addendum for blocks that are concerned.
block.onEntityCollidedWithBlock(this); //関係するブロックについては補遺を参照。
}
}
}
}
}
}
}
}
</div>




/* BlockSoulSand.java内、上記コード内で呼び出される */
<div lang="en" dir="ltr" class="mw-content-ltr">
/* In BlockSoulSand.java, called from above */
public void onEntityCollidedWithBlock(Entity entityIn)
public void onEntityCollidedWithBlock(Entity entityIn)
{
{
entityIn.motionX *= 0.4;
entityIn.motionX *= 0.4;
entityIn.motionZ *= 0.4;
entityIn.motionZ *= 0.4;
</div>


//注: 各ソウルサンドから別々に減速効果を受ける。
<div lang="en" dir="ltr" class="mw-content-ltr">
//NOTE: each soulsand block applies this effect individually.
}
}
</syntaxhighlight>'''Addendum:'''
</syntaxhighlight>'''補遺:'''
[[File:OnEntityCollidedWithBlock.png|frameless|438x438px]]
[[File:OnEntityCollidedWithBlock.png|frameless|438x438px]]
</div>


<small>(非表示になっているブロックは、矢と木のボタンなどの、特定のエンティティとブロック間の相互作用にのみ関連しているもの)</small>
<div lang="en" dir="ltr" class="mw-content-ltr">
<small>(The hidden blocks only concern specific entity-block interactions, such as arrows with wood buttons)</small>
</div>






== バージョン間の違い ==
<div lang="en" dir="ltr" class="mw-content-ltr">
== Version Differences ==
</div>




=== 1.13 ===
=== 1.13 ===


ソウルサンドの真上に水源を設置すると、その上の連続する水源全てが上向きの気泡柱に変換されるようになった。触れたプレイヤーは上に押し上げられる。
<div lang="en" dir="ltr" class="mw-content-ltr">
Soulsand generates upward bubble columns when placed underwater, which push the player up.
</div>




<div lang="en" dir="ltr" class="mw-content-ltr">
=== 1.15 ===
=== 1.15 ===
</div>


ソウルサンド上での動きが大きく変更された:
<div lang="en" dir="ltr" class="mw-content-ltr">
Major changes to movement on soulsand:
</div>


*下のブロックの滑りやすさの影響を受けなくなった(高さ0.5b以上のブロック全て)。
<div lang="en" dir="ltr" class="mw-content-ltr">
*減速効果が適用されるのはブロック境界より内側だけになった。周囲0.3mは通常のブロックと同じように機能する。
* No longer affected by slipperiness (as are all blocks of height > 0.5b)
*減速効果が0.5b上まで適用されるようになった(半ブロックを含む)。
* Slowdown now only applies to the inner surface. The 0.3m perimeter around it acts as a normal block.
*何らかの方法でソウルサンド内に埋まると、内部にいくつかある「中間の床」に立つことができる。それぞれ0.125/0.25/0.375/0.5/0.625/0.75の高さにあり、最初の4つは下のブロックの滑りやすさの影響を受ける。
* Slowdown applies when the player is standing less than 0.5b above it (includes standing on a slab).
* If the player manages to get inside a soulsand block, they will find that it has "intermediate floors" that they can stand on. These floors are at heights 0.125, 0.25, 0.375, 0.5, 0.625, and 0.75. The first four are affected by slipperiness.
</div>

Latest revision as of 11:00, 23 August 2022

Other languages:

ソウルサンドは、上を歩くと減速効果を受ける特殊ブロックである。


性質

  • ソウルサンドは高さが0.875bのため、氷とスライムの滑りやすさの影響を受ける。
    氷/スライムブロックが真下にあるソウルサンドの上では、通常のソウルサンドの上よりも更に速度が落ちる。
  • ソウルサンド上では、各tick終了時に水平方向の速度が0.4倍される。
  • この効果はプレイヤーが空中にいる場合にも適用され、とりわけジャンプの最後のtickが影響を受ける。
    プレイヤーのバウンディングボックスがソウルサンドの占めるマス(の各方向0.001mずつ短い範囲)に触れることが条件。
  • この効果は累積する: 足元のソウルサンドの数だけ、0.4倍の効果を受ける。
    そのため、単体のソウルサンドの上を歩くよりも、2つのソウルサンドの間を歩く方が少し遅い。
  • ソウルサンドの縁(0.001mまで)では、減速効果を受けない。
    多くの場合、ソウルサンド関係のジャンプは立ち位置を正しく調整すればより簡単にできる。


解説

以下は前述の性質を解説するソースコードを少し簡略化したもの:

/* Entity.java内、各tickの終わりに呼び出される(Entity.moveEntityから) */
protected void doBlockCollisions()
{
    BlockPos posMin = new BlockPos(this.minX+0.001, this.minY+0.001, this.minZ+0.001);
    BlockPos posMax = new BlockPos(this.maxX-0.001, this.maxY-0.001, this.maxZ-0.001);

    for (int i = posMin.getX(); i <= posMax.getX(); ++i)
    {
        for (int j = posMin.getY(); j <= posMax.getY(); ++j)
        {
            for (int k = posMin.getZ(); k <= posMax.getZ(); ++k)
            {
                BlockPos pos = new BlockPos(i, j, k);
                Block block = getBlockState(pos);
                block.onEntityCollidedWithBlock(this); //関係するブロックについては補遺を参照。
            }
        }
    }
}


/* BlockSoulSand.java内、上記コード内で呼び出される */
public void onEntityCollidedWithBlock(Entity entityIn)
{
    entityIn.motionX *= 0.4;
    entityIn.motionZ *= 0.4;

    //注: 各ソウルサンドから別々に減速効果を受ける。
}

補遺:

(非表示になっているブロックは、矢と木のボタンなどの、特定のエンティティとブロック間の相互作用にのみ関連しているもの)


バージョン間の違い

1.13

ソウルサンドの真上に水源を設置すると、その上の連続する水源全てが上向きの気泡柱に変換されるようになった。触れたプレイヤーは上に押し上げられる。


1.15

ソウルサンド上での動きが大きく変更された:

  • 下のブロックの滑りやすさの影響を受けなくなった(高さ0.5b以上のブロック全て)。
  • 減速効果が適用されるのはブロック境界より内側だけになった。周囲0.3mは通常のブロックと同じように機能する。
  • 減速効果が0.5b上まで適用されるようになった(半ブロックを含む)。
  • 何らかの方法でソウルサンド内に埋まると、内部にいくつかある「中間の床」に立つことができる。それぞれ0.125/0.25/0.375/0.5/0.625/0.75の高さにあり、最初の4つは下のブロックの滑りやすさの影響を受ける。