Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions Components&Features/活塞.md
Original file line number Diff line number Diff line change
Expand Up @@ -1342,7 +1342,9 @@ public boolean setBlockState(BlockPos pos, BlockState state, int flags, int maxU

因此,这样就制造出了一个无头活塞。

### [!ADVANCED] 案例分析
## 应用

### 无头活塞案例分析

#### 案例1

Expand Down Expand Up @@ -1424,7 +1426,7 @@ if (!hasMovingPistonInFront) {

敲击音符盒,会发生什么?

<hidden>无事发生</hidden>
<hidden>粘性活塞变回完整状态,除此之外无事发生</hidden>

同案例2,进入`move`方法。当活塞尝试计算是否可拉回时,它把自己检查到了,而激活的活塞底座本身又是不可推动的,于是`return false`,无事发生。

Expand Down Expand Up @@ -1526,8 +1528,6 @@ if (!hasMovingPistonInFront) {

中继器亮起2gt,于是最左侧粘性活塞丢方块。

## 应用

### 复制

#### 亮起侦测器的移除运算
Expand Down Expand Up @@ -1577,7 +1577,7 @@ if (!hasMovingPistonInFront) {

这就完成了复制。

### 信息不一致的方块事件
### 欺骗方块事件

根据5.1章节、2.1.5章节等,我们可以发现:活塞在执行方块事件时只对其`方块位置`和`方块类型`进行校对。尽管记录了`活塞朝向`,但它只管辖b36的方向。

Expand Down