Skip to content

Commit

Permalink
optimize paths more
Browse files Browse the repository at this point in the history
  • Loading branch information
AViewFromTheTop committed Mar 1, 2025
1 parent a3f35d7 commit 15e9698
Show file tree
Hide file tree
Showing 11 changed files with 91 additions and 181 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,6 @@
"searching_block_predicate": {
"type": "minecraft:all_of",
"predicates": [
{
"type": "frozenlib:search_in_area",
"block_predicate": {
"type": "minecraft:matching_blocks",
"blocks": "minecraft:air"
},
"search_area": 2
},
{
"type": "minecraft:not",
"predicate": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,30 +12,17 @@
"tag": "wilderwild:feature/coarse_path_replaceable"
},
"searching_block_predicate": {
"type": "minecraft:all_of",
"predicates": [
{
"type": "frozenlib:search_in_area",
"block_predicate": {
"type": "minecraft:matching_blocks",
"blocks": "minecraft:air"
},
"search_area": 2
"type": "minecraft:not",
"predicate": {
"type": "frozenlib:search_in_direction",
"all_must_match": false,
"block_predicate": {
"type": "minecraft:matching_blocks",
"blocks": "minecraft:water"
},
{
"type": "minecraft:not",
"predicate": {
"type": "frozenlib:search_in_direction",
"all_must_match": false,
"block_predicate": {
"type": "minecraft:matching_blocks",
"blocks": "minecraft:water"
},
"search_direction": "up",
"search_steps": 3
}
}
]
"search_direction": "up",
"search_steps": 3
}
},
"state_provider": {
"type": "minecraft:simple_state_provider",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,30 +12,17 @@
"tag": "wilderwild:feature/coarse_clearing_replaceable"
},
"searching_block_predicate": {
"type": "minecraft:all_of",
"predicates": [
{
"type": "frozenlib:search_in_area",
"block_predicate": {
"type": "minecraft:matching_blocks",
"blocks": "minecraft:air"
},
"search_area": 2
"type": "minecraft:not",
"predicate": {
"type": "frozenlib:search_in_direction",
"all_must_match": false,
"block_predicate": {
"type": "minecraft:matching_blocks",
"blocks": "minecraft:water"
},
{
"type": "minecraft:not",
"predicate": {
"type": "frozenlib:search_in_direction",
"all_must_match": false,
"block_predicate": {
"type": "minecraft:matching_blocks",
"blocks": "minecraft:water"
},
"search_direction": "up",
"search_steps": 3
}
}
]
"search_direction": "up",
"search_steps": 3
}
},
"state_provider": {
"type": "minecraft:simple_state_provider",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,29 +12,17 @@
"tag": "wilderwild:feature/coarse_path_replaceable"
},
"searching_block_predicate": {
"type": "minecraft:all_of",
"predicates": [
{
"type": "frozenlib:touching",
"all_must_match": false,
"block_predicate": {
"type": "minecraft:replaceable"
}
"type": "minecraft:not",
"predicate": {
"type": "frozenlib:search_in_direction",
"all_must_match": false,
"block_predicate": {
"type": "minecraft:matching_blocks",
"blocks": "minecraft:water"
},
{
"type": "minecraft:not",
"predicate": {
"type": "frozenlib:search_in_direction",
"all_must_match": false,
"block_predicate": {
"type": "minecraft:matching_blocks",
"blocks": "minecraft:water"
},
"search_direction": "up",
"search_steps": 3
}
}
]
"search_direction": "up",
"search_steps": 3
}
},
"state_provider": {
"type": "minecraft:simple_state_provider",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,30 +11,17 @@
"tag": "wilderwild:feature/small_coarse_dirt_path_replaceable"
},
"searching_block_predicate": {
"type": "minecraft:all_of",
"predicates": [
{
"type": "frozenlib:search_in_area",
"block_predicate": {
"type": "minecraft:matching_blocks",
"blocks": "minecraft:air"
},
"search_area": 2
"type": "minecraft:not",
"predicate": {
"type": "frozenlib:search_in_direction",
"all_must_match": false,
"block_predicate": {
"type": "minecraft:matching_blocks",
"blocks": "minecraft:water"
},
{
"type": "minecraft:not",
"predicate": {
"type": "frozenlib:search_in_direction",
"all_must_match": false,
"block_predicate": {
"type": "minecraft:matching_blocks",
"blocks": "minecraft:water"
},
"search_direction": "up",
"search_steps": 3
}
}
]
"search_direction": "up",
"search_steps": 3
}
},
"state_provider": {
"type": "minecraft:simple_state_provider",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,34 +11,22 @@
"tag": "wilderwild:feature/oasis_path_replaceable"
},
"searching_block_predicate": {
"type": "minecraft:all_of",
"predicates": [
{
"type": "frozenlib:touching",
"all_must_match": false,
"block_predicate": {
"type": "minecraft:replaceable"
}
"type": "minecraft:not",
"predicate": {
"type": "frozenlib:search_in_direction",
"all_must_match": false,
"block_predicate": {
"type": "minecraft:matching_fluids",
"fluids": [
"minecraft:water",
"minecraft:flowing_water",
"minecraft:lava",
"minecraft:flowing_lava"
]
},
{
"type": "minecraft:not",
"predicate": {
"type": "frozenlib:search_in_direction",
"all_must_match": false,
"block_predicate": {
"type": "minecraft:matching_fluids",
"fluids": [
"minecraft:water",
"minecraft:flowing_water",
"minecraft:lava",
"minecraft:flowing_lava"
]
},
"search_direction": "up",
"search_steps": 1
}
}
]
"search_direction": "up",
"search_steps": 1
}
},
"state_provider": {
"type": "minecraft:simple_state_provider",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,19 @@
"type": "frozenlib:touching",
"all_must_match": false,
"block_predicate": {
"type": "minecraft:replaceable"
}
},
{
"type": "minecraft:not",
"predicate": {
"type": "frozenlib:touching",
"all_must_match": false,
"block_predicate": {
"type": "minecraft:matching_blocks",
"blocks": "minecraft:water"
}
"type": "minecraft:all_of",
"predicates": [
{
"type": "minecraft:replaceable"
},
{
"type": "minecraft:not",
"predicate": {
"type": "minecraft:matching_blocks",
"blocks": "minecraft:water"
}
}
]
}
},
{
Expand Down Expand Up @@ -71,7 +72,7 @@
"minecraft:lava"
]
},
"search_area": 3
"search_area": 2
},
"state_provider": {
"type": "minecraft:simple_state_provider",
Expand All @@ -86,6 +87,6 @@
"noise_type": "XORO",
"scale_noise_y": true
},
"placement_radius": 12
"placement_radius": 8
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"placement": [
{
"type": "minecraft:count",
"count": 64
"count": 72
},
{
"type": "minecraft:in_square"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -487,20 +487,26 @@ public static void registerCaveConfigured(@NotNull BootstrapContext<ConfiguredFe
.within(-0.275D, -0.15D)
.searchingBlockPredicate(
BlockPredicate.allOf(
TouchingBlockPredicate.exposed(),
BlockPredicate.not(TouchingBlockPredicate.exposedToWater()),
TouchingBlockPredicate.exposedTo(
BlockPredicate.allOf(
BlockPredicate.replaceable(),
BlockPredicate.not(
BlockPredicate.matchesBlocks(Blocks.WATER)
)
)
),
BlockPredicate.not(SearchInDirectionBlockPredicate.hasWaterAbove(3))
)
).scheduleTickOnPlacement()
.build(),
new NoiseBandBlockPlacement.Builder(BlockStateProvider.simple(WWBlocks.GABBRO))
.replacementBlockPredicate(BlockPredicate.matchesTag(WWBlockTags.MAGMA_REPLACEABLE))
.within(-0.31D, -0.115D)
.searchingBlockPredicate(SearchInAreaBlockPredicate.hasAirOrWaterOrLavaWithin(3))
.searchingBlockPredicate(SearchInAreaBlockPredicate.hasAirOrWaterOrLavaWithin(2))
.build()

).build(),
12
8
)
);

Expand Down
Loading

0 comments on commit 15e9698

Please sign in to comment.