-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Qianshanyao
committed
May 5, 2024
1 parent
05dafc5
commit e4270fe
Showing
9 changed files
with
51 additions
and
32 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
docs/changelog_source/preview/1.21/0/24/piston/sapi/_getTopmostBlock.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
## getTopmostBlock | ||
|
||
:::warn 警告 | ||
:::warning 警告 | ||
本页内容暂未经过严格测试,暂时仅用于测试本站新功能:**活塞盒**,请谨慎参考。 | ||
::: | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,28 @@ | ||
import {HiddenSourceText} from '../../../../../../src/components/controls/HiddenSourceText' | ||
import GetTopmostBlock from './piston/sapi/_getTopmostBlock.mdx' | ||
import {SingleItem} from '../../../../../../src/components/controls/list/SingleItem' | ||
|
||
- 修复了在不蹲下的情况下无法在带有自定义组件的方块上放置方块的问题 | ||
<HiddenSourceText> | ||
<li>Fixed issue where block with custom components could not have a block placed onto them without crouching</li> | ||
<SingleItem>Fixed issue where block with custom components could not have a block placed onto them without crouching</SingleItem> | ||
</HiddenSourceText> | ||
|
||
- 添加了新接口 `VectorXZ` | ||
<HiddenSourceText> | ||
<li>Added new interface <code>VectorXZ</code></li> | ||
<SingleItem>Added new interface <code>VectorXZ</code></SingleItem> | ||
</HiddenSourceText> | ||
|
||
- 添加了新方法 <PistonToggle content={<GetTopmostBlock/>}/> `getTopmostBlock` ,此方法将从世界顶部向下执行射线检测,尝试寻找首个固体方块 | ||
<HiddenSourceText> | ||
<li> | ||
Added method <code>getTopmostBlock</code> which will perform a raycast from the top of the world downwards, trying | ||
to find the first solid block | ||
</li> | ||
<SingleItem>Added method <code>getTopmostBlock</code> which will perform a raycast from the top of the world downwards, trying to find the first solid block</SingleItem> | ||
</HiddenSourceText> | ||
|
||
- 添加了新方法 `getBlockAbove` ,此方法将从指定位置执行射线检测,尝试寻找其上方的首个固体方块 | ||
<HiddenSourceText> | ||
<li> | ||
Added method <code>getBlockAbove</code> which will perform a raycast from a given position, trying to find the | ||
first solid block above | ||
</li> | ||
<SingleItem>Added method <code>getBlockAbove</code> which will perform a raycast from a given position, trying to find the first solid block above</SingleItem> | ||
</HiddenSourceText> | ||
|
||
- 添加了新方法 `getBlockBelow` ,此方法将从指定位置执行射线检测,尝试寻找其下方的首个固体方块 | ||
<HiddenSourceText> | ||
<li> | ||
Added method <code>getBlockBelow</code> which will perform a raycast from a given position, trying to find the | ||
first solid block below | ||
</li> | ||
<SingleItem>Added method <code>getBlockBelow</code> which will perform a raycast from a given position, trying to find the first solid block below</SingleItem> | ||
</HiddenSourceText> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...ocs/current/changelog_source/preview/1.21/0/24/piston/sapi/_getTopmostBlock.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import React from 'react' | ||
|
||
export interface SingleItemProps { | ||
children: React.ReactNode; | ||
// default: false | ||
keepMargin?: boolean; | ||
} | ||
|
||
export function SingleItem(props: SingleItemProps) { | ||
const keepMargin = props.keepMargin ?? false; | ||
|
||
return ( | ||
<ul className={keepMargin ? "" : "hidden-source-text"}> | ||
<li>{props.children}</li> | ||
</ul> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters