mirror of
https://github.com/misode/misode.github.io.git
synced 2026-04-23 15:17:09 +00:00
117 lines
3.7 KiB
Plaintext
117 lines
3.7 KiB
Plaintext
use ::java::util::direction::Direction
|
|
use ::java::util::block_state::BlockState
|
|
use ::java::data::worldgen::biome::Precipitation
|
|
use ::java::data::worldgen::processor_list::BlockMatch
|
|
use ::java::data::worldgen::processor_list::BlockStateMatch
|
|
use ::java::data::worldgen::processor_list::RandomBlockMatch
|
|
use ::java::data::worldgen::processor_list::RandomBlockStateMatch
|
|
use ::java::data::worldgen::processor_list::TagMatch
|
|
|
|
dispatch minecraft:resource[immersive_weathering:block_growth] to struct BlockGrowth {
|
|
area_condition: AreaCondition,
|
|
position_predicates?: [PositionTest],
|
|
growth_chance: float @ 0..1,
|
|
growth_for_face: [GrowthFace],
|
|
owners: [#[id="block"] string],
|
|
replacing_target: RuleTest,
|
|
target_self?: boolean,
|
|
destroy_target?: boolean,
|
|
}
|
|
|
|
struct GrowthFace {
|
|
direction?: Direction,
|
|
weight?: int,
|
|
growth: [struct {
|
|
weight: int,
|
|
data: BlockPair,
|
|
}],
|
|
}
|
|
|
|
struct BlockPair {
|
|
block: BlockState,
|
|
above_block?: BlockState,
|
|
}
|
|
|
|
struct AreaCondition {
|
|
type: ("generate_if_not_too_many" | "neighbor_based_generation"),
|
|
...immersive_weathering:area_condition[[type]],
|
|
}
|
|
|
|
dispatch immersive_weathering:area_condition[generate_if_not_too_many] to struct GenerateIfNotTooMany {
|
|
radiusX: int,
|
|
radiusY: int,
|
|
radiusZ: int,
|
|
requiredAmount: int,
|
|
yOffset?: int,
|
|
must_have?: RuleTest,
|
|
must_not_have?: RuleTest,
|
|
includes?: (#[id(registry="block",tags="allowed")] string | [#[id="block"] string]),
|
|
}
|
|
|
|
dispatch immersive_weathering:area_condition[neighbor_based_generation] to struct NeighborBasedGeneration {
|
|
must_have: RuleTest,
|
|
must_not_have?: RuleTest,
|
|
required_amount?: int,
|
|
directions: [Direction],
|
|
}
|
|
|
|
struct PositionTest {
|
|
type: ("biome_match" | "day_test" | "nand" | "precipitation_test" | "temperature_range"),
|
|
...immersive_weathering:position_test[[type]],
|
|
}
|
|
|
|
dispatch immersive_weathering:position_test[biome_match] to struct BiomeMatch {
|
|
biomes: (#[id(registry="worldgen/biome",tags="allowed")] string | [#[id="worldgen/biome"] string]),
|
|
}
|
|
|
|
dispatch immersive_weathering:position_test[day_test] to struct DayTest {
|
|
day: boolean,
|
|
}
|
|
|
|
dispatch immersive_weathering:position_test[nand] to struct Nand {
|
|
predicates: [PositionTest],
|
|
}
|
|
|
|
dispatch immersive_weathering:position_test[precipitation_test] to struct PrecipitationTest {
|
|
precipitation: Precipitation,
|
|
}
|
|
|
|
dispatch immersive_weathering:position_test[temperature_range] to struct TemperatureRange {
|
|
min: float,
|
|
max: float,
|
|
use_local_pos?: boolean,
|
|
}
|
|
|
|
struct RuleTest {
|
|
predicate_type: #[id] RuleTestType,
|
|
...immersive_weathering:rule_test[[predicate_type]],
|
|
}
|
|
|
|
enum(string) RuleTestType {
|
|
#[starred] BlockSetMatch = "immersive_weathering:block_set_match",
|
|
#[starred] FluidMatch = "immersive_weathering:fluid_match",
|
|
#[starred] TreeLog = "immersive_weathering:tree_log",
|
|
BlockMatch = "block_match",
|
|
BlockStateMatch = "blockstate_match",
|
|
RandomBlockMatch = "random_block_match",
|
|
RandomBlockStateMatch = "random_blockstate_match",
|
|
TagMatch = "tag_match",
|
|
}
|
|
|
|
dispatch immersive_weathering:rule_test[block_match] to BlockMatch
|
|
dispatch immersive_weathering:rule_test[blockstate_match] to BlockStateMatch
|
|
dispatch immersive_weathering:rule_test[random_block_match] to RandomBlockMatch
|
|
dispatch immersive_weathering:rule_test[random_blockstate_match] to RandomBlockStateMatch
|
|
dispatch immersive_weathering:rule_test[tag_match] to TagMatch
|
|
|
|
dispatch immersive_weathering:rule_test[immersive_weathering:block_set_match] to struct BlockSetMatch {
|
|
blocks: (#[id(registry="block",tags="allowed")] string | [#[id="block"] string]),
|
|
probability?: float @ 0..1,
|
|
}
|
|
|
|
dispatch immersive_weathering:rule_test[immersive_weathering:fluid_match] to struct FluidMatch {
|
|
fluids: #[id="fluid"] string,
|
|
}
|
|
|
|
dispatch immersive_weathering:rule_test[immersive_weathering:tree_log] to struct {}
|