Skip to content

Structure Masks

Ryandw11 edited this page Mar 19, 2023 · 1 revision

Structure Masks allow you to define how a schematic is placed into the world. This functionality matches the Mask feature of WorldEdit directly. CustomStructures offers two types of masks: SourceMask and TargetMask.

Source Mask

The SourceMask property section allows you to define what blocks from the schematic are placed into the world. This is done by using a BlockTypeMask and/or a NegatedBlockMask. You can pick one to use, or combine them both by defining the UnionType.

SourceMask:
  Enabled: true
  UnionType: 'AND'
  BlockTypeMask:
    - WHITE_WOOL
  NegatedBlockMask:
    - STONE

The Enabled property determines whether or not the Mask is enabled.


Quick Reference
Required: False
Default Functionality: Disabled

Block Type Mask

The BlockTypeMask property is a list of materials which will be placed from the schematic into the world. If a block is not in this list, then it will not be placed into the world.

BlockTypeMask:
  - WHITE_WOOL

So in the example above, only white wool will be placed.


Quick Reference
Required: False
Value: Material List
Default Value: Disabled

Negated Block Mask

The NegatedBlockMask property is a list of materials that will not be placed from the schematic into the world. If a block is in this list, then it will not be placed into the world.

NegatedBlockMask:
  - STONE

In the example above, stone blocks will not be placed into the world.

Consider The Following: If you want to define areas of your structure where the existing terrain is not replaced, then you can use this property to do so.


Quick Reference
Required: False
Value: List of Materials
Default Value: Disabled

Union Type

The UnionType property defines how the structure will combine the BlockTypeMask and NegatedBlockMask if both of them are present. Valid operations are AND or OR. If the union type is set to AND, that means all masks must be true. So a block will only be placed if it is in the BlockTypeMask and not in the NegatedBlockMask. If it is set to OR, then only one condition needs to be held true. So it needs to either be in the BlockTypeMask or not in the NegatedBlockMask.

UnionType: 'AND'

Quick Reference
Required: False
Value: AND or OR
Default Value: AND

Target Mask

The TargetMask property section allows you to define what blocks from the world the schematic is allowed to replace. This is done by using a BlockTypeMask and/or a NegatedBlockMask. You can pick one to use, or combine them both by defining the UnionType.

TargetMask:
  Enabled: true
  UnionType: 'AND'
  BlockTypeMask:
    - DIRT
  NegatedBlockMask:
    - STONE

The Enabled property determines whether or not the Mask is enabled.


Quick Reference
Required: False
Default Functionality: Disabled

Block Type Mask

The BlockTypeMask property is a list of materials which will be replaced by the schematic. If a block is not in this list, then it will not be replaced by the schematic.

BlockTypeMask:
  - DIRT

So in the example above, the structure schematic can only replace dirt blocks.

Consider The Following: If you want to a structure to solely spawn underground, then you can use this property to prevent it from breaking to the surface.


Quick Reference
Required: False
Value: Material List
Default Value: Disabled

Negated Block Mask

The NegatedBlockMask property is a list of materials that will not be replaced by the structure schematic. If a block is in this list, then it will not be replaced by the schematic.

NegatedBlockMask:
  - STONE

In the example above, the structure schematic will not replace any stone blocks.


Quick Reference
Required: False
Value: List of Materials
Default Value: Disabled

Union Type

The UnionType property defines how the structure will combine the BlockTypeMask and NegatedBlockMask if both of them are present. Valid operations are AND or OR. If the union type is set to AND, that means all masks must be true. So a block will only be placed if it is in the BlockTypeMask and not in the NegatedBlockMask. If it is set to OR, then only one condition needs to be held true. So it needs to either be in the BlockTypeMask or not in the NegatedBlockMask.

UnionType: 'AND'

Quick Reference
Required: False
Value: AND or OR
Default Value: AND