Skip to content

Commit

Permalink
Improvements to the End Corruption
Browse files Browse the repository at this point in the history
  • Loading branch information
Forstride committed Jan 14, 2024
1 parent 13d4393 commit 4bb6d78
Show file tree
Hide file tree
Showing 21 changed files with 316 additions and 57 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// 1.20.4 2024-01-13T21:02:08.8330299 Registries
// 1.20.4 2024-01-14T02:13:56.8026759 Registries
bec08031dc5126119d3c7a1033703f8235bdf56e data/biomesoplenty/damage_type/bramble.json
41f8df67f585538edc9847b6754275d24b813e06 data/biomesoplenty/damage_type/fumarole.json
1db19ce8d33b8c131955b60ed830200bbee6a912 data/biomesoplenty/worldgen/biome/aspen_glade.json
Expand All @@ -14,7 +14,7 @@ d0c0bdd9fc7b09e7d046e35faea8cc6d752b468a data/biomesoplenty/worldgen/biome/crag.
506de7d82a9bf0a7caea3390590dc9d1fa2028b0 data/biomesoplenty/worldgen/biome/dryland.json
d4a9226ceaef3cf4eed45892e027c1eabf9fcd72 data/biomesoplenty/worldgen/biome/dune_beach.json
253f26c8caa759d436ace9d8d5fe7ddc55ee4f8c data/biomesoplenty/worldgen/biome/end_aeries.json
2b986dc1824b208063ac0738c86753980800e41f data/biomesoplenty/worldgen/biome/end_corruption.json
1d2989a8aed931ff5de5fabff53cd9014d8f0c21 data/biomesoplenty/worldgen/biome/end_corruption.json
253f26c8caa759d436ace9d8d5fe7ddc55ee4f8c data/biomesoplenty/worldgen/biome/end_drifts.json
253f26c8caa759d436ace9d8d5fe7ddc55ee4f8c data/biomesoplenty/worldgen/biome/end_reef.json
01773716ee0f40a49bb0f57b9abd91d5195f0be2 data/biomesoplenty/worldgen/biome/end_wilds.json
Expand Down Expand Up @@ -213,6 +213,9 @@ d0604daa873d67e12bd3f0ce62d7994671c5b124 data/biomesoplenty/worldgen/configured_
2b93c838ff048ba3aa64c57c9beab7b299e41789 data/biomesoplenty/worldgen/configured_feature/nether_bone_spine.json
8983f10fea2f2b9edbab92a2c9c0332f32fccc3c data/biomesoplenty/worldgen/configured_feature/nether_bramble.json
f9a397d007b98bf36c83d256856fd0fcc45d3a37 data/biomesoplenty/worldgen/configured_feature/nether_vines.json
76fa38cb0a73a9f1330c2e773bfa3fe6187723db data/biomesoplenty/worldgen/configured_feature/null_lake.json
68b8cab5ece0e989c54a9bd1e173cdb125cb81a9 data/biomesoplenty/worldgen/configured_feature/null_tree.json
b30b546db0d147741d48bf7644eb24d2f164f667 data/biomesoplenty/worldgen/configured_feature/null_trees.json
6141c480c606ffa99a495c76b5a9b59ffebfb789 data/biomesoplenty/worldgen/configured_feature/oak_bush.json
6227de33c6e00775d2282294f22bfe801c230003 data/biomesoplenty/worldgen/configured_feature/obsidian_splatter.json
003763f1fe56dd5a747789831f851173ffbf6af9 data/biomesoplenty/worldgen/configured_feature/orange_maple_leaf_piles.json
Expand Down Expand Up @@ -476,6 +479,9 @@ eaafc116edf17b5a3c48e7bdc68f62ba84fd2deb data/biomesoplenty/worldgen/placed_feat
97840a5e6998b7403cf670f9700321ce266c1319 data/biomesoplenty/worldgen/placed_feature/nether_bone_spine.json
a0515b53a5b94f2ed1d7dbd87db0585612d83dda data/biomesoplenty/worldgen/placed_feature/nether_bramble.json
1a38b33f693e7e19b9e5975269ae2ab5cf1c2472 data/biomesoplenty/worldgen/placed_feature/nether_vines.json
d88a28ca97427a9545959e6fe871b36bd7c9e292 data/biomesoplenty/worldgen/placed_feature/null_lake.json
b6593e87126d0d5ee1b9117723911931e9d2bef2 data/biomesoplenty/worldgen/placed_feature/null_tree.json
78e79cd90e01538621760accfbdb128e391a43d9 data/biomesoplenty/worldgen/placed_feature/null_trees.json
062fefe110d24798d1df521817e98394fe648a62 data/biomesoplenty/worldgen/placed_feature/oak_bush.json
2669995131b210204c99f3f718cae309ba9e822f data/biomesoplenty/worldgen/placed_feature/obsidian_splatter.json
7fcd3ef78b62a0c814a8e780b79f63c9cf9aaa87 data/biomesoplenty/worldgen/placed_feature/orange_maple_leaf_piles.json
Expand Down Expand Up @@ -538,7 +544,7 @@ d19125aab165d60c5099b3911538fa2f43456aa8 data/biomesoplenty/worldgen/placed_feat
211196b14a3238c05b4b36e9bbdb983bc5f67a68 data/biomesoplenty/worldgen/placed_feature/patch_watergrass_250.json
7931138c5576052576e47194042ff6b0da356fdf data/biomesoplenty/worldgen/placed_feature/patch_watergrass_50.json
aa0d904e7a1f35d576717565f0442d01000453cc data/biomesoplenty/worldgen/placed_feature/patch_waterlily_flowers.json
d52c3e391869e4e9f797081e093ec8aee9e3ffc1 data/biomesoplenty/worldgen/placed_feature/pine_tree.json
91dd2927895b0bca7463537f7bd033455c51ed99 data/biomesoplenty/worldgen/placed_feature/pine_tree.json
51bf1f3cd23c08e9fa2c2189d39fd90371762bc3 data/biomesoplenty/worldgen/placed_feature/porous_flesh.json
5778dd543e43fb9e71c08554abb7f350253643cf data/biomesoplenty/worldgen/placed_feature/pumpkin_patch.json
db09e9654c16f52e231da2d5b8f06e7939ea5d69 data/biomesoplenty/worldgen/placed_feature/pus_bubbles.json
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,13 @@
],
[],
[],
[],
[
"biomesoplenty:anomaly",
"biomesoplenty:null_lake"
],
[],
[
"biomesoplenty:anomaly"
"biomesoplenty:null_trees"
]
],
"has_precipitation": false,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"type": "minecraft:lake",
"config": {
"barrier": {
"type": "minecraft:simple_state_provider",
"state": {
"Name": "biomesoplenty:null_end_stone"
}
},
"fluid": {
"type": "minecraft:simple_state_provider",
"state": {
"Name": "biomesoplenty:null_block"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{
"type": "biomesoplenty:basic_tree",
"config": {
"alt_foliage_provider": {
"type": "minecraft:simple_state_provider",
"state": {
"Name": "minecraft:air"
}
},
"decorators": [],
"foliage_provider": {
"type": "minecraft:simple_state_provider",
"state": {
"Name": "biomesoplenty:null_block"
}
},
"hanging_chance": 0.0,
"hanging_provider": {
"type": "minecraft:simple_state_provider",
"state": {
"Name": "minecraft:air"
}
},
"leaf_layers": 4,
"leaves_layer_height": 2,
"leaves_offset": 1,
"max_height": 7,
"max_leaves_radius": 1,
"min_height": 4,
"trunk_fruit_provider": {
"type": "minecraft:simple_state_provider",
"state": {
"Name": "minecraft:air"
}
},
"trunk_provider": {
"type": "minecraft:simple_state_provider",
"state": {
"Name": "biomesoplenty:null_end_stone"
}
},
"vine_provider": {
"type": "minecraft:simple_state_provider",
"state": {
"Name": "minecraft:air"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"type": "minecraft:random_selector",
"config": {
"default": "biomesoplenty:null_tree",
"features": [
{
"chance": 0.075,
"feature": "biomesoplenty:null_tree"
}
]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"feature": "biomesoplenty:null_lake",
"placement": [
{
"type": "minecraft:count",
"count": 1
},
{
"type": "minecraft:in_square"
},
{
"type": "minecraft:heightmap",
"heightmap": "MOTION_BLOCKING"
},
{
"type": "minecraft:biome"
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"feature": "biomesoplenty:null_tree",
"placement": [
{
"type": "minecraft:block_predicate_filter",
"predicate": {
"type": "minecraft:matching_blocks",
"blocks": "minecraft:end_stone",
"offset": [
0,
-1,
0
]
}
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"feature": "biomesoplenty:null_trees",
"placement": [
{
"type": "minecraft:count",
"count": {
"type": "minecraft:weighted_list",
"distribution": [
{
"data": 0,
"weight": 4
},
{
"data": 1,
"weight": 1
}
]
}
},
{
"type": "minecraft:in_square"
},
{
"type": "minecraft:surface_water_depth_filter",
"max_water_depth": 0
},
{
"type": "minecraft:heightmap",
"heightmap": "OCEAN_FLOOR"
},
{
"type": "minecraft:biome"
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"predicate": {
"type": "minecraft:would_survive",
"state": {
"Name": "biomesoplenty:fir_sapling",
"Name": "biomesoplenty:pine_sapling",
"Properties": {
"stage": "0"
}
Expand Down
10 changes: 6 additions & 4 deletions common/src/main/java/biomesoplenty/biome/BOPEndBiomes.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
******************************************************************************/
package biomesoplenty.biome;

import biomesoplenty.worldgen.placement.BOPVegetationPlacements;
import biomesoplenty.worldgen.placement.BOPEndPlacements;
import net.minecraft.core.HolderGetter;
import net.minecraft.data.worldgen.BiomeDefaultFeatures;
import net.minecraft.data.worldgen.placement.EndPlacements;
Expand Down Expand Up @@ -40,8 +40,8 @@ public static Biome endWilds(HolderGetter<PlacedFeature> placedFeatureGetter, Ho
{
BiomeGenerationSettings.Builder biomeBuilder = new BiomeGenerationSettings.Builder(placedFeatureGetter, carverGetter);
biomeBuilder.addFeature(GenerationStep.Decoration.SURFACE_STRUCTURES, EndPlacements.END_GATEWAY_RETURN);
biomeBuilder.addFeature(GenerationStep.Decoration.VEGETAL_DECORATION, BOPVegetationPlacements.FLOWER_END_WILDS);
biomeBuilder.addFeature(GenerationStep.Decoration.VEGETAL_DECORATION, BOPVegetationPlacements.PATCH_ENDERPHYTES);
biomeBuilder.addFeature(GenerationStep.Decoration.VEGETAL_DECORATION, BOPEndPlacements.FLOWER_END_WILDS);
biomeBuilder.addFeature(GenerationStep.Decoration.VEGETAL_DECORATION, BOPEndPlacements.PATCH_ENDERPHYTES);
return baseEndBiome(biomeBuilder);
}

Expand Down Expand Up @@ -70,7 +70,9 @@ public static Biome endCorruption(HolderGetter<PlacedFeature> placedFeatureGette
{
BiomeGenerationSettings.Builder biomeBuilder = new BiomeGenerationSettings.Builder(placedFeatureGetter, carverGetter);
biomeBuilder.addFeature(GenerationStep.Decoration.SURFACE_STRUCTURES, EndPlacements.END_GATEWAY_RETURN);
biomeBuilder.addFeature(GenerationStep.Decoration.VEGETAL_DECORATION, BOPVegetationPlacements.ANOMALY);
biomeBuilder.addFeature(GenerationStep.Decoration.UNDERGROUND_DECORATION, BOPEndPlacements.ANOMALY);
biomeBuilder.addFeature(GenerationStep.Decoration.UNDERGROUND_DECORATION, BOPEndPlacements.NULL_LAKE);
biomeBuilder.addFeature(GenerationStep.Decoration.VEGETAL_DECORATION, BOPEndPlacements.NULL_TREES);
return baseEndBiome(biomeBuilder);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
******************************************************************************/
package biomesoplenty.block;

import biomesoplenty.api.block.BOPBlocks;
import biomesoplenty.worldgen.placement.BOPVegetationPlacements;
import biomesoplenty.worldgen.placement.BOPEndPlacements;
import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction;
import net.minecraft.core.Holder;
Expand Down Expand Up @@ -73,7 +72,7 @@ public boolean isBonemealSuccess(Level p_153802_, RandomSource p_153803_, BlockP
public void performBonemeal(ServerLevel p_221270_, RandomSource p_221271_, BlockPos p_221272_, BlockState p_221273_)
{
BlockPos blockpos = p_221272_.above();
Optional<Holder.Reference<PlacedFeature>> optional = p_221270_.registryAccess().registryOrThrow(Registries.PLACED_FEATURE).getHolder(BOPVegetationPlacements.ENDERPHYTE_BONEMEAL);
Optional<Holder.Reference<PlacedFeature>> optional = p_221270_.registryAccess().registryOrThrow(Registries.PLACED_FEATURE).getHolder(BOPEndPlacements.ENDERPHYTE_BONEMEAL);

label49:
for(int i = 0; i < 128; ++i)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ public static void bootstrap(BootstapContext<ConfiguredFeature<?, ?>> context)
BOPCaveFeatures.bootstrap(context);
BOPMiscOverworldFeatures.bootstrap(context);
BOPNetherFeatures.bootstrap(context);
BOPEndFeatures.bootstrap(context);
BOPTreeFeatures.bootstrap(context);
BOPVegetationFeatures.bootstrap(context);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ public static void bootstrap(BootstapContext<PlacedFeature> context)
BOPCavePlacements.bootstrap(context);
BOPMiscOverworldPlacements.bootstrap(context);
BOPNetherPlacements.bootstrap(context);
BOPEndPlacements.bootstrap(context);
BOPTreePlacements.bootstrap(context);
BOPVegetationPlacements.bootstrap(context);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import biomesoplenty.worldgen.feature.misc.*;
import biomesoplenty.worldgen.feature.tree.*;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.item.Item;
import net.minecraft.world.level.levelgen.feature.Feature;
import net.minecraft.world.level.levelgen.feature.configurations.FeatureConfiguration;
import net.minecraft.world.level.levelgen.feature.configurations.LargeDripstoneConfiguration;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
/*******************************************************************************
* Copyright 2022, the Glitchfiend Team.
* All rights reserved.
******************************************************************************/
package biomesoplenty.worldgen.feature;

import biomesoplenty.api.block.BOPBlocks;
import biomesoplenty.util.worldgen.BOPFeatureUtils;
import biomesoplenty.worldgen.placement.BOPTreePlacements;
import com.google.common.collect.ImmutableList;
import net.minecraft.core.Holder;
import net.minecraft.core.HolderGetter;
import net.minecraft.core.registries.Registries;
import net.minecraft.data.worldgen.BootstapContext;
import net.minecraft.data.worldgen.features.FeatureUtils;
import net.minecraft.resources.ResourceKey;
import net.minecraft.world.level.levelgen.feature.ConfiguredFeature;
import net.minecraft.world.level.levelgen.feature.Feature;
import net.minecraft.world.level.levelgen.feature.LakeFeature;
import net.minecraft.world.level.levelgen.feature.WeightedPlacedFeature;
import net.minecraft.world.level.levelgen.feature.configurations.FeatureConfiguration;
import net.minecraft.world.level.levelgen.feature.configurations.NoneFeatureConfiguration;
import net.minecraft.world.level.levelgen.feature.configurations.RandomFeatureConfiguration;
import net.minecraft.world.level.levelgen.feature.configurations.SimpleBlockConfiguration;
import net.minecraft.world.level.levelgen.feature.stateproviders.BlockStateProvider;
import net.minecraft.world.level.levelgen.placement.PlacedFeature;

public class BOPEndFeatures
{
public static final ResourceKey<ConfiguredFeature<?, ?>> ANOMALY = BOPFeatureUtils.createKey("anomaly");
public static final ResourceKey<ConfiguredFeature<?, ?>> ENDERPHYTE_BONEMEAL = BOPFeatureUtils.createKey("enderphyte_bonemeal");
public static final ResourceKey<ConfiguredFeature<?, ?>> FLOWER_END_WILDS = BOPFeatureUtils.createKey("flower_end_wilds");
public static final ResourceKey<ConfiguredFeature<?, ?>> NULL_LAKE = BOPFeatureUtils.createKey("null_lake");
public static final ResourceKey<ConfiguredFeature<?, ?>> NULL_TREES = BOPFeatureUtils.createKey("null_trees");
public static final ResourceKey<ConfiguredFeature<?, ?>> PATCH_ENDERPHYTES = BOPFeatureUtils.createKey("patch_enderphytes");

public static void bootstrap(BootstapContext<ConfiguredFeature<?, ?>> context)
{
HolderGetter<PlacedFeature> placedFeatureGetter = context.lookup(Registries.PLACED_FEATURE);
final Holder<PlacedFeature> NULL_TREE_CHECKED = placedFeatureGetter.getOrThrow(BOPTreePlacements.NULL_TREE_CHECKED);

register(context, BOPEndFeatures.ANOMALY, BOPBaseFeatures.ANOMALY, NoneFeatureConfiguration.INSTANCE);
register(context, BOPEndFeatures.ENDERPHYTE_BONEMEAL, Feature.SIMPLE_BLOCK, new SimpleBlockConfiguration(BlockStateProvider.simple(BOPBlocks.ENDERPHYTE.defaultBlockState())));
register(context, BOPEndFeatures.FLOWER_END_WILDS, Feature.FLOWER, FeatureUtils.simplePatchConfiguration(Feature.SIMPLE_BLOCK, new SimpleBlockConfiguration(BlockStateProvider.simple(BOPBlocks.ALGAE_BLOOM))));
register(context, BOPEndFeatures.NULL_LAKE, Feature.LAKE, new LakeFeature.Configuration(BlockStateProvider.simple(BOPBlocks.NULL_BLOCK), BlockStateProvider.simple(BOPBlocks.NULL_END_STONE)));
register(context, BOPEndFeatures.NULL_TREES, Feature.RANDOM_SELECTOR, new RandomFeatureConfiguration(ImmutableList.of(new WeightedPlacedFeature(NULL_TREE_CHECKED, 0.075F)), NULL_TREE_CHECKED));
register(context, BOPEndFeatures.PATCH_ENDERPHYTES, Feature.RANDOM_PATCH, FeatureUtils.simplePatchConfiguration(Feature.SIMPLE_BLOCK, new SimpleBlockConfiguration(BlockStateProvider.simple(BOPBlocks.ENDERPHYTE))));
}

private static <FC extends FeatureConfiguration, F extends Feature<FC>> void register(BootstapContext<ConfiguredFeature<?, ?>> context, ResourceKey<ConfiguredFeature<?, ?>> configuredFeatureKey, F feature, FC configuration)
{
context.register(configuredFeatureKey, new ConfiguredFeature<>(feature, configuration));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ public class BOPTreeFeatures
public static final ResourceKey<ConfiguredFeature<?, ?>> PALM_TREE = BOPFeatureUtils.createKey("palm_tree");
public static final ResourceKey<ConfiguredFeature<?, ?>> REDWOOD_TREE_LARGE = BOPFeatureUtils.createKey("redwood_tree_large");
public static final ResourceKey<ConfiguredFeature<?, ?>> PINE_TREE = BOPFeatureUtils.createKey("pine_tree");
public static final ResourceKey<ConfiguredFeature<?, ?>> NULL_TREE = BOPFeatureUtils.createKey("null_tree");

public static void bootstrap(BootstapContext<ConfiguredFeature<?, ?>> context)
{
Expand Down Expand Up @@ -171,6 +172,7 @@ public static void bootstrap(BootstapContext<ConfiguredFeature<?, ?>> context)
register(context, BOPTreeFeatures.SNOWBLOSSOM_TREE, Feature.TREE, snowblossom().build());
register(context, BOPTreeFeatures.REDWOOD_TREE_LARGE, BOPBaseFeatures.REDWOOD_TREE, createRedwood(BOPBlocks.REDWOOD_WOOD).minHeight(45).maxHeight(60).trunkWidth(3).build());
register(context, BOPTreeFeatures.PINE_TREE, BOPBaseFeatures.PINE_TREE, new PineTreeConfiguration.Builder().build());
register(context, BOPTreeFeatures.NULL_TREE, BOPBaseFeatures.BASIC_TREE, new BasicTreeConfiguration.Builder().trunk(BlockStateProvider.simple(BOPBlocks.NULL_END_STONE)).foliage(BlockStateProvider.simple(BOPBlocks.NULL_BLOCK)).build());
}

private static TreeConfiguration.TreeConfigurationBuilder snowblossom() {
Expand Down
Loading

0 comments on commit 4bb6d78

Please sign in to comment.