-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
21 changed files
with
562 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
64 changes: 27 additions & 37 deletions
64
...t/id/paradiselost/world/feature/placed_features/ParadiseLostVegetationPlacedFeatures.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,50 +1,40 @@ | ||
package net.id.paradiselost.world.feature.placed_features; | ||
|
||
import net.id.paradiselost.world.feature.configured_features.ParadiseLostVegetationConfiguredFeatures; | ||
import net.id.paradiselost.world.feature.placement_modifiers.ChancePlacementModifier; | ||
import net.minecraft.registry.entry.RegistryEntry; | ||
import net.minecraft.util.math.Direction; | ||
import net.minecraft.util.math.intprovider.ConstantIntProvider; | ||
import net.minecraft.util.math.intprovider.UniformIntProvider; | ||
import net.minecraft.world.Heightmap; | ||
import net.minecraft.world.gen.YOffset; | ||
import net.minecraft.world.gen.blockpredicate.BlockPredicate; | ||
import net.minecraft.registry.RegistryKey; | ||
import net.minecraft.world.gen.feature.*; | ||
import net.minecraft.world.gen.placementmodifier.*; | ||
|
||
import static net.minecraft.world.gen.feature.VegetationPlacedFeatures.NOT_IN_SURFACE_WATER_MODIFIER; | ||
|
||
public class ParadiseLostVegetationPlacedFeatures extends ParadiseLostPlacedFeatures { | ||
/* | ||
Highlands | ||
*/ | ||
|
||
// Default | ||
public static final RegistryEntry<PlacedFeature> BUSH = register("bush", ParadiseLostVegetationConfiguredFeatures.BUSH, SPREAD_32_ABOVE, CountMultilayerPlacementModifier.of(2), ChancePlacementModifier.of(4)); | ||
public static final RegistryEntry<PlacedFeature> DENSE_BUSH = register("dense_bush", ParadiseLostVegetationConfiguredFeatures.DENSE_BUSH, CountMultilayerPlacementModifier.of(3), HeightmapPlacementModifier.of(Heightmap.Type.MOTION_BLOCKING), BiomePlacementModifier.of()); | ||
public static final RegistryEntry<PlacedFeature> FLOWERS = register("flowers", ParadiseLostVegetationConfiguredFeatures.FLOWERS, CountPlacementModifier.of(3), RarityFilterPlacementModifier.of(32), SquarePlacementModifier.of(), HeightmapPlacementModifier.of(Heightmap.Type.MOTION_BLOCKING), BiomePlacementModifier.of()); | ||
public static final RegistryEntry<PlacedFeature> GRASS = register("grass", ParadiseLostVegetationConfiguredFeatures.GRASS_BUSH, CountPlacementModifier.of(10), SquarePlacementModifier.of(), HeightRangePlacementModifier.uniform(YOffset.aboveBottom(0), YOffset.belowTop(0)), HeightmapPlacementModifier.of(Heightmap.Type.MOTION_BLOCKING), BiomePlacementModifier.of()); | ||
public static final RegistryEntry<PlacedFeature> TALL_GRASS = register("tall_grass", ParadiseLostVegetationConfiguredFeatures.TALL_GRASS_BUSH, CountPlacementModifier.of(3), SquarePlacementModifier.of(), HeightRangePlacementModifier.uniform(YOffset.aboveBottom(0), YOffset.belowTop(0)), HeightmapPlacementModifier.of(Heightmap.Type.MOTION_BLOCKING), BiomePlacementModifier.of()); | ||
|
||
public static final RegistryEntry<PlacedFeature> PATCH_BLACKCURRANT = register("patch_blackcurrant", ParadiseLostVegetationConfiguredFeatures.PATCH_BLACKCURRANT, NOT_IN_SURFACE_WATER_MODIFIER, CountPlacementModifier.of(10), SquarePlacementModifier.of(), HeightRangePlacementModifier.uniform(YOffset.aboveBottom(0), YOffset.belowTop(0)), BiomePlacementModifier.of()); | ||
public static final RegistryEntry<PlacedFeature> PATCH_BROWN_SPORECAP = register("patch_brown_sporecap", ParadiseLostVegetationConfiguredFeatures.PATCH_BROWN_SPORECAP, RarityFilterPlacementModifier.of(10), SquarePlacementModifier.of(), PlacedFeatures.BOTTOM_TO_TOP_RANGE, HeightmapPlacementModifier.of(Heightmap.Type.MOTION_BLOCKING), BiomePlacementModifier.of()); | ||
public static final RegistryEntry<PlacedFeature> PATCH_BROWN_SPORECAP_COMMON = register("patch_brown_sporecap_common", ParadiseLostVegetationConfiguredFeatures.PATCH_BROWN_SPORECAP, CountPlacementModifier.of(3), SquarePlacementModifier.of(), PlacedFeatures.BOTTOM_TO_TOP_RANGE, HeightmapPlacementModifier.of(Heightmap.Type.MOTION_BLOCKING), BiomePlacementModifier.of()); | ||
public static final RegistryEntry<PlacedFeature> PATCH_PINK_SPORECAP = register("patch_pink_sporecap", ParadiseLostVegetationConfiguredFeatures.PATCH_PINK_SPORECAP, CountPlacementModifier.of(3), SquarePlacementModifier.of(), PlacedFeatures.BOTTOM_TO_TOP_RANGE, EnvironmentScanPlacementModifier.of(Direction.UP, BlockPredicate.hasSturdyFace(Direction.DOWN), BlockPredicate.IS_AIR, 12), RandomOffsetPlacementModifier.vertically(ConstantIntProvider.create(-1)), BiomePlacementModifier.of()); | ||
public static final RegistryEntry<PlacedFeature> NATURAL_SWEDROOT = register("natural_swedroot", ParadiseLostVegetationConfiguredFeatures.NATURAL_SWEDROOT, CountPlacementModifier.of(1), SquarePlacementModifier.of(), HeightRangePlacementModifier.uniform(YOffset.fixed(80), YOffset.getTop()), EnvironmentScanPlacementModifier.of(Direction.UP, BlockPredicate.hasSturdyFace(Direction.DOWN), BlockPredicate.IS_AIR, 12), BiomePlacementModifier.of()); | ||
public static final RegistryKey<PlacedFeature> BUSH = of("patch_bush"); | ||
public static final RegistryKey<PlacedFeature> DENSE_BUSH = of("patch_dense_bush"); | ||
public static final RegistryKey<PlacedFeature> FLOWERS = of("patch_flowers"); | ||
public static final RegistryKey<PlacedFeature> GRASS = of("patch_grass"); | ||
public static final RegistryKey<PlacedFeature> TALL_GRASS = of("patch_tall_grass"); | ||
|
||
public static final RegistryKey<PlacedFeature> PATCH_BLACKCURRANT = of("patch_blackcurrant"); | ||
public static final RegistryKey<PlacedFeature> PATCH_BROWN_SPORECAP = of("patch_brown_sporecap"); | ||
public static final RegistryKey<PlacedFeature> PATCH_BROWN_SPORECAP_COMMON = of("patch_brown_sporecap_common"); | ||
public static final RegistryKey<PlacedFeature> PATCH_PINK_SPORECAP = of("patch_pink_sporecap"); | ||
public static final RegistryKey<PlacedFeature> NATURAL_SWEDROOT = of("natural_swedroot"); | ||
|
||
// Plato | ||
public static final RegistryEntry<PlacedFeature> PLATEAU_FOLIAGE = register("plateau_foliage", ParadiseLostVegetationConfiguredFeatures.PLATEAU_FOLIAGE, CountMultilayerPlacementModifier.of(3), CountPlacementModifier.of(UniformIntProvider.create(0, 4))); | ||
public static final RegistryEntry<PlacedFeature> PLATEAU_FLOWERING_GRASS = register("plateau_flowering_grass", ParadiseLostVegetationConfiguredFeatures.PLATEAU_FLOWERING_GRASS, PlacedFeatures.BOTTOM_TO_TOP_RANGE, CountMultilayerPlacementModifier.of(1), CountPlacementModifier.of(UniformIntProvider.create(0, 5)), ON_SOLID_GROUND); | ||
public static final RegistryEntry<PlacedFeature> PLATEAU_SHAMROCK = register("plateau_shamrock", ParadiseLostVegetationConfiguredFeatures.PLATEAU_SHAMROCK, PlacedFeatures.BOTTOM_TO_TOP_RANGE, ChancePlacementModifier.of(6), CountMultilayerPlacementModifier.of(1), CountPlacementModifier.of(UniformIntProvider.create(0, 2)), ON_SOLID_GROUND); | ||
public static final RegistryKey<PlacedFeature> PLATEAU_FOLIAGE = of("patch_plateau_foliage"); | ||
public static final RegistryKey<PlacedFeature> PLATEAU_FLOWERING_GRASS = of("patch_plateau_flowering_grass"); | ||
public static final RegistryKey<PlacedFeature> PLATEAU_SHAMROCK = of("patch_plateau_shamrock"); | ||
|
||
// Shield | ||
public static final RegistryEntry<PlacedFeature> SHIELD_FLAX = register("shield_flax", ParadiseLostVegetationConfiguredFeatures.SHIELD_FLAX, SquarePlacementModifier.of(), HeightRangePlacementModifier.uniform(YOffset.aboveBottom(0), YOffset.belowTop(0)), ChancePlacementModifier.of(3), HeightmapPlacementModifier.of(Heightmap.Type.MOTION_BLOCKING), BiomePlacementModifier.of()); | ||
public static final RegistryEntry<PlacedFeature> SHIELD_NETTLES = register("shield_nettles", ParadiseLostVegetationConfiguredFeatures.SHIELD_NETTLES, CountMultilayerPlacementModifier.of(30), CountPlacementModifier.of(UniformIntProvider.create(0, 12)), ON_SOLID_GROUND); | ||
public static final RegistryEntry<PlacedFeature> SHIELD_FOLIAGE = register("shield_foliage", ParadiseLostVegetationConfiguredFeatures.SHIELD_FOLIAGE, CountMultilayerPlacementModifier.of(5), CountPlacementModifier.of(UniformIntProvider.create(0, 2)), ON_SOLID_GROUND); | ||
public static final RegistryKey<PlacedFeature> SHIELD_FLAX = of("patch_shield_flax"); | ||
public static final RegistryKey<PlacedFeature> SHIELD_NETTLES = of("patch_shield_nettles"); | ||
public static final RegistryKey<PlacedFeature> SHIELD_FOLIAGE = of("patch_shield_foliage"); | ||
|
||
// Tundra | ||
public static final RegistryEntry<PlacedFeature> TUNDRA_FOLIAGE = register("tundra_foliage", ParadiseLostVegetationConfiguredFeatures.TUNDRA_FOLIAGE, CountMultilayerPlacementModifier.of(3), CountPlacementModifier.of(UniformIntProvider.create(0, 3))); | ||
public static final RegistryKey<PlacedFeature> TUNDRA_FOLIAGE = of("patch_tundra_foliage"); | ||
|
||
// Forest | ||
public static final RegistryEntry<PlacedFeature> THICKET_LIVERWORT_CARPET = register("thicket_liverwort_carpet", ParadiseLostVegetationConfiguredFeatures.THICKET_LIVERWORT_CARPET, PlacedFeatures.BOTTOM_TO_TOP_RANGE, ChancePlacementModifier.of(6), CountMultilayerPlacementModifier.of(1), ON_SOLID_GROUND); | ||
public static final RegistryEntry<PlacedFeature> THICKET_SHAMROCK = register("thicket_shamrock", ParadiseLostVegetationConfiguredFeatures.THICKET_SHAMROCK, PlacedFeatures.BOTTOM_TO_TOP_RANGE, ChancePlacementModifier.of(8), CountMultilayerPlacementModifier.of(1), ON_SOLID_GROUND); | ||
public static final RegistryKey<PlacedFeature> THICKET_LIVERWORT_CARPET = of("patch_thicket_liverwort_carpet"); | ||
public static final RegistryKey<PlacedFeature> THICKET_SHAMROCK = of("patch_thicket_shamrock"); | ||
|
||
public static void init() {} | ||
|
||
public static void init() { | ||
} | ||
} |
41 changes: 41 additions & 0 deletions
41
src/main/resources/data/paradise_lost/worldgen/placed_feature/natural_swedroot.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
{ | ||
"feature": "paradise_lost:natural_swedroot", | ||
"placement": [ | ||
{ | ||
"type": "minecraft:count", | ||
"count": 3 | ||
}, | ||
{ | ||
"type": "minecraft:in_square" | ||
}, | ||
{ | ||
"type": "minecraft:height_range", | ||
"height": { | ||
"type": "minecraft:uniform", | ||
"max_inclusive": { | ||
"above_top": 0 | ||
}, | ||
"min_inclusive": { | ||
"absolute": 80 | ||
} | ||
} | ||
}, | ||
{ | ||
"type": "minecraft:environment_scan", | ||
"allowed_search_condition": { | ||
"type": "minecraft:matching_blocks", | ||
"blocks": "minecraft:air" | ||
}, | ||
"direction_of_search": "up", | ||
"max_steps": 12, | ||
"target_condition": { | ||
"type": "minecraft:solid" | ||
} | ||
}, | ||
{ | ||
"type": "minecraft:random_offset", | ||
"xz_spread": 0, | ||
"y_spread": -1 | ||
} | ||
] | ||
} |
31 changes: 31 additions & 0 deletions
31
src/main/resources/data/paradise_lost/worldgen/placed_feature/patch_blackcurrant.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
{ | ||
"feature": "paradise_lost:patch_blackcurrant", | ||
"placement": [ | ||
{ | ||
"type": "minecraft:height_range", | ||
"height": { | ||
"type": "minecraft:uniform", | ||
"max_inclusive": { | ||
"below_top": 0 | ||
}, | ||
"min_inclusive": { | ||
"above_bottom": 32 | ||
} | ||
} | ||
}, | ||
{ | ||
"type": "minecraft:in_square" | ||
}, | ||
{ | ||
"type": "minecraft:heightmap", | ||
"heightmap": "WORLD_SURFACE_WG" | ||
}, | ||
{ | ||
"type": "minecraft:count", | ||
"count": 2 | ||
}, | ||
{ | ||
"type": "minecraft:biome" | ||
} | ||
] | ||
} |
16 changes: 16 additions & 0 deletions
16
src/main/resources/data/paradise_lost/worldgen/placed_feature/patch_brown_sporecap.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"feature": "paradise_lost:patch_brown_sporecap", | ||
"placement": [ | ||
{ | ||
"type": "minecraft:rarity_filter", | ||
"chance": 10 | ||
}, | ||
{ | ||
"type": "minecraft:in_square" | ||
}, | ||
{ | ||
"type": "minecraft:heightmap", | ||
"heightmap": "MOTION_BLOCKING" | ||
} | ||
] | ||
} |
16 changes: 16 additions & 0 deletions
16
...ain/resources/data/paradise_lost/worldgen/placed_feature/patch_brown_sporecap_common.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"feature": "paradise_lost:patch_brown_sporecap", | ||
"placement": [ | ||
{ | ||
"type": "minecraft:rarity_filter", | ||
"chance": 3 | ||
}, | ||
{ | ||
"type": "minecraft:in_square" | ||
}, | ||
{ | ||
"type": "minecraft:heightmap", | ||
"heightmap": "MOTION_BLOCKING" | ||
} | ||
] | ||
} |
28 changes: 28 additions & 0 deletions
28
src/main/resources/data/paradise_lost/worldgen/placed_feature/patch_bush.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{ | ||
"feature": "paradise_lost:patch_bush", | ||
"placement": [ | ||
{ | ||
"type": "minecraft:height_range", | ||
"height": { | ||
"type": "minecraft:uniform", | ||
"max_inclusive": { | ||
"below_top": 0 | ||
}, | ||
"min_inclusive": { | ||
"above_bottom": 32 | ||
} | ||
} | ||
}, | ||
{ | ||
"type": "minecraft:in_square" | ||
}, | ||
{ | ||
"type": "minecraft:heightmap", | ||
"heightmap": "WORLD_SURFACE_WG" | ||
}, | ||
{ | ||
"type": "minecraft:count", | ||
"count": 2 | ||
} | ||
] | ||
} |
28 changes: 28 additions & 0 deletions
28
src/main/resources/data/paradise_lost/worldgen/placed_feature/patch_dense_bush.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{ | ||
"feature": "paradise_lost:patch_dense_bush", | ||
"placement": [ | ||
{ | ||
"type": "minecraft:height_range", | ||
"height": { | ||
"type": "minecraft:uniform", | ||
"max_inclusive": { | ||
"below_top": 0 | ||
}, | ||
"min_inclusive": { | ||
"above_bottom": 32 | ||
} | ||
} | ||
}, | ||
{ | ||
"type": "minecraft:in_square" | ||
}, | ||
{ | ||
"type": "minecraft:heightmap", | ||
"heightmap": "WORLD_SURFACE_WG" | ||
}, | ||
{ | ||
"type": "minecraft:count", | ||
"count": 3 | ||
} | ||
] | ||
} |
25 changes: 25 additions & 0 deletions
25
src/main/resources/data/paradise_lost/worldgen/placed_feature/patch_flowers.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{ | ||
"feature": "paradise_lost:patch_flowers", | ||
"placement": [ | ||
{ | ||
"type": "minecraft:noise_threshold_count", | ||
"above_noise": 4, | ||
"below_noise": 15, | ||
"noise_level": -0.8 | ||
}, | ||
{ | ||
"type": "minecraft:rarity_filter", | ||
"chance": 32 | ||
}, | ||
{ | ||
"type": "minecraft:in_square" | ||
}, | ||
{ | ||
"type": "minecraft:heightmap", | ||
"heightmap": "MOTION_BLOCKING" | ||
}, | ||
{ | ||
"type": "minecraft:biome" | ||
} | ||
] | ||
} |
28 changes: 28 additions & 0 deletions
28
src/main/resources/data/paradise_lost/worldgen/placed_feature/patch_grass.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{ | ||
"feature": "paradise_lost:patch_grass", | ||
"placement": [ | ||
{ | ||
"type": "minecraft:height_range", | ||
"height": { | ||
"type": "minecraft:uniform", | ||
"max_inclusive": { | ||
"below_top": 0 | ||
}, | ||
"min_inclusive": { | ||
"above_bottom": 32 | ||
} | ||
} | ||
}, | ||
{ | ||
"type": "minecraft:in_square" | ||
}, | ||
{ | ||
"type": "minecraft:heightmap", | ||
"heightmap": "WORLD_SURFACE_WG" | ||
}, | ||
{ | ||
"type": "minecraft:count", | ||
"count": 8 | ||
} | ||
] | ||
} |
41 changes: 41 additions & 0 deletions
41
src/main/resources/data/paradise_lost/worldgen/placed_feature/patch_pink_sporecap.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
{ | ||
"feature": "paradise_lost:patch_pink_sporecap", | ||
"placement": [ | ||
{ | ||
"type": "minecraft:count", | ||
"count": 3 | ||
}, | ||
{ | ||
"type": "minecraft:in_square" | ||
}, | ||
{ | ||
"type": "minecraft:height_range", | ||
"height": { | ||
"type": "minecraft:uniform", | ||
"max_inclusive": { | ||
"absolute": 256 | ||
}, | ||
"min_inclusive": { | ||
"above_bottom": 0 | ||
} | ||
} | ||
}, | ||
{ | ||
"type": "minecraft:environment_scan", | ||
"allowed_search_condition": { | ||
"type": "minecraft:matching_blocks", | ||
"blocks": "minecraft:air" | ||
}, | ||
"direction_of_search": "up", | ||
"max_steps": 12, | ||
"target_condition": { | ||
"type": "minecraft:solid" | ||
} | ||
}, | ||
{ | ||
"type": "minecraft:random_offset", | ||
"xz_spread": 0, | ||
"y_spread": -1 | ||
}, | ||
] | ||
} |
28 changes: 28 additions & 0 deletions
28
...n/resources/data/paradise_lost/worldgen/placed_feature/patch_plateau_flowering_grass.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{ | ||
"feature": "paradise_lost:patch_plateau_flowering_grass", | ||
"placement": [ | ||
{ | ||
"type": "minecraft:height_range", | ||
"height": { | ||
"type": "minecraft:uniform", | ||
"max_inclusive": { | ||
"below_top": 0 | ||
}, | ||
"min_inclusive": { | ||
"above_bottom": 32 | ||
} | ||
} | ||
}, | ||
{ | ||
"type": "minecraft:in_square" | ||
}, | ||
{ | ||
"type": "minecraft:heightmap", | ||
"heightmap": "WORLD_SURFACE_WG" | ||
}, | ||
{ | ||
"type": "minecraft:count", | ||
"count": 5 | ||
} | ||
] | ||
} |
Oops, something went wrong.