Minecraft:Processor list
More actions
A processor list is used to transform blocks of a Minecraft:structure template during generation. They contain a list of processors. Processor lists are configured using Minecraft:JSON files stored within a Minecraft:data pack in the folder Template:Cd or an Minecraft:add-on in the folder Template:Cd.
JSON format
A processor list can be a list, or an object that contains a list. Template:El: A list:
- Template:Nbt: A list of processors.
- Template:Nbt: A processor object (see below)
Or an object:
- Template:Nbt: An object of processor list.
- Template:Nbt: A list of processors.
- Template:Nbt: A processor object (see below)
- Template:Nbt: A list of processors.
- Template:Nbt The root tag.
- Template:Nbt: The game version to run the file as. Versions above 1.21.20 can be used.
- Template:Nbt
- Template:Nbt
- Template:Nbt: The identifier used for referencing this processor.
- Template:Nbt: A list of processors.
- Template:Nbt: A processor. The type of processor determines the format of the rest of the processor.
- Template:Nbt
<section end="json format" />
Processors
rule
Replaces blocks with custom rules
- Template:Nbt: A processor object
- Template:Nbt: Template:Cd
- Template:Nbt: (Required, but can be empty) A list of rules. Only the first rule that all conditions are met takes effect. This is decided anew for each block.
- Template:Nbt: A rule.
- Template:Nbt: (Optional, defaults to an "always_true" test) A Template:Slink to apply to the distance from the structure start to this block.
- Template:Nbt: A Template:Slink to apply to the block placed by the structure.
- Template:Nbt: A Template:Slink to apply to the block in the world that is replaced by the structure.
- Template:Nbt: The block that is placed when all conditions are met. Omitting block states use default values (e.g. the replacement of stairs with stairs without changing states need 40 rules to check for all facing combinations).
- Template:Nbt: (optional) Modifies nbt data of the block entity if all conditions are met.
- Template:Nbt: Can be Template:Cd(Appends
LootTablefield andLootTableSeedfield to the block entity. TheLootTableSeeduses a random number seeded by the block position.), Template:CdTemplate:Only(Merges specified data into the block entity.), Template:CdTemplate:Only(Resets any existing fields on the block entity.) or Template:Cd(Do nothing).- If Template:Cd is Template:Cd, additional field is as follows:
- Template:Nbt: The resource location of a loot table.
- If Template:Cd is Template:Cd, additional field is as follows:
- Template:Nbt: The nbt data to be merged into the block entity. Needs to be in JSON form, see Minecraft:NBT format#JSON and NBT.
- Template:Nbt: Can be Template:Cd(Appends
- Template:Nbt: A rule.
block_rot
Template:Exclusive Randomly removes blocks. The removed blocks are not replaced by air, but keep the old blocks before the structure being generated
- Template:Nbt: A processor object
- Template:Nbt: Template:Cd
- Template:Nbt: The probability of randomly removing blocks in the structure. Value between 0 and 1.
- Template:NbtTemplate:Nbt: (optional) Blocks that can be removed. A block ID or a block tag, or a list of block IDs.
block_age
Template:Exclusive Makes blocks aged. A stone, stone bricks, or cracked stone bricks block has a chance of 0.5 to be replaced with one of cracked stone bricks, stone brick stairs, mossy stone bricks, and mossy stone brick stairs. All variants of stairs have a 0.5 chance to become one of stone slab, stone brick slab, mossy stone brick stairs, and mossy stone brick slab. All variants of slabs and walls may remain unchanged or become mossy stone brick variants. Obsidian also has a 0.15 chance to be replaced with crying obsidian.
- Template:Nbt: A processor object
- Template:Nbt: Template:Cd
- Template:Nbt: Values below 0.0 is treated as 0.0; values above 1.0 is treated as 1.0. The probability of using mossy variants when making a block aged.
block_ignore
Removes specified blocks. The removed blocks are not replaced by air, but keep the old blocks before the structure being generated.
- Template:Nbt: A processor object
- Template:Nbt: Template:Cd
- Template:Nbt: (Required, but can be empty) IDs of blocks to ignore. Specifying block states has no effect.
- Template:Nbt: A block.
gravity
Template:Exclusive Change the Y-level of blocks' positions to fit the terrain like a village road. Note that this is not used to make floating gravity blocks fall down. This processor is hardcoded to be used on a structure template if its "projection" field in its Minecraft:template pool is "terrain_matching"
- Template:Nbt: A processor object
- Template:Nbt: Template:Cd
- Template:Nbt: (optional, defaults to WORLD_SURFACE_WG) Must be one of
"WORLD_SURFACE_WG"(if not during world generation, fallbacks toWORLD_SURFACE),"WORLD_SURFACE","OCEAN_FLOOR_WG"(if not during world generation, fallbacks toOCEAN_FLOOR),"OCEAN_FLOOR","MOTION_BLOCKING", or"MOTION_BLOCKING_NO_LEAVES". - Template:Nbt: (optional, defaults to 0) The offset relative to the terrain. For example: 0 is to place the structure on the ground, -1 is to sink one block into the ground. When this processor is used on a structure template by hardcoding (when the template's "projection" field in its Minecraft:template pool is "terrain_matching"), Template:Nbt is -1.
protected_blocks
Specifies which blocks in the world cannot be overridden by this structure
- Template:Nbt: A processor object
- Template:Nbt: Template:Cd
- Template:Nbt: A block tag with
#.
blackstone_replace
Template:Exclusive Replaces all stone-variant blocks with blackstone variants and all iron bars with chains.
- Template:Nbt: A processor object
jigsaw_replacement
Template:Exclusive Replaces Minecraft:jigsaw blocks with the specified final state. This processor is hardcoded to be used unless generated in the jigsaw block GUI.
- Template:Nbt: A processor object
lava_submerged_block
Template:Exclusive Blocks with incomplete outline shapes cannot override the lava in the world
- Template:Nbt: A processor object
capped
Applies a processor to some random blocks instead of applying it to all blocks.
- Template:Nbt: A processor object
- Template:Nbt: Template:Cd
- Template:NbtTemplate:Nbt: The number of blocks on which the processor is applied. Must be greater than 0. If it is greater than or equal to the total number of blocks in the structure template, all blocks are processed as if the processer is not capped.
- Template:Nbt: Another processor object
nop
Template:Exclusive Does nothing
- Template:Nbt: A processor object
Rule test
Rule tests are used to test if a block matches specific conditions.
always_true
Matches any block
- Template:Nbt: a rule test
- Template:Nbt:
always_true
- Template:Nbt:
block_match
Tests is the block is the specified block.
- Template:Nbt: a rule test
- Template:Nbt:
block_match - Template:Nbt: A block ID.
- Template:Nbt:
blockstate_match
Tests is the block for the specified Minecraft:block state.
- Template:Nbt: a rule test
- Template:Nbt:
blockstate_match - Template:Nbt: A block state.
- Template:Nbt:
random_block_match
Tests is the block is the specified block. Then only matches with a given probability.
- Template:Nbt: a rule test
- Template:Nbt:
random_block_match - Template:Nbt: A block ID.
- Template:Nbt: The probability of the predicate to pass if the block is found. Values below 0.0 is treated as 0.0; values above 1.0 is treated as 1.0.
- Template:Nbt:
random_blockstate_match
Tests is the block for the specified Minecraft:block state. Then only matches with a given probability.
- Template:Nbt: a rule test
- Template:Nbt:
random_blockstate_match - Template:Nbt: A block state.
- Template:Nbt: The probability of the predicate to pass if the block state is found. Values below 0.0 is treated as 0.0; values above 1.0 is treated as 1.0.
- Template:Nbt:
tag_match
Tests if the block is in the specified block tag.
- Template:Nbt: a rule test
- Template:Nbt:
tag_match - Template:Nbt: A block tag without
#.
- Template:Nbt:
Position rule test
Position rule tests are used to test if a position matches specific conditions.
always_true
Matches any position.
- Template:Nbt: a position rule test
- Template:Nbt:
always_true
- Template:Nbt:
linear_pos
Passes with a random probability, the probability is based on the 3D Manhattan distance to the structure start (center bottom block of first element).
- Template:Nbt: a position rule test
- Template:Nbt:
linear_pos - Template:Nbt: (optional, default is 0.0) The probability (probability less than 0 is treated as 0, greater than 1 is treated as 1) for the predicate to pass when the distance of a block to the structure start is equal to or less than Template:Nbt.
- Template:Nbt: (optional, default is 0.0) The probability (probability less than 0 is treated as 0, greater than 1 is treated as 1) for the predicate to pass when the distance of a block to the structure start is equal to or greater than Template:Nbt. If a block's distance is between Template:Nbt and Template:Nbt, probability is obtained by linear interpolation Template:Cd.
- Template:Nbt: (optional, defaults to 0) the distance when the minimum probability is used. Must be less than Template:Nbt.
- Template:Nbt: (optional, defaults to 0) the distance when the maximum probability is used. Must be greater than Template:Nbt.
- Template:Nbt:
axis_aligned_linear_pos
Passes with a random probability, the probability is based on the distance to the structure start (center bottom block of first element) along the specified axis.
- Template:Nbt: a position rule test
- Template:Nbt:
axis_aligned_linear_pos - Template:Nbt: (optional, defaults to Template:Cd) can be Template:Cd, Template:Cd or Template:Cd.
- Template:Nbt: (optional, default is 0.0) The probability (probability less than 0 is treated as 0, greater than 1 is treated as 1) for the predicate to pass when the distance of a block to the structure start is equal to or less than Template:Nbt.
- Template:Nbt: (optional, default is 0.0) The probability (probability less than 0 is treated as 0, greater than 1 is treated as 1) for the predicate to pass when the distance of a block to the structure start is equal to or greater than Template:Nbt. If a block's distance is between Template:Nbt and Template:Nbt, probability is obtained by linear interpolation Template:Cd.
- Template:Nbt: (optional, defaults to 0) the distance when the minimum probability is used. Must be less than Template:Nbt.
- Template:Nbt: (optional, defaults to 0) the distance when the maximum probability is used. Must be greater than Template:Nbt.
- Template:Nbt:
External links
Template:Navbox Java Edition technical
Minecraft:de:Prozessorliste Minecraft:fr:Liste de processeurs Minecraft:pt:Lista de processadores Minecraft:zh:处理器列表