Block replacements
In Catharsis, we allow for retexturing and remodelling of blocks. This allows you to change the look of the same block in different regions of the game.
Definition
Definitions are placed in a block replacement definition file located at assets/<block namespace>/catharsis/block_replacements/<block id>.json
The definition follows the following scheme
- type: One of the block replacement definition types defined below
- Additional fields depending on the value of type, see the respective block replacement type documentation for more details.
Supported Types
Redirect (catharsis:redirect)
A simple redirect, replacing one block state with another one.
- type:
catharsis:redirect - virtual_state: A virtual block state reference
Random (catharsis:random)
Allows for random block replacements.
The random is seeded based on the blocks position, meaning, while it's random it is consistent for each block. Resource pack ordering may affect the result!
- type:
catharsis:random - min: The min value of the random
- min: The max value of the random
- threshold: The min amount to reach to pass the check
- definition: The block replacement definition to use if the check passes.
- fallback: (Optional) The block replacement definition to use if the check fails.
Per Area (catharsis:per_area)
Allows for having a different block per area.
- type:
catharsis:per_area - entries: An object of area to block replacement definition.
- <area id>: The area to test
Conditional (catharsis:conditional)
Allows you to change a block based on some conditions, you can find a list of conditions here.
- type:
catharsis:conditional - condition: The condition that should be checked.
- definition: The block replacement definition to use if the check passes.
- fallback: (Optional) The block replacement definition to use if the check fails.
Select (catharsis:select)
Allows you to have multiple block replacements for the same block, and uses the first one that replaces the block.
- type:
catharsis:select - definitions: The definitions that will try to replace the block.
- definition: The block replacement definition.
- fallback: (Optional) The block replacement definition to use if all the checks fail.