Configuration ‐ Block Definition - xBigEllx/realistic-block-physics-mirror GitHub Wiki
Summary
This page explains how to modify and create block definitions.
Block Definition Properties
This section covers each of the configurable properties of a block definition, split into two categories: physics and chunk analysis. Each table row corresponds to a configurable property, which covers its name/key, data type, a brief description, and its default value when omitted by the user.
Ref | Key | Type | Description | Default |
---|---|---|---|---|
1 | Blocks |
List<BlockIdentifier> | A list of Minecraft block IDs to assign the block definition to. | [] |
2 | Physics |
... | Contains physics-related properties of the block[s], such as mass and ability to support other blocks. | |
3 | ChunkAnalysis |
... | Contains properties related to how the block[s] should be processed as part of chunk analysis updates. |
[Physics]
Ref | Key | Type | Description | Default |
---|---|---|---|---|
2.1 | BeamStrength |
Decimal | A multiplier of additional strengthening to apply to the block[s] when acting as a beam. A value of '1.0' will allow the block[s] to support an infinite amount of weight above, whereas a value of '0.0' will not apply any additional strengthening. | 0.0 |
2.2 | BreaksOnFalling |
Boolean | Whether the block[s] should instantly break instead of falling. | false |
2.3 | CanAttach |
Boolean | Whether the block[s] can attach to the sides of other blocks for support. | true |
2.4 | CanAttachDiagonally |
Boolean | Whether the block[s] can diagonally attach to other blocks for support. This currently only applies to adjacent diagonal connections (along edges), not on the corners/vertices of blocks. | false |
2.5 | CanHang |
Boolean | Whether the block[s] can hang from other blocks for support. | true |
2.6 | EntityDamageScale |
Decimal | A multiplier to apply to the damage caused by the block[s] when falling on entities. | 1.0 |
2.7 | ExtendedCollisionBounds |
... | Allows you to extend the collision bounds for each specific face of the block[s]. This can be useful for blocks such as slabs, where you may wish to allow blocks to rest on top of them, even though they are not physically touching. | |
2.8 | FloatsOnLiquid |
Boolean | Whether the block[s] can be supported by liquids that are below. | false |
2.9 | Mass |
Decimal | The mass of the block[s], in kilograms. | 650.0 |
2.10 | PlacementSlideModifier |
Decimal | An additional "dice roll" to apply to the base slide chance of the block[s] when being placed by an entity. Setting a value of '1.0' means the slide chance will remain unaffected. | 0.1 |
2.11 | SlideChance |
Decimal | The chance the block[s] will slide after falling and landing. | 0.5 |
2.12 | Strength |
Integer | The maximum force the block[s] can withstand before being broken. | 8500 |
2.13 | SupportStrength |
Integer | The maximum weight (in newtons) the block[s] can provide support to other blocks, both horizontally and vertically. This is the primary value which determines how well the block[s] can support other blocks. | 3000 |
[!WARNING] Due to the way block stability is calculated on the ground, setting abnormally high
SupportStrength
values will actually reduce the strength of the blocks within caves, ultimately leading to more collapses.
[Physics.ExtendedCollisionBounds]
Ref | Key | Type | Description | Default |
---|---|---|---|---|
2.7.1 | Down |
Boolean | Fully extends the collision bounds of the block[s] in the DOWN direction. |
false |
2.7.2 | East |
Boolean | Fully extends the collision bounds of the block[s] in the EAST direction. |
false |
2.7.3 | North |
Boolean | Fully extends the collision bounds of the block[s] in the NORTH direction. |
false |
2.7.4 | South |
Boolean | Fully extends the collision bounds of the block[s] in the SOUTH direction. |
false |
2.7.5 | Up |
Boolean | Fully extends the collision bounds of the block[s] in the UP direction. |
false |
2.7.6 | West |
Boolean | Fully extends the collision bounds of the block[s] in the WEST direction. |
false |
[!IMPORTANT] Directions are relative to the orientation of the block[s] (excluding the vertical axis), not the world itself.
[ChunkAnalysis]
Ref | Key | Type | Description | Default |
---|---|---|---|---|
3.1 | Enabled |
Boolean | Whether the block[s] should be processed during chunk analysis updates. This setting will be ignored if chunk analysis has been globally disabled. | true |
Creating & Editing Block Definitions
Realistic Block Physics generates its own default block definitions for all Vanilla Minecraft blocks. These definitions can be freely modified and deleted however you please. Additional block definitions can also be created beyond the defaults, and reusing existing definitions as templates is the easiest way to do this (it is also helpful for allowing you to easily see each configurable property).
There is no set limit to the number of block definitions that can be created, but each one must be given a unique name within the same scope.
[!IMPORTANT] The name of each file (excluding the file extension) ultimately becomes the name of the block definition. Whenever the definition needs to be referenced in other parts of the configuration, this is the name that must be used.
Global Block Definitions
Global block definitions are definitions that are placed directly within the "block_definitions" configuration folder. These block definitions will apply to any dimension/world definition.
To create a global block definition, you must create a new file within your "block_definitions" configuration folder. The file can be named whatever you want, but it must be unique and follow the correct structure/schema.
Local Block Definitions
Local block definitions are definitions that are local/specific to the dimensions of a particular world definition. This means that either entirely new block definitions can be created that will only apply to a specific world definition, or overrides of a global block definition can be created. An override is where a block definition has been created using the name of an existing global definition, therefore causing it to override the values of the matching global definition.
To create a local block definition, a folder must first be created within the "block_definitions" configuration folder that matches the name of the world definition being targeted. Once created, definitions can then be created within this sub-folder as normal.