Skip to content

Commit

Permalink
Swapped amount of shrubs in the Shrubland/Rocky Shrubland, made the e…
Browse files Browse the repository at this point in the history
…xposed stone surface more common in the Rocky Shrubland, added packed mud "termite mounds" to the Scrubland, lowered amount of sprouts in the Rocky Rainforest
  • Loading branch information
Forstride committed Jan 23, 2024
1 parent 8d1b408 commit 440f3a1
Show file tree
Hide file tree
Showing 13 changed files with 227 additions and 17 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// 1.20.4 2024-01-20T19:42:20.251974 Registries
// 1.20.4 2024-01-22T21:51:52.9911435 Registries
bec08031dc5126119d3c7a1033703f8235bdf56e data/biomesoplenty/damage_type/bramble.json
41f8df67f585538edc9847b6754275d24b813e06 data/biomesoplenty/damage_type/fumarole.json
1db19ce8d33b8c131955b60ed830200bbee6a912 data/biomesoplenty/worldgen/biome/aspen_glade.json
Expand Down Expand Up @@ -48,9 +48,9 @@ d069fd79392dfcb351dd0e634e6ea4f9e83ba9ff data/biomesoplenty/worldgen/biome/pastu
c192e14c69fed976327bb9429a643ae0a77a7cac data/biomesoplenty/worldgen/biome/pumpkin_patch.json
6c8e60f6976657e727ac444f8db4f1972c9ff975 data/biomesoplenty/worldgen/biome/rainforest.json
21389471c642c1b46eb6679d54d2fcbd0aa966db data/biomesoplenty/worldgen/biome/redwood_forest.json
c99832ea5ef904fb8be737b6167c8a43e6d4e570 data/biomesoplenty/worldgen/biome/rocky_rainforest.json
690b5a1be251f98874dfdd2fbb3ef3bd811ecaa0 data/biomesoplenty/worldgen/biome/rocky_rainforest.json
7d21568158ce2c30daf4205345f0c0826c264551 data/biomesoplenty/worldgen/biome/rocky_shrubland.json
3285061bd512a79cabe9f63087aadc35a58ec4d9 data/biomesoplenty/worldgen/biome/scrubland.json
c4777c88bf889161d1c20bf6e998341fc77493ec data/biomesoplenty/worldgen/biome/scrubland.json
a90275f0d3e81663844572072a0359edf138f00f data/biomesoplenty/worldgen/biome/seasonal_forest.json
915f6c670c2e93c0139193b39ea6520077170567 data/biomesoplenty/worldgen/biome/shrubland.json
c8fa4838e950832b19ba66266866ea61b005223f data/biomesoplenty/worldgen/biome/snowblossom_grove.json
Expand Down Expand Up @@ -295,6 +295,7 @@ bd086bf28e079252554cf73adf234953bf70dba2 data/biomesoplenty/worldgen/configured_
b48440fe4a0cf0efdf35cd32d746772b45afda08 data/biomesoplenty/worldgen/configured_feature/tall_spruce_tree_bees.json
79eb5cea0a0423add5ff9d17797f60dc279d74c2 data/biomesoplenty/worldgen/configured_feature/tall_twiglet_tree.json
55cac49cd61cd3a2391e3c1da3bc4ff3ce4c11c8 data/biomesoplenty/worldgen/configured_feature/tall_umbran_tree.json
2796fd23690b73214e0ad4f23cbffeb752216187 data/biomesoplenty/worldgen/configured_feature/termite_mound.json
d3a2bce6cff46fd0c26097cd1f904a6fd5b001d1 data/biomesoplenty/worldgen/configured_feature/thin_bamboo.json
f739ec8434da0e8541d26a33a9b5abf18fa169d2 data/biomesoplenty/worldgen/configured_feature/tidepool.json
af8cdae336ba410701a356288fdd72fd03a80586 data/biomesoplenty/worldgen/configured_feature/toadstool_normal.json
Expand Down Expand Up @@ -611,6 +612,7 @@ b49b4fe6426269383157659659eb8cbd7fd1c7d9 data/biomesoplenty/worldgen/placed_feat
8d560e20db11bb7c4929d5a70a01e688282d8fa2 data/biomesoplenty/worldgen/placed_feature/tall_spruce_tree_bees.json
cbbf9e96d9aa6fb26b2ecb60fc9dc049084f7ec4 data/biomesoplenty/worldgen/placed_feature/tall_twiglet_tree.json
7b5f8550c5c2b4c50f6fb4027dc5d8bc0dabcb5a data/biomesoplenty/worldgen/placed_feature/tall_umbran_tree.json
68ac06d276e33d455f36ae5afb148f34c56422de data/biomesoplenty/worldgen/placed_feature/termite_mound.json
c2f17ae7a59995ac9634e9a1667804ca7cd1e4bc data/biomesoplenty/worldgen/placed_feature/thin_bamboo.json
5775c79dfed5eec4eeaf931c90ef00d83708aa00 data/biomesoplenty/worldgen/placed_feature/tidepool.json
279b9fc1b35dee55e995a1efbc309545b4019e52 data/biomesoplenty/worldgen/placed_feature/toadstool_extra.json
Expand Down Expand Up @@ -647,11 +649,11 @@ b55f4ccdcdb6fa79dcda41bc10e49af9e03560ef data/biomesoplenty/worldgen/placed_feat
365cdd613bd3f6bf3bfcd62ee3fe0e9cf04231bb data/biomesoplenty/worldgen/placed_feature/trees_rainforest_cliffs.json
9f57d6b099b878c48b57956707f2a53c2b472124 data/biomesoplenty/worldgen/placed_feature/trees_rainforest_floodplain.json
76d3138edff6543f7b8e3c80645b0e904fd63416 data/biomesoplenty/worldgen/placed_feature/trees_redwood_forest.json
c1c5f0c4197dbec3e987a1326b7d15bef9a4f1b5 data/biomesoplenty/worldgen/placed_feature/trees_rocky_shrubland.json
bc02201bb19bfe926fddf3e7b708d0de970325d6 data/biomesoplenty/worldgen/placed_feature/trees_rocky_shrubland.json
de63632a2699e1198b2bdbc5ad22b2cfabf66ca5 data/biomesoplenty/worldgen/placed_feature/trees_scrubland.json
e471ed08d8839279e5b8b8a73e2cb5a7364aea5a data/biomesoplenty/worldgen/placed_feature/trees_seasonal_forest.json
ac7a47820f1078b060c64d829c385d0b22f36f63 data/biomesoplenty/worldgen/placed_feature/trees_seasonal_pumpkin_patch.json
bc02201bb19bfe926fddf3e7b708d0de970325d6 data/biomesoplenty/worldgen/placed_feature/trees_shrubland.json
c1c5f0c4197dbec3e987a1326b7d15bef9a4f1b5 data/biomesoplenty/worldgen/placed_feature/trees_shrubland.json
af1b4603a980d2cb58a6c24682f3a0766d143929 data/biomesoplenty/worldgen/placed_feature/trees_snowblossom_grove.json
6507b7656339637ee4007039afd331c5517100ce data/biomesoplenty/worldgen/placed_feature/trees_snowy_coniferous_forest.json
305c53df50222cb8c5e031fe84826e44b2dc42ec data/biomesoplenty/worldgen/placed_feature/trees_snowy_maple_forest.json
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
"biomesoplenty:patch_fern_16",
"biomesoplenty:patch_large_fern_normal",
"biomesoplenty:rainforest_cliffs_vines",
"biomesoplenty:patch_sprouts_15",
"biomesoplenty:patch_sprouts_10",
"biomesoplenty:patch_grass_12",
"biomesoplenty:patch_tall_grass_24",
"biomesoplenty:patch_watergrass_10"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,9 @@
"minecraft:ore_copper",
"minecraft:underwater_magma"
],
[],
[
"biomesoplenty:termite_mound"
],
[
"minecraft:spring_water",
"minecraft:spring_lava"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"type": "biomesoplenty:termite_mound",
"config": {}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"feature": "biomesoplenty:termite_mound",
"placement": [
{
"type": "minecraft:rarity_filter",
"chance": 12
},
{
"type": "minecraft:in_square"
},
{
"type": "minecraft:heightmap",
"heightmap": "MOTION_BLOCKING"
},
{
"type": "minecraft:biome"
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
"type": "minecraft:weighted_list",
"distribution": [
{
"data": 2,
"weight": 19
"data": 6,
"weight": 9
},
{
"data": 3,
"data": 7,
"weight": 1
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
"type": "minecraft:weighted_list",
"distribution": [
{
"data": 6,
"weight": 9
"data": 2,
"weight": 19
},
{
"data": 7,
"data": 3,
"weight": 1
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1121,7 +1121,7 @@ public static Biome rockyRainforest(HolderGetter<PlacedFeature> placedFeatureGet
addFeature(biomeBuilder, GenerationStep.Decoration.VEGETAL_DECORATION, BOPVegetationPlacements.PATCH_FERN_16);
addFeature(biomeBuilder, GenerationStep.Decoration.VEGETAL_DECORATION, BOPVegetationPlacements.PATCH_LARGE_FERN_NORMAL);
addFeature(biomeBuilder, GenerationStep.Decoration.VEGETAL_DECORATION, BOPVegetationPlacements.RAINFOREST_CLIFFS_VINES);
addFeature(biomeBuilder, GenerationStep.Decoration.VEGETAL_DECORATION, BOPVegetationPlacements.PATCH_SPROUTS_15);
addFeature(biomeBuilder, GenerationStep.Decoration.VEGETAL_DECORATION, BOPVegetationPlacements.PATCH_SPROUTS_10);
addFeature(biomeBuilder, GenerationStep.Decoration.VEGETAL_DECORATION, BOPVegetationPlacements.PATCH_GRASS_12);
addFeature(biomeBuilder, GenerationStep.Decoration.VEGETAL_DECORATION, BOPVegetationPlacements.PATCH_TALL_GRASS_24);
addFeature(biomeBuilder, GenerationStep.Decoration.VEGETAL_DECORATION, BOPVegetationPlacements.PATCH_WATERGRASS_10);
Expand Down Expand Up @@ -1185,6 +1185,7 @@ public static Biome scrubland(HolderGetter<PlacedFeature> placedFeatureGetter, H
BiomeGenerationSettings.Builder biomeBuilder = new BiomeGenerationSettings.Builder(placedFeatureGetter, carverGetter);
globalOverworldGeneration(biomeBuilder);
BiomeDefaultFeatures.addDefaultOres(biomeBuilder);
addFeature(biomeBuilder, GenerationStep.Decoration.UNDERGROUND_DECORATION, BOPVegetationPlacements.TERMITE_MOUND);
addFeature(biomeBuilder, GenerationStep.Decoration.VEGETAL_DECORATION, BOPVegetationPlacements.TREES_SCRUBLAND);
addFeature(biomeBuilder, GenerationStep.Decoration.VEGETAL_DECORATION, BOPVegetationPlacements.FLOWER_SCRUBLAND);
addFeature(biomeBuilder, GenerationStep.Decoration.VEGETAL_DECORATION, BOPVegetationPlacements.SCRUB_EXTRA);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ private static SurfaceRules.RuleSource makeBOPOverworldRules()

SurfaceRules.ifTrue(
SurfaceRules.isBiome(BOPBiomes.ROCKY_SHRUBLAND),
SurfaceRules.ifTrue(surfaceNoiseAbove(1.7D), STONE)
SurfaceRules.ifTrue(surfaceNoiseAbove(1.4D), STONE)
),
SurfaceRules.ifTrue(SurfaceRules.isBiome(BOPBiomes.WASTELAND), DRIED_SALT)
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ public class BOPBaseFeatures
public static Feature<NoneFeatureConfiguration> SMALL_TOADSTOOL;
public static Feature<NoneFeatureConfiguration> STRINGY_COBWEB;
public static BOPTreeFeature<TaigaTreeConfiguration> TAIGA_TREE;
public static Feature<NoneFeatureConfiguration> TERMITE_MOUND;
public static BOPTreeFeature<TwigletTreeConfiguration> TWIGLET_TREE;
public static BOPTreeFeature<TaigaTreeConfiguration> UMBRAN_TREE;
public static Feature<NoneFeatureConfiguration> WEBBING;
Expand Down Expand Up @@ -172,6 +173,7 @@ public static void registerFeatures(BiConsumer<ResourceLocation, Feature<?>> fun
SMALL_TOADSTOOL = register(func, "small_toadstool", new SmallToadstoolFeature(NoneFeatureConfiguration.CODEC));
STRINGY_COBWEB = register(func, "stringy_cobweb", new StringyCobwebFeature(NoneFeatureConfiguration.CODEC));
TAIGA_TREE = register(func, "taiga_tree", new TaigaTreeFeature(TaigaTreeConfiguration.CODEC));
TERMITE_MOUND = register(func, "termite_mound", new TermiteMoundFeature(NoneFeatureConfiguration.CODEC));
TWIGLET_TREE = register(func, "twiglet_tree", new TwigletTreeFeature(TwigletTreeConfiguration.CODEC));
UMBRAN_TREE = register(func, "umbran_tree", new UmbranTreeFeature(TaigaTreeConfiguration.CODEC));
WEBBING = register(func, "webbing", new WebbingFeature(NoneFeatureConfiguration.CODEC));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ public class BOPVegetationFeatures
public static final ResourceKey<ConfiguredFeature<?, ?>> SPROUT_BONEMEAL = BOPFeatureUtils.createKey("sprout_bonemeal");
public static final ResourceKey<ConfiguredFeature<?, ?>> SUNFLOWER = BOPFeatureUtils.createKey("sunflower");
public static final ResourceKey<ConfiguredFeature<?, ?>> SHORT_BAMBOO = BOPFeatureUtils.createKey("short_bamboo");
public static final ResourceKey<ConfiguredFeature<?, ?>> TERMITE_MOUND = BOPFeatureUtils.createKey("termite_mound");
public static final ResourceKey<ConfiguredFeature<?, ?>> THIN_BAMBOO = BOPFeatureUtils.createKey("thin_bamboo");
public static final ResourceKey<ConfiguredFeature<?, ?>> SMALL_DRIPLEAF = BOPFeatureUtils.createKey("small_dripleaf");
public static final ResourceKey<ConfiguredFeature<?, ?>> SMALL_BROWN_MUSHROOM = BOPFeatureUtils.createKey("small_brown_mushroom");
Expand Down Expand Up @@ -280,6 +281,7 @@ public static void bootstrap(BootstapContext<ConfiguredFeature<?, ?>> context)
register(context, BOPVegetationFeatures.SPROUT_BONEMEAL, Feature.SIMPLE_BLOCK, new SimpleBlockConfiguration(BlockStateProvider.simple(BOPBlocks.SPROUT.defaultBlockState())));
register(context, BOPVegetationFeatures.SUNFLOWER, Feature.RANDOM_PATCH, FeatureUtils.simplePatchConfiguration(Feature.SIMPLE_BLOCK, new SimpleBlockConfiguration(BlockStateProvider.simple(Blocks.SUNFLOWER))));
register(context, BOPVegetationFeatures.SHORT_BAMBOO, BOPBaseFeatures.SHORT_BAMBOO, NoneFeatureConfiguration.INSTANCE);
register(context, BOPVegetationFeatures.TERMITE_MOUND, BOPBaseFeatures.TERMITE_MOUND, NoneFeatureConfiguration.INSTANCE);
register(context, BOPVegetationFeatures.THIN_BAMBOO, BOPBaseFeatures.THIN_BAMBOO, NoneFeatureConfiguration.INSTANCE);
register(context, BOPVegetationFeatures.SMALL_DRIPLEAF, BOPBaseFeatures.SMALL_DRIPLEAF, NoneFeatureConfiguration.INSTANCE);
register(context, BOPVegetationFeatures.SMALL_BROWN_MUSHROOM, BOPBaseFeatures.SMALL_BROWN_MUSHROOM, NoneFeatureConfiguration.INSTANCE);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,175 @@
/*******************************************************************************
* Copyright 2022, the Glitchfiend Team.
* All rights reserved.
******************************************************************************/
package biomesoplenty.worldgen.feature.misc;

import biomesoplenty.util.SimpleBlockPredicate;
import com.mojang.serialization.Codec;
import net.minecraft.core.BlockPos;
import net.minecraft.util.RandomSource;
import net.minecraft.world.level.LevelSimulatedReader;
import net.minecraft.world.level.WorldGenLevel;
import net.minecraft.world.level.block.Blocks;
import net.minecraft.world.level.block.BushBlock;
import net.minecraft.world.level.block.state.BlockBehaviour;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.level.chunk.ChunkGenerator;
import net.minecraft.world.level.levelgen.feature.Feature;
import net.minecraft.world.level.levelgen.feature.FeaturePlaceContext;
import net.minecraft.world.level.levelgen.feature.TreeFeature;
import net.minecraft.world.level.levelgen.feature.configurations.NoneFeatureConfiguration;

public class TermiteMoundFeature extends Feature<NoneFeatureConfiguration>
{
protected SimpleBlockPredicate placeOn = (world, pos) -> world.getBlockState(pos).getBlock() == Blocks.GRASS_BLOCK;
protected SimpleBlockPredicate replace = (world, pos) -> TreeFeature.isAirOrLeaves(world, pos) || world.getBlockState(pos).getBlock() instanceof BushBlock;

public TermiteMoundFeature(Codec<NoneFeatureConfiguration> deserializer)
{
super(deserializer);
}

@Override
public boolean place(FeaturePlaceContext<NoneFeatureConfiguration> featurePlaceContext)
{
WorldGenLevel world = featurePlaceContext.level();
ChunkGenerator chunkGenerator = featurePlaceContext.chunkGenerator();
RandomSource rand = featurePlaceContext.random();
BlockPos startPos = featurePlaceContext.origin();
NoneFeatureConfiguration config = featurePlaceContext.config();
while (startPos.getY() >= world.getMinBuildHeight()+1 && this.replace.matches(world, startPos)) {startPos = startPos.below();}

if (!this.placeOn.matches(world, startPos))
{
// Abandon if we can't place the tree on this block
return false;
}

if (!this.checkSpace(world, startPos.above()))
{
// Abandon if there isn't enough room
return false;
}

BlockPos pos = startPos.above();
int height = 2 + rand.nextInt(3);
for (int y = -1; y <= height + 1; y++)
{
this.setBlock(world, pos.above(y), Blocks.PACKED_MUD.defaultBlockState());
}

for (int x = -1; x <= 1; x++)
{
for (int z = -1; z <= 1; z++)
{
if (!((x == -1 || x == 1) && (z == -1 || z == 1)))
{
int i = (height / 2) + (rand.nextInt(2) - rand.nextInt(2));
for (int y = -1; y <= i; y++)
{
this.setBlock(world, pos.offset(x, y, z), Blocks.PACKED_MUD.defaultBlockState());
}
}
else
{
if (rand.nextInt(3) == 0)
{
for (int y = -1; y <= 0; y++)
{
this.setBlock(world, pos.offset(x, y, z), Blocks.PACKED_MUD.defaultBlockState());
}
}
}
}
}

int j = 2;

for (int k = pos.getX() - j; k <= pos.getX() + j; ++k)
{
for (int l = pos.getZ() - j; l <= pos.getZ() + j; ++l)
{
int i1 = k - pos.getX();
int j1 = l - pos.getZ();
if (i1 * i1 + j1 * j1 <= j * j)
{
for (int k1 = pos.getY() - 2; k1 <= pos.getY() + 2; ++k1)
{
BlockPos blockpos = new BlockPos(k, k1, l);
BlockState blockstate = world.getBlockState(blockpos);

if (blockstate.getBlock() == Blocks.GRASS_BLOCK)
{
world.setBlock(blockpos, Blocks.PACKED_MUD.defaultBlockState(), 2);
break;
}
}
}
}
}

int m = j + 2;

for (int k = pos.getX() - m; k <= pos.getX() + m; ++k)
{
for (int l = pos.getZ() - m; l <= pos.getZ() + m; ++l)
{
int i1 = k - pos.getX();
int j1 = l - pos.getZ();
if (i1 * i1 + j1 * j1 <= m * m)
{
for (int k1 = pos.getY() - 2; k1 <= pos.getY() + 2; ++k1)
{
BlockPos blockpos = new BlockPos(k, k1, l);
BlockState blockstate = world.getBlockState(blockpos);

if (blockstate.getBlock() == Blocks.GRASS_BLOCK)
{
if (rand.nextInt(2) == 0)
{
world.setBlock(blockpos, Blocks.PACKED_MUD.defaultBlockState(), 2);
}
break;
}
}
}
}
}

return true;
}

public boolean setBlock(WorldGenLevel world, BlockPos pos, BlockState state)
{
if (this.replace.matches(world, pos))
{
super.setBlock(world, pos, state);
return true;
}
return false;
}

public boolean checkSpace(WorldGenLevel world, BlockPos pos)
{
for (int y = 0; y <= 6; y++)
{
for (int x = -1; x <= 1; x++)
{
for (int z = -1; z <= 1; z++)
{
BlockPos pos1 = pos.offset(x, y, z);
if (pos1.getY() >= 255 || !this.replace.matches(world, pos1))
{
return false;
}
}
}
}
return true;
}

public static boolean isAir(LevelSimulatedReader p_65811_, BlockPos p_65812_) {
return p_65811_.isStateAtPosition(p_65812_, BlockBehaviour.BlockStateBase::isAir);
}
}
Loading

0 comments on commit 440f3a1

Please sign in to comment.