此条目仍需完善。
你可以帮助我们扩充关于该主题的更多信息。
判定箱(Hitbox)定义方块或实体的物理“边界”(或其近似值)。用于计算碰撞和选取。
方块
碰撞箱
碰撞箱用于管理与实体的碰撞。
轮廓框
轮廓框在看向指定方块时显示。当十字准星指向方块时,它将显示为轮廓线框。
互动箱
互动箱用于处理瞄准方块后的交互。当一个方块的互动箱被选中时,可以对其进行破坏、放置或其他必要交互。
其默认范围与轮廓箱相同。但仍有例外:
方块支撑形状 [新增:JE 1.16]
方块支撑形状主要用于判断一个方块表面是否可以附着另一个依附型方块(如火把、门、按钮等)。
其默认范围与碰撞箱相同。但仍有例外:
- 树叶的方块支撑形状为空。
- 雪的方块支撑形状与其轮廓框一致。
- 灵魂沙拥有完整的方块支撑形状。
实体
实体的判定箱总是一个严格的以正方形为底的长方体,无视实体的实际形状。
边界盒
实体边界盒可以通过F3+B调试快捷方式查看。
互动箱
互动箱用于处理瞄准实体后的交互。当一个实体的互动箱被选中时,可以对其进行攻击或其他必要交互。
历史
| Java版 | |||||
|---|---|---|---|---|---|
| 1.13 | 17w47a | 铁砧和漏斗的轮廓框更符合其模型形状。 | |||
| 酿造台的中轴也计入判定箱。[1] | |||||
| 栅栏在直角方向的分支的轮廓框现在是正确的L形、T形或十字形。[2] | |||||
| 仙人掌现在有一个正确的长方体轮廓框。[3] | |||||
| 包含多个藤蔓的方块现在有更好的轮廓框。 | |||||
| 玻璃板和铁栏杆在分支时有更清晰的轮廓框。 | |||||
| 末地传送门框架的轮廓框现在可以正确地囊括末影之眼。 | |||||
| 活塞和睡莲的轮廓框已更改。 | |||||
| 墙的碰撞箱已被正确地做成凹形。[4] | |||||
| 1.14 | ? | The outline boxes of beds now better matches the visual shape of the bed. | |||
| 19w13a | The outline boxes of cauldrons now better fits the model, allowing for blocks beneath it to be targeted.[5] | ||||
| Java版(即将到来) | |||||
| 1.16 | 20w10a | Fire now has an outline box (alongside soul fire),[6] bringing it more in line with other blocks. Previously, fire had no outline box at all, and breaking it required targeting underlying blocks, which also allowed it to be put out in Creative mode when holding a sword or trident, which were programmed to not break blocks. It also prevented its block states from being read in the debug screen or modified via debug stick. | |||
| 20w18a | The outline box of redstone wire has now been changed to much more closely the visual shape of the block. For example, redstone wire branching in different directions causes its outline box to itself branch in said directions,[7] mirroring the behavior of fences, glass panes, iron bars and walls, and, if travelling up the side of a block, the vertical portion of the dust can now also be targeted.[8] | ||||