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.
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.
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:
The default set of Game Events are:
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 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:
Floating blocks fulfill any or all of the conditions below:
Hanging blocks are blocks whose supports can go upwards as well as downwards.
There are three reasons why such blocks exist:
Hanging blocks fulfill any or all of the conditions below:
Protected blocks are blocks whose calculated reach is always at least 3 blocks.
There are three reasons why such blocks exist:
Protected blocks fulfill any or all of the conditions below:
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:
Buoyant blocks fulfill any or all of the conditions below:
No files available for download.