-
Notifications
You must be signed in to change notification settings - Fork 5
Processor Types
Apollo edited this page Nov 23, 2024
·
3 revisions
Condition-related
Non condition-related
Versatile processor that can replicate the functionality of most other processors using the processor condition system.
{
"processor_type": "lithostitched:condition",
"random_mode": {
"mode": "per_block",
"name": "example:blackstone"
},
"if_true": [
{
"type": "lithostitched:matching_blocks",
"blocks": "minecraft:stone",
"match_type": "input"
},
{
"type": "lithostitched:random_chance",
"chance": 0.5
}
],
"then": {
"processor_type": "lithostitched:set_block",
"state_provider": {
"type": "minecraft:simple_state_provider",
"state": {
"Name": "minecraft:blackstone"
}
}
}
}
-
random_mode
: Settings for the randomness. Defaults to a mode ofper_block
and an id oflithostitched:default
.-
mode
: The random mode to use. Eitherper_block
orper_piece
. -
name
: A resource location to use for further randomness. Can be any id, but keep it unique from other processors in the file to prevent issues.
-
-
if_true
: One or more processor conditions to check. -
then
: One or more processors to apply if the processor condition(s) pass. The set block and discard input processors were built specifically to be used here, but any processors work.
Discards the block from the structure template and uses the block in the world. Built to be used in conjunction with the condition
processor.
No further fields.
Sets the block to be placed from a block state provider. Built to be used in conjunction with the condition
processor.
{
"processor_type": "lithostitched:set_block",
"state_provider": {
"type": "minecraft:weighted_state_provider",
"entries": [
{
"weight": 3,
"data": {
"Name": "minecraft:cobblestone_slab"
}
},
{
"weight": 1,
"data": {
"Name": "minecraft:mossy_cobblestone_slab"
}
}
]
},
"preserve_state": true,
"random_mode": "per_block",
"block_entity_modifier": {
"type": "minecraft:passthrough"
}
}
-
state_provider
: The block state provider to choose the block to place from. -
preserve_state
: Whether to preserve the block state values from the previous input block. Defaults to true. -
random_mode
: The random mode to use for the block state provider, eitherper_block
orper_piece
. Defaults toper_block
. -
block_entity_modifier
The block entity modifier to apply to the block. Defaults topassthrough
.
Applies one processor list at random from a list.
{
"processor_type": "lithostitched:apply_random",
"mode": "per_block",
"processor_lists": [
{
"weight": 3,
"data": "example:some_other_processor_a"
},
{
"weight": 5,
"data": "example:some_other_processor_b"
}
]
}
-
mode
: Determines the mode of the randomness.per_piece
will choose a processor list to apply to each instance of a piece, whileper_block
will choose a processor list to apply to each block in each piece. -
processor_lists
: Either a weighted list of processor lists, a list of processor lists, or a processor list tag. Only one processor list from the list will be applied.
Swaps blocks out for other blocks directly, copying over block states when possible.
{
"processor_type": "lithostitched:block_swap",
"blocks": {
"minecraft:stone_bricks": "minecraft:deepslate_bricks",
"minecraft:stone_brick_slab": "minecraft:deepslate_brick_slab",
"minecraft:stone_brick_stairs": "minecraft:deepslate_brick_stairs",
"minecraft:stone_brick_wall": "minecraft:deepslate_brick_wall"
}
}
-
blocks
: A map of block ids to block ids to determine which blocks get swapped with what other blocks. In the above example, all stone bricks (plus the slab/stair/wall variants) are replaced by their deepslate equivalents with their block states copied over.
Applies processor list(s) from other files to the structure piece.
{
"processor_type": "lithostitched:reference",
"processor_lists": [
"example:some_other_processor_a",
"example:some_other_processor_b"
]
}
-
processor_lists
: Either a single processor list, a list of processor lists, or a processor list tag (yes, you can make those) that dictates what processor lists are applied. These are run in order.
All json here can be generated using the Lithostitched generator website!