Placement Conditions - Apollounknowndev/lithostitched GitHub Wiki
Structures and placed features can be given more refined spawning conditions with the lithostitched:delegating
structure type and lithostitched:condition
placement modifier respectively. Below is the list of available placement conditions.
true
Always passes. No further fields.
all_of
Checks a list of placement conditions. If all pass, this passes.
{
"type": "lithostitched:all_of",
"conditions": [
{
"type": "lithostitched:true"
}
]
}
conditions
: The list of conditions to check.
any_of
Checks a list of placement conditions. If any pass, this passes.
{
"type": "lithostitched:any_of",
"conditions": [
{
"type": "lithostitched:true"
}
]
}
conditions
: The list of conditions to check.
multiple_of
Checks a list of placement conditions. If the number of predicates in the allowed_count
pass, this predicate passes.
{
"type": "lithostitched:multiple_of",
"predicates": [
{
"type": "lithostitched:true"
},
{
"type": "lithostitched:true"
},
{
"type": "lithostitched:not",
"predicate": {
"type": "lithostitched:true"
}
}
],
"allowed_count": [1, 2]
}
predicates
: A list of placement conditions.allowed_count
: An integer range (64
,[64,96]
,{"min_inclusive":64,"max_inclusive":96}
).
grid
Checks a condition multiple times over an area in a grid pattern.
{
"type": "lithostitched:grid",
"radius": 80,
"distance_between_points": 16,
"condition": {
"type": "lithostitched:in_biome",
"biomes": "#minecraft:is_river"
},
"allowed_count": 0
}
condition
: The placement condition to check.radius
: The radius of the grid to search within.distance_between_points
: The distance between points checked in the grid. In the above example, every interval of 16 blocks will be checked between an offset of (-80, -80) to (80, 80).allowed_count
: An int range (64
,[64,96]
,{"min_inclusive":64,"max_inclusive":96}
) to check.
not
Inverts the supplied condition. If the condition fails, this passes.
{
"type": "lithostitched:not",
"condition": {
"type": "lithostitched:true"
}
}
condition
: The placement conditions to invert.
offset
Offsets the block position where the condition is checked.
{
"type": "lithostitched:offset",
"condition": {
"type": "lithostitched:true"
},
"offset": [ 50, 0, 0 ]
},
condition
: The placement conditions to check.offset
: The block pos for the offset, as a list of 3 integers.
height_filter
Checks if the current position is within a certain range.
{
"type": "lithostitched:height_filter",
"range_type": "absolute"
"heightmap": "WORLD_SURFACE_WG",
"permitted_range": [90,160]
}
range_type
: The range type to use. Can be eitherabsolute
orheightmap_relative
- If the range type is
absolute
and a heightmap isn't given,permitted_range
will check if the current y-pos is within it. - If the range type is
absolute
and a heightmap is given,permitted_range
will check if the heightmap at the current x/z-pos is within it. - If the range type is
heightmap_relative
,permitted_range
will check if the current position's offset from the heightmap is within it.
- If the range type is
heightmap
: The heightmap to check at the given position. If not defined, the current position being checked is used.permitted_range
: An int range (64
,[64,96]
,{"min_inclusive":64,"max_inclusive":96}
) to check.
in_biome
Checks if the current position is in certain biome(s).
{
"type": "lithostitched:in_biome",
"biomes": "#minecraft:is_beach"
}
biomes
: A biome set to check against.
sample_density
Checks if the result of a density function at the current position falls between certain values.
{
"type": "lithostitched:sample_density",
"density_function": "minecraft:overworld/erosion",
"min_inclusive": -0.2,
"max_inclusive": 0.3
}
density_function
: The density function to check.min_inclusive
: The minimum allowed density. If omitted, there is no minimum.max_inclusive
: The maximum allowed density. If omitted, there is no maximum.