仅__需要服务器端安装。客户端安装为__可选。
__不会__影响世界存档或任何其他形式的 NBT 数据。
针对 HardnessScaling(硬度缩放)等值的配置,将在 Quilt Loader 支持配置文件后__立即__添加。
一个关于坍塌和掉落方块的模组——方块会掉落,并且会造成伤害!
深受古老模组 Enviromine 的启发。
相较于其 Fabric 前身 Block Physics,性能显著提升且功能更为先进。
基本逻辑
方块传统上沿 X-Z 平面上的 8 个向量进行搜索。
想象一下国际象棋中“皇后”的移动模式。
方块的搜索范围取决于其硬度(Hardness,即挖掘该方块所需的时间)和爆炸抗性(Blast Resistance,自解释)。
搜索范围的计算公式为:Math.max(Hardness * HardnessScaling, BlastResistance * BlastResistanceScaling),最大范围为 50 个方块。
默认的 HardnessScaling 为 2,而 BlastResistanceScaling 为 1。
沿这些向量,方块会搜索支撑物。
“支撑物”是指位于给定位置下方、沿某一向量延伸并连接到被包裹位置或“悬浮”方块的任意数量的方块柱。
被包裹位置是指在三维空间中,几乎在所有方向上都与其他方块相邻的位置。
干扰事件
仅在发生“干扰事件”时,方块才会验证其支撑物并检查是否需要掉落。
此外,每次干扰事件仅验证有限范围内的方块。这由 MaxBlockUpdates(最大方块更新数)定义,默认值为 50。
干扰事件是符合以下一个或多个相关标签的游戏事件(Game Events):
- [disruption:disruption] - 检查该位置及其邻居。
- [disruption:entity_disruption] - 上述情况,但仅限由实体引起的事件。
- [disruption:neighbor_disruption] - 仅检查该位置的邻居。
- [disruption:entity_neighbor_disruption] - 上述情况,但仅限由实体引起的事件。
默认的游戏事件集合如下:
- [minecraft:block_place] 属于 [disruption:entity_disruption],当放置方块时触发。
- [minecraft:block_destroy] 属于 [disruption:entity_neighbor_disruption],当破坏方块时触发。
- [disruption:fire_spread] 属于 [disruption:neighbor_disruption],当火焰烧毁方块时触发。
- [disruption:block_exploded] 属于 [disruption:neighbor_disruption],当方块被炸毁(随后被破坏)时触发。
伤害逻辑
与铁砧类似,掉落方块造成的伤害基于其下落距离。
伤害的计算公式为:(FallDistance - 1) * DamageModifier,上限为 DamageMax。
DamageModifier(伤害修正值)和 DamageMax(最大伤害)计算方式如下:
默认的 CaveInDamageScaling(坍塌伤害缩放)为 1。
DamageModifier = Hardness * 0.4 * CaveInDamageScaling
DamageMax = DamageModifier * 20
我们采用这种方式计算伤害的原因是为了匹配铁砧的伤害缩放比例,铁砧的硬度为 5。
“悬浮”方块
悬浮方块是不需要支撑物即可漂浮的方块,同时它们也作为其他方块的支撑物。
存在此类方块有三个原因:
- 减少本模组对原版机械结构的影响。
- 防止本模组影响那些材质应为不可破坏或近乎不可破坏的生成结构。
- 允许玩家建造悬浮结构。
悬浮方块满足以下任一或全部条件:
- 具有 1200 或更高的爆炸抗性(黑曜石的爆炸抗性)
- 位于 [disruption:floats] 方块标签内
“悬挂”方块
悬挂方块是指其支撑物既可以向上也可以向下的方块。
存在此类方块有三个原因:
- 防止下界每纳秒都发生坍塌。
- 允许末地岛漂浮。
- 允许玩家从天花板悬挂物体。
悬挂方块满足以下任一或全部条件:
- 发出光线
- 具有玻璃音效,但不滑(滑动性 <= 0.6)
- 位于 [disruption:hangs] 方块标签内
“受保护”方块
受保护方块是指其计算的搜索范围始终至少为 3 个方块的方块。
存在此类方块有三个原因:
- 防止树木和巨型蘑菇完全自我修剪
- 防止玻璃及类玻璃方块过于不稳定
- 防止坍塌过于频繁地发生。
受保护方块满足以下任一或全部条件:
- 具有玻璃音效
- 位于 [disruption:protected] 方块标签内
“浮力”方块
浮力方块是指当其 resting(静止/搁置)在液体上时不会开始掉落的方块。
请注意,对于这些方块而言,液体不计入“支撑物”。
存在此类方块有三个原因:
- 防止冰块和冰原落入海中。
- 防止岩浆块落入岩浆中。
- 允许玩家在水/岩浆上创建船只和桥梁,而无需支撑物。
浮力方块满足以下任一或全部条件:
- 可燃
- 滑(滑动性 > 0.6)
- 位于 [disruption:buoyant] 方块标签内
ONLY requires server installation. Client installation is OPTIONAL.
Does NOT affect world saves or any other form of NBT data.
Configuration for values such as HardnessScaling WILL be added as soon as configuration support is added to the Quilt Loader.
A mod about cave-ins and falling blocks - Blocks fall, and can cause damage!
Heavy inspiration from ye ol' Enviromine.
Significantly more performant and advanced than its Fabric predecessor, Block Physics.
Basic logic
Blocks search, traditionally, along 8 vectors on the X-Z plane.
Picture the movement pattern of a Queen in Chess.
Blocks have larger reach depending on their Hardness (how long it takes to mine the block) and their Blast Resistance (self-explanatory).
The equation for reach is: Math.max(Hardness * HardnessScaling, BlastResistance * BlastResistanceScaling), with reach having a maximum of 50 blocks.
The default HardnessScaling is 2, while BlastResistanceScaling is 1.
Along these vectors, blocks search for supports.
'Supports' are pillars of any number of blocks below a given position on a vector that reaches an encased position or a 'floating' block.
Encased positions are positions where a block is surrounded by other blocks on nearly all vectors in 3D space.
Disruption Events
Blocks only validate their supports, and check if they need to fall, if there is a Disruption Event.
Furthermore, only a limited range of blocks are validated per Disruption Event. This is defined by MaxBlockUpdates, whose default is 50.
Disruption Events are Game Events who fit into any or all of the related tags:
- [disruption:disruption] - Checks the position, and its neighbors.
- [disruption:entity_disruption] - The above, but only if there is an entity who caused the event.
- [disruption:neighbor_disruption] - Checks the position's neighbors only.
- [disruption:entity_neighbor_disruption] - The above, but only if there is an entity who caused the event.
The default set of Game Events are:
- [minecraft:block_place] in [disruption:entity_disruption], occurs when a block is placed.
- [minecraft:block_destroy] in [disruption:entity_neighbor_disruption], occurs when a block is destroyed.
- [disruption:fire_spread] in [disruption:neighbor_disruption], occurs when fire incinerates a block.
- [disruption:block_exploded] in [disruption:neighbor_disruption], occurs when a block is exploded (and subsequently destroyed).
Damage logic
Like Anvils, falling blocks deal damage based on the distance they fall.
The equation for the resultant damage is: (FallDistance - 1) * DamageModifier, where the maximum is DamageMax.
DamageModifier and DamageMax are calculated as so:
The default CaveInDamageScaling is 1.
DamageModifier = Hardness * 0.4 * CaveInDamageScaling
DamageMax = DamageModifier * 20
The reason why we calculate damage this way is to match the damage scaling of an Anvil, whose Hardness is 5.
'Floating' blocks
Floating blocks are blocks that do not require a support, and therefor float. They also act as a support to other blocks.
There are three reasons why such blocks exist:
- To lessen the impact this mod has on vanilla contraptions.
- To prevent this mod from impacting generated structures whose material is supposed to be unbreakable or nigh unbreakable.
- To allow Players to create floating structures.
Floating blocks fulfill any or all of the conditions below:
- Has a Blast Resistance of 1200 (Obsidian's Blast Resistance) or higher
- Is in the [disruption:floats] block tag
'Hanging' blocks
Hanging blocks are blocks whose supports can go upwards as well as downwards.
There are three reasons why such blocks exist:
- To prevent the Nether from caving-in every nanosecond.
- To allow End Islands to float.
- To allow Players to hang things from ceilings.
Hanging blocks fulfill any or all of the conditions below:
- Emits light
- Has the Glass sound effect, but is not slippery (slipperiness <= 0.6)
- Is in the [disruption:hangs] block tag
'Protected' blocks
Protected blocks are blocks whose calculated reach is always at least 3 blocks.
There are three reasons why such blocks exist:
- To prevent trees and giant mushrooms from COMPLETELY pruning themselves
- To prevent Glass and Glass-like blocks from being overly unstable
- To prevent cave-ins from happening too often.
Protected blocks fulfill any or all of the conditions below:
- Has the Glass sound effect
- Is in the [disruption:protected] block tag
'Buoyant' blocks
Buoyant blocks are blocks that do not begin to fall if they are resting upon a liquid.
Keep in mind that the liquid does not count as a 'support' for these blocks.
There are three reasons why such blocks exist:
- To prevent ice and ice sheets from falling into the sea.
- To prevent magma blocks from falling into lava.
- To allow Players to create boats and bridges on water/lava without the need of supports.
Buoyant blocks fulfill any or all of the conditions below:
- Is flammable
- Is slippery (slipperiness > 0.6)
- Is in the [disruption:buoyant] block tag
评论 0
登录后参与评分
还没有评论,来抢沙发吧