Skip to content

Commit

Permalink
added Otherside carvers
Browse files Browse the repository at this point in the history
  • Loading branch information
NewJumper committed Jul 17, 2024
1 parent ff56aa9 commit 79ee13e
Show file tree
Hide file tree
Showing 14 changed files with 243 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
// 1.20.1 2024-07-17T16:12:16.1213518 Registries
// 1.20.1 2024-07-17T16:16:42.8215802 Registries
65c8c67a4ec7ef0ce6846fb2f4d921cc6ceb02e2 data/deeperdarker/damage_type/bite.json
0b65c61bd1e5086d0f3685566cc6cecf6e324516 data/deeperdarker/damage_type/ring.json
15881d75b17d8e2c97fd9a222b284aa19b999fe4 data/deeperdarker/dimension/otherside.json
67f8cd0621b1c3614da8c1910f6b7bcb61660293 data/deeperdarker/dimension_type/otherside.json
897e2034f77e7e2272cdb8d8e508e731ecfcfa16 data/deeperdarker/worldgen/biome/blooming_caverns.json
4491dd6887a8760b77f9a28406c3e4c0535b108d data/deeperdarker/worldgen/biome/deeplands.json
bd2c433caf3a3f7dfff3668a68dbdf56fa994df5 data/deeperdarker/worldgen/biome/echoing_forest.json
06d29b9291ed3a63be90750a8c6f182e0c168b7b data/deeperdarker/worldgen/biome/overcast_columns.json
2f78546896eb12a1a996b49201a49865431a53a9 data/deeperdarker/worldgen/biome/blooming_caverns.json
ec69e3dca89d25c7673f9e889f6f801fc0408df5 data/deeperdarker/worldgen/biome/deeplands.json
1bfc81f40175caf34dcf2e9d67415d53efdfb0f6 data/deeperdarker/worldgen/biome/echoing_forest.json
fe74d33c1973d08025b393326f5ee08d8e1a11fc data/deeperdarker/worldgen/biome/overcast_columns.json
44793099ebf09807da6c662bdc2d239c8d5bf148 data/deeperdarker/worldgen/configured_carver/cave.json
9e5396d6b8a8f9a71c4d3c678398098f1d464bd2 data/deeperdarker/worldgen/configured_carver/low_cave.json
e7bebee214c738b7a13868c0fd4e804954087c04 data/deeperdarker/worldgen/configured_feature/blooming_sculk_patch.json
97ed3584ea072e20778c14293a3c7723cd17e590 data/deeperdarker/worldgen/configured_feature/blooming_sculk_vegetation.json
5097028f5c8ae5e294126d6df771e3126d4fbd07 data/deeperdarker/worldgen/configured_feature/gloomslate_column.json
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
// 1.20.1 2024-07-17T13:51:02.0777075 Tags for minecraft:block mod id deeperdarker
// 1.20.1 2024-07-17T16:16:42.816595 Tags for minecraft:block mod id deeperdarker
4def6c04349da9777fc48313256495659524feb1 data/deeperdarker/tags/blocks/blooming_pool_replaceable.json
7d44281ae960cc3804e46c4d7ae2b88440d7a7cf data/deeperdarker/tags/blocks/bloom_stems.json
3254a070f3d679712b15610724ab74c5900e0204 data/deeperdarker/tags/blocks/echo_logs.json
5fc75620cbf33b6fbe8762687116de2f0df1bd34 data/deeperdarker/tags/blocks/gloomslate_replaceable.json
1b524a72db2dc423a915068148fa9e921f2e46f5 data/deeperdarker/tags/blocks/gloomy_sculk_replaceable.json
ac89124de10dcfff814aa1d073803cec2f9bc838 data/deeperdarker/tags/blocks/glowing_vine_placeable.json
8578e12406e1c266232a54a95ac849d05041d948 data/deeperdarker/tags/blocks/infiniburn_otherside.json
16fc775f3d68d0ec1accc58f8fcfd10c571706ad data/deeperdarker/tags/blocks/otherside_carver_replaceables.json
4b3a3834715a617924c94f9d91ae043b2f4c9d63 data/deeperdarker/tags/blocks/sculk_replaceables.json
a602a7264c375269e61c0ace10abfad2a27444f0 data/deeperdarker/tags/blocks/sculk_stone_replaceables.json
603846420eb6d91e94f6409e765348644b6f95bb data/deeperdarker/tags/blocks/sculk_vine_placeable.json
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"values": [
"minecraft:water",
"minecraft:deepslate",
"minecraft:sculk",
"deeperdarker:sculk_stone",
"deeperdarker:sculk_grime",
"deeperdarker:gloomslate",
"deeperdarker:gloomy_sculk",
"deeperdarker:blooming_sculk_stone",
"deeperdarker:blooming_moss_block"
]
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{
"carvers": {},
"carvers": {
"air": "deeperdarker:cave"
},
"downfall": 0.2,
"effects": {
"fog_color": 1716032,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{
"carvers": {},
"carvers": {
"air": "deeperdarker:cave"
},
"downfall": -0.5,
"effects": {
"fog_color": 1317939,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{
"carvers": {},
"carvers": {
"air": "deeperdarker:cave"
},
"downfall": 0.5,
"effects": {
"fog_color": 3152448,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"carvers": {},
"carvers": {
"air": [
"deeperdarker:cave",
"deeperdarker:low_cave"
]
},
"downfall": 0.2,
"effects": {
"fog_color": 4663576,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
{
"type": "minecraft:cave",
"config": {
"debug_settings": {
"air_state": {
"Name": "deeperdarker:bloom_button",
"Properties": {
"face": "wall",
"facing": "north",
"powered": "false"
}
},
"barrier_state": {
"Name": "minecraft:glass"
},
"lava_state": {
"Name": "minecraft:orange_stained_glass"
},
"water_state": {
"Name": "minecraft:candle",
"Properties": {
"candles": "1",
"lit": "false",
"waterlogged": "false"
}
}
},
"floor_level": {
"type": "minecraft:uniform",
"value": {
"max_exclusive": -0.4,
"min_inclusive": -1.0
}
},
"horizontal_radius_multiplier": {
"type": "minecraft:uniform",
"value": {
"max_exclusive": 1.4,
"min_inclusive": 0.7
}
},
"lava_level": {
"above_bottom": 0
},
"probability": 0.22,
"replaceable": "#deeperdarker:otherside_carver_replaceables",
"vertical_radius_multiplier": {
"type": "minecraft:uniform",
"value": {
"max_exclusive": 1.3,
"min_inclusive": 0.8
}
},
"y": {
"type": "minecraft:uniform",
"max_inclusive": {
"below_top": 10
},
"min_inclusive": {
"above_bottom": 10
}
},
"yScale": {
"type": "minecraft:uniform",
"value": {
"max_exclusive": 0.9,
"min_inclusive": 0.1
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
{
"type": "minecraft:cave",
"config": {
"debug_settings": {
"air_state": {
"Name": "deeperdarker:echo_button",
"Properties": {
"face": "wall",
"facing": "north",
"powered": "false"
}
},
"barrier_state": {
"Name": "minecraft:glass"
},
"lava_state": {
"Name": "minecraft:orange_stained_glass"
},
"water_state": {
"Name": "minecraft:candle",
"Properties": {
"candles": "1",
"lit": "false",
"waterlogged": "false"
}
}
},
"floor_level": {
"type": "minecraft:uniform",
"value": {
"max_exclusive": -0.4,
"min_inclusive": -1.0
}
},
"horizontal_radius_multiplier": {
"type": "minecraft:uniform",
"value": {
"max_exclusive": 1.1,
"min_inclusive": 0.6
}
},
"lava_level": {
"above_bottom": 15
},
"probability": 0.3,
"replaceable": "#deeperdarker:otherside_carver_replaceables",
"vertical_radius_multiplier": {
"type": "minecraft:uniform",
"value": {
"max_exclusive": 1.1,
"min_inclusive": 0.8
}
},
"y": {
"type": "minecraft:uniform",
"max_inclusive": {
"above_bottom": 32
},
"min_inclusive": {
"above_bottom": 10
}
},
"yScale": {
"type": "minecraft:uniform",
"value": {
"max_exclusive": 0.9,
"min_inclusive": 0.1
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -101,13 +101,16 @@ protected void addTags(HolderLookup.@NotNull Provider pProvider) {

tag(DDTags.Blocks.ECHO_LOGS).add(DDBlocks.ECHO_LOG.get(), DDBlocks.ECHO_WOOD.get(), DDBlocks.STRIPPED_ECHO_LOG.get(), DDBlocks.STRIPPED_ECHO_WOOD.get());
tag(DDTags.Blocks.BLOOM_STEMS).add(DDBlocks.BLOOMING_STEM.get(), DDBlocks.STRIPPED_BLOOMING_STEM.get());

tag(DDTags.Blocks.OTHERSIDE_CARVER_REPLACEABLES).add(Blocks.WATER, Blocks.DEEPSLATE, Blocks.SCULK, DDBlocks.SCULK_STONE.get(), DDBlocks.SCULK_GRIME.get(), DDBlocks.GLOOMSLATE.get(), DDBlocks.GLOOMY_SCULK.get(), DDBlocks.BLOOMING_SCULK_STONE.get(), DDBlocks.BLOOMING_MOSS_BLOCK.get());
tag(DDTags.Blocks.SCULK_STONE_REPLACEABLES).add(DDBlocks.SCULK_STONE.get(), DDBlocks.SCULK_GRIME.get());
tag(DDTags.Blocks.SCULK_REPLACEABLES).add(Blocks.SCULK, DDBlocks.SCULK_GRIME.get());
tag(DDTags.Blocks.GLOOMSLATE_REPLACEABLE).add(DDBlocks.GLOOMY_SCULK.get(), DDBlocks.GLOOMY_GEYSER.get());
tag(DDTags.Blocks.GLOOMY_SCULK_REPLACEABLE).add(Blocks.SCULK, DDBlocks.SCULK_STONE.get(), DDBlocks.GLOOMSLATE.get(), DDBlocks.SCULK_GRIME.get(), DDBlocks.ECHO_SOIL.get(), DDBlocks.GLOOMY_SCULK.get());
tag(DDTags.Blocks.BLOOMING_POOL_REPLACEABLE).add(DDBlocks.BLOOMING_SCULK_STONE.get(), DDBlocks.BLOOMING_MOSS_BLOCK.get());
tag(DDTags.Blocks.SCULK_VINE_PLACEABLE).add(Blocks.SCULK, DDBlocks.SCULK_STONE.get(), DDBlocks.ECHO_LEAVES.get());
tag(DDTags.Blocks.GLOWING_VINE_PLACEABLE).add(Blocks.SCULK, DDBlocks.SCULK_STONE.get());

tag(DDTags.Blocks.TRANSMITTABLE).addTags(BlockTags.SHULKER_BOXES, BlockTags.ANVIL).add(Blocks.CRAFTING_TABLE, Blocks.STONECUTTER, Blocks.CARTOGRAPHY_TABLE, Blocks.SMITHING_TABLE, Blocks.GRINDSTONE, Blocks.LOOM, Blocks.FURNACE, Blocks.SMOKER, Blocks.BLAST_FURNACE, Blocks.CHIPPED_ANVIL, Blocks.ENCHANTING_TABLE, Blocks.BREWING_STAND, Blocks.BEACON, Blocks.CHEST, Blocks.BARREL, Blocks.DISPENSER, Blocks.DROPPER, Blocks.HOPPER, Blocks.TRAPPED_CHEST);
tag(DDTags.Blocks.INFINIBURN_OTHERSIDE).addTag(BlockTags.INFINIBURN_NETHER).add(DDBlocks.GLOOMSLATE.get());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import com.kyanite.deeperdarker.DeeperDarker;
import com.kyanite.deeperdarker.util.DDDamageTypes;
import com.kyanite.deeperdarker.world.DDCarvers;
import com.kyanite.deeperdarker.world.DDConfiguredFeatures;
import com.kyanite.deeperdarker.world.DDPlacedFeatures;
import com.kyanite.deeperdarker.world.otherside.OthersideBiomes;
Expand All @@ -23,6 +24,7 @@
public class DDRegistriesGenerator extends DatapackBuiltinEntriesProvider {
public static final RegistrySetBuilder BUILDER = new RegistrySetBuilder()
.add(Registries.BIOME, OthersideBiomes::bootstrap)
.add(Registries.CONFIGURED_CARVER, DDCarvers::bootstrap)
.add(Registries.CONFIGURED_FEATURE, DDConfiguredFeatures::bootstrap)
.add(Registries.DAMAGE_TYPE, DDDamageTypes::bootstrap)
.add(Registries.DIMENSION_TYPE, OthersideDimension::bootstrap)
Expand Down
1 change: 1 addition & 0 deletions src/main/java/com/kyanite/deeperdarker/util/DDTags.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ public static class Blocks {
public static final TagKey<Block> ECHO_LOGS = tag("echo_logs");
public static final TagKey<Block> BLOOM_STEMS = tag("bloom_stems");

public static final TagKey<Block> OTHERSIDE_CARVER_REPLACEABLES = tag("otherside_carver_replaceables");
public static final TagKey<Block> SCULK_STONE_REPLACEABLES = tag("sculk_stone_replaceables");
public static final TagKey<Block> SCULK_REPLACEABLES = tag("sculk_replaceables");
public static final TagKey<Block> GLOOMSLATE_REPLACEABLE = tag("gloomslate_replaceable");
Expand Down
52 changes: 52 additions & 0 deletions src/main/java/com/kyanite/deeperdarker/world/DDCarvers.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
package com.kyanite.deeperdarker.world;

import com.kyanite.deeperdarker.DeeperDarker;
import com.kyanite.deeperdarker.content.DDBlocks;
import com.kyanite.deeperdarker.util.DDTags;
import net.minecraft.core.HolderGetter;
import net.minecraft.core.registries.Registries;
import net.minecraft.data.worldgen.BootstapContext;
import net.minecraft.resources.ResourceKey;
import net.minecraft.util.valueproviders.UniformFloat;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.levelgen.VerticalAnchor;
import net.minecraft.world.level.levelgen.carver.CarverDebugSettings;
import net.minecraft.world.level.levelgen.carver.CaveCarverConfiguration;
import net.minecraft.world.level.levelgen.carver.ConfiguredWorldCarver;
import net.minecraft.world.level.levelgen.carver.WorldCarver;
import net.minecraft.world.level.levelgen.heightproviders.UniformHeight;

public class DDCarvers {
public static final ResourceKey<ConfiguredWorldCarver<?>> CAVE = createKey("cave");
public static final ResourceKey<ConfiguredWorldCarver<?>> LOW_CAVE = createKey("low_cave");

public static void bootstrap(BootstapContext<ConfiguredWorldCarver<?>> context) {
HolderGetter<Block> blocks = context.lookup(Registries.BLOCK);
context.register(CAVE, WorldCarver.CAVE.configured(new CaveCarverConfiguration(
0.22f,
UniformHeight.of(VerticalAnchor.aboveBottom(10), VerticalAnchor.belowTop(10)),
UniformFloat.of(0.1f, 0.9f),
VerticalAnchor.bottom(),
CarverDebugSettings.of(false, DDBlocks.BLOOM_BUTTON.get().defaultBlockState()),
blocks.getOrThrow(DDTags.Blocks.OTHERSIDE_CARVER_REPLACEABLES),
UniformFloat.of(0.7f, 1.4f),
UniformFloat.of(0.8f, 1.3f),
UniformFloat.of(-1, -0.4f)
)));
context.register(LOW_CAVE, WorldCarver.CAVE.configured(new CaveCarverConfiguration(
0.3f,
UniformHeight.of(VerticalAnchor.aboveBottom(10), VerticalAnchor.aboveBottom(32)),
UniformFloat.of(0.1f, 0.9f),
VerticalAnchor.aboveBottom(15),
CarverDebugSettings.of(false, DDBlocks.ECHO_BUTTON.get().defaultBlockState()),
blocks.getOrThrow(DDTags.Blocks.OTHERSIDE_CARVER_REPLACEABLES),
UniformFloat.of(0.6f, 1.1f),
UniformFloat.of(0.8f, 1.1f),
UniformFloat.of(-1, -0.4f)
)));
}

private static ResourceKey<ConfiguredWorldCarver<?>> createKey(String name) {
return ResourceKey.create(Registries.CONFIGURED_CARVER, DeeperDarker.rl(name));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import com.kyanite.deeperdarker.DeeperDarker;
import com.kyanite.deeperdarker.content.DDEntities;
import com.kyanite.deeperdarker.content.DDSounds;
import com.kyanite.deeperdarker.world.DDCarvers;
import com.kyanite.deeperdarker.world.DDPlacedFeatures;
import net.minecraft.core.HolderGetter;
import net.minecraft.core.particles.ParticleTypes;
Expand Down Expand Up @@ -48,6 +49,7 @@ private static Biome deeplands(HolderGetter<PlacedFeature> placedFeatures, Holde
mobSpawnBuilder.addSpawn(MobCategory.MONSTER, new MobSpawnSettings.SpawnerData(EntityType.PHANTOM, 2, 1, 2));

BiomeGenerationSettings.Builder biomeBuilder = new BiomeGenerationSettings.Builder(placedFeatures, worldCarvers);
biomeBuilder.addCarver(GenerationStep.Carving.AIR, DDCarvers.CAVE);
biomeBuilder.addFeature(GenerationStep.Decoration.UNDERGROUND_DECORATION, DDPlacedFeatures.SCULK_STONE_COLUMN);
biomeBuilder.addFeature(GenerationStep.Decoration.UNDERGROUND_DECORATION, DDPlacedFeatures.SCULK_GLEAM);
biomeBuilder.addFeature(GenerationStep.Decoration.VEGETAL_DECORATION, DDPlacedFeatures.SURFACE_SCULK_STONE);
Expand Down Expand Up @@ -76,6 +78,7 @@ private static Biome echoingForest(HolderGetter<PlacedFeature> placedFeatures, H
mobSpawnBuilder.addSpawn(MobCategory.MONSTER, new MobSpawnSettings.SpawnerData(DDEntities.SHATTERED.get(), 17, 2, 5));

BiomeGenerationSettings.Builder biomeBuilder = new BiomeGenerationSettings.Builder(placedFeatures, worldCarvers);
biomeBuilder.addCarver(GenerationStep.Carving.AIR, DDCarvers.CAVE);
biomeBuilder.addFeature(GenerationStep.Decoration.UNDERGROUND_DECORATION, DDPlacedFeatures.SCULK_GLEAM_FOREST);
biomeBuilder.addFeature(GenerationStep.Decoration.VEGETAL_DECORATION, DDPlacedFeatures.ECHO_TREE);
biomeBuilder.addFeature(GenerationStep.Decoration.UNDERGROUND_ORES, DDPlacedFeatures.ECHO_SOIL);
Expand Down Expand Up @@ -104,6 +107,7 @@ private static Biome bloomingCaverns(HolderGetter<PlacedFeature> placedFeatures,
mobSpawnBuilder.addSpawn(MobCategory.MONSTER, new MobSpawnSettings.SpawnerData(DDEntities.SCULK_SNAPPER.get(), 1, 1, 2));

BiomeGenerationSettings.Builder biomeBuilder = new BiomeGenerationSettings.Builder(placedFeatures, worldCarvers);
biomeBuilder.addCarver(GenerationStep.Carving.AIR, DDCarvers.CAVE);
biomeBuilder.addFeature(GenerationStep.Decoration.LAKES, DDPlacedFeatures.BLOOMING_WATER_EDGE);
biomeBuilder.addFeature(GenerationStep.Decoration.LAKES, DDPlacedFeatures.BLOOMING_POOL);
biomeBuilder.addFeature(GenerationStep.Decoration.VEGETAL_DECORATION, DDPlacedFeatures.BLOOMING_SCULK_VEGETATION);
Expand Down Expand Up @@ -133,6 +137,8 @@ private static Biome bloomingCaverns(HolderGetter<PlacedFeature> placedFeatures,

private static Biome overcastColumns(HolderGetter<PlacedFeature> placedFeatures, HolderGetter<ConfiguredWorldCarver<?>> worldCarvers) {
BiomeGenerationSettings.Builder biomeBuilder = new BiomeGenerationSettings.Builder(placedFeatures, worldCarvers);
biomeBuilder.addCarver(GenerationStep.Carving.AIR, DDCarvers.CAVE);
biomeBuilder.addCarver(GenerationStep.Carving.AIR, DDCarvers.LOW_CAVE);
biomeBuilder.addFeature(GenerationStep.Decoration.UNDERGROUND_DECORATION, DDPlacedFeatures.GLOOMSLATE_COLUMN);
biomeBuilder.addFeature(GenerationStep.Decoration.VEGETAL_DECORATION, DDPlacedFeatures.SURFACE_GLOOMSLATE);
biomeBuilder.addFeature(GenerationStep.Decoration.VEGETAL_DECORATION, DDPlacedFeatures.GLOOMY_SCULK_VEGETATION);
Expand Down

0 comments on commit 79ee13e

Please sign in to comment.