diff --git a/src/generated/resources/.cache/103d9f3f36b01595f1aa5172191e60eff02e6924 b/src/generated/resources/.cache/103d9f3f36b01595f1aa5172191e60eff02e6924 index df45fdacd..b21b0140e 100644 --- a/src/generated/resources/.cache/103d9f3f36b01595f1aa5172191e60eff02e6924 +++ b/src/generated/resources/.cache/103d9f3f36b01595f1aa5172191e60eff02e6924 @@ -1,4 +1,4 @@ -// 1.20.4 2023-12-13T03:23:45.3537111 Registries +// 1.20.4 2024-01-09T12:43:37.113881 Registries a09ddf53150a7fcf8767a311dd5cf040fa2e9221 data/biomesoplenty/damage_type/bramble.json 2d0eab2cc85c4c6397fdc41dd0cedefbc4a7a150 data/biomesoplenty/damage_type/fumarole.json 1db19ce8d33b8c131955b60ed830200bbee6a912 data/biomesoplenty/worldgen/biome/aspen_glade.json @@ -163,9 +163,11 @@ b7c8479b58bf928126528554a624b24b31e271c9 data/biomesoplenty/worldgen/configured_ e789a1d5ed583b58970046ae7aaa1aee3db5e138 data/biomesoplenty/worldgen/configured_feature/flower_wildflower.json 9aea32958474412cd6f448ded674460bc3cbf5d4 data/biomesoplenty/worldgen/configured_feature/giant_glowshroom_cave.json e61a36facff8a5ebc08130e6bf1d0ad698ee0c2d data/biomesoplenty/worldgen/configured_feature/giant_tree.json +058d0fbddf7d5401d3ce43a8ff48495914d0d2a7 data/biomesoplenty/worldgen/configured_feature/glowing_grotto_ceiling_plants.json 8548fcda4d231ff1fd559b533a744d05679ddd7d data/biomesoplenty/worldgen/configured_feature/glowing_grotto_floor_plants.json e965af2123aa8370d24048c005c943a83de6b679 data/biomesoplenty/worldgen/configured_feature/glowing_moss_patch.json a58a9feee8ed675421187fc4bd393b2458c79481 data/biomesoplenty/worldgen/configured_feature/glowing_moss_patch_bonemeal.json +465dd2845e4f36d543c30bf84b4126159e41a0d3 data/biomesoplenty/worldgen/configured_feature/glowing_moss_patch_bonemeal_bottom.json cf8d22a77f9689ec358e1588f9059addb2000cf9 data/biomesoplenty/worldgen/configured_feature/glowworm_silk.json fdc974dfafbf4a7658e36a1c3ab88f7d08ce99e2 data/biomesoplenty/worldgen/configured_feature/goldenrod.json 6d3c2a7a45a0663fce2968d5151036de0e606e34 data/biomesoplenty/worldgen/configured_feature/hair.json @@ -263,6 +265,7 @@ d87d90916abd6fe071bf29076ed7d22cce851486 data/biomesoplenty/worldgen/configured_ c7c6754b855b755d3c183e6f8e86e0ade2b878c5 data/biomesoplenty/worldgen/configured_feature/spring_lava_volcano.json 3a4c60fa1ee57b5b8ba28a25bc0c41a86293fa45 data/biomesoplenty/worldgen/configured_feature/spring_water_extra.json 490897b03b2cb822737519650a9abe093070f922 data/biomesoplenty/worldgen/configured_feature/sprouts_undergrowth.json +bd086bf28e079252554cf73adf234953bf70dba2 data/biomesoplenty/worldgen/configured_feature/sprout_bonemeal.json 37c885b65c9c00709ebb25c7b9d25e069e1577ee data/biomesoplenty/worldgen/configured_feature/spruce_bush.json 7a5228091146cfb88a6a39df41d15fd596e13412 data/biomesoplenty/worldgen/configured_feature/spruce_poplar_tree.json 74610c78a0d85f60a0dcc58529cc074e2a0f239a data/biomesoplenty/worldgen/configured_feature/spruce_twiglet_tree.json @@ -558,6 +561,7 @@ d6bc04af30883b72799cb256c49a550e3d8afee9 data/biomesoplenty/worldgen/placed_feat 76dfc2afe7cbffb594337ffea5df43449c93f758 data/biomesoplenty/worldgen/placed_feature/spring_lava_volcano.json 99ae840a7d0aa5fc5a1941126cc4b85a937b5996 data/biomesoplenty/worldgen/placed_feature/spring_water_extra.json ee7f4df006fd534f998daf475482bb1acca0cd3f data/biomesoplenty/worldgen/placed_feature/sprouts_undergrowth.json +dd76a040b540ec4ab0986d74fa3cbba02725402a data/biomesoplenty/worldgen/placed_feature/sprout_bonemeal.json 212bb036d2b8b398ce520a3670f6124efa9bd229 data/biomesoplenty/worldgen/placed_feature/spruce_bush.json e0d549bf2e58a98f405659b64f9831d25f979f88 data/biomesoplenty/worldgen/placed_feature/spruce_poplar_tree.json 849711fce232370528ad51f0f4111fc8657dfd18 data/biomesoplenty/worldgen/placed_feature/spruce_twiglet_tree.json diff --git a/src/generated/resources/data/biomesoplenty/worldgen/configured_feature/glowing_grotto_ceiling_plants.json b/src/generated/resources/data/biomesoplenty/worldgen/configured_feature/glowing_grotto_ceiling_plants.json new file mode 100644 index 000000000..90801cee0 --- /dev/null +++ b/src/generated/resources/data/biomesoplenty/worldgen/configured_feature/glowing_grotto_ceiling_plants.json @@ -0,0 +1,14 @@ +{ + "type": "minecraft:simple_block", + "config": { + "to_place": { + "type": "minecraft:simple_state_provider", + "state": { + "Name": "biomesoplenty:glowworm_silk", + "Properties": { + "age": "0" + } + } + } + } +} \ No newline at end of file diff --git a/src/generated/resources/data/biomesoplenty/worldgen/configured_feature/glowing_moss_patch_bonemeal_bottom.json b/src/generated/resources/data/biomesoplenty/worldgen/configured_feature/glowing_moss_patch_bonemeal_bottom.json new file mode 100644 index 000000000..34f09986f --- /dev/null +++ b/src/generated/resources/data/biomesoplenty/worldgen/configured_feature/glowing_moss_patch_bonemeal_bottom.json @@ -0,0 +1,29 @@ +{ + "type": "minecraft:vegetation_patch", + "config": { + "depth": 1, + "extra_bottom_block_chance": 0.0, + "extra_edge_column_chance": 0.75, + "ground_state": { + "type": "minecraft:simple_state_provider", + "state": { + "Name": "biomesoplenty:glowing_moss_block" + } + }, + "replaceable": "#minecraft:moss_replaceable", + "surface": "ceiling", + "vegetation_chance": 0.4, + "vegetation_feature": { + "feature": "biomesoplenty:glowing_grotto_ceiling_plants", + "placement": [] + }, + "vertical_range": 5, + "xz_radius": { + "type": "minecraft:uniform", + "value": { + "max_inclusive": 2, + "min_inclusive": 1 + } + } + } +} \ No newline at end of file diff --git a/src/generated/resources/data/biomesoplenty/worldgen/configured_feature/sprout_bonemeal.json b/src/generated/resources/data/biomesoplenty/worldgen/configured_feature/sprout_bonemeal.json new file mode 100644 index 000000000..8c362de26 --- /dev/null +++ b/src/generated/resources/data/biomesoplenty/worldgen/configured_feature/sprout_bonemeal.json @@ -0,0 +1,11 @@ +{ + "type": "minecraft:simple_block", + "config": { + "to_place": { + "type": "minecraft:simple_state_provider", + "state": { + "Name": "biomesoplenty:sprout" + } + } + } +} \ No newline at end of file diff --git a/src/generated/resources/data/biomesoplenty/worldgen/placed_feature/sprout_bonemeal.json b/src/generated/resources/data/biomesoplenty/worldgen/placed_feature/sprout_bonemeal.json new file mode 100644 index 000000000..fdf74b706 --- /dev/null +++ b/src/generated/resources/data/biomesoplenty/worldgen/placed_feature/sprout_bonemeal.json @@ -0,0 +1,12 @@ +{ + "feature": "biomesoplenty:sprout_bonemeal", + "placement": [ + { + "type": "minecraft:block_predicate_filter", + "predicate": { + "type": "minecraft:matching_blocks", + "blocks": "minecraft:air" + } + } + ] +} \ No newline at end of file diff --git a/src/main/java/biomesoplenty/common/block/DoublePlantBlockBOP.java b/src/main/java/biomesoplenty/common/block/DoublePlantBlockBOP.java index 0798b8e7c..c80e65cb6 100644 --- a/src/main/java/biomesoplenty/common/block/DoublePlantBlockBOP.java +++ b/src/main/java/biomesoplenty/common/block/DoublePlantBlockBOP.java @@ -5,18 +5,40 @@ package biomesoplenty.common.block; import net.minecraft.core.BlockPos; +import net.minecraft.server.level.ServerLevel; +import net.minecraft.util.RandomSource; +import net.minecraft.world.item.ItemStack; import net.minecraft.world.level.BlockGetter; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.LevelReader; import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.BonemealableBlock; import net.minecraft.world.level.block.DoublePlantBlock; +import net.minecraft.world.level.block.state.BlockState; import net.minecraftforge.common.PlantType; -public class DoublePlantBlockBOP extends DoublePlantBlock +public class DoublePlantBlockBOP extends DoublePlantBlock implements BonemealableBlock { public DoublePlantBlockBOP(Block.Properties properties) { super(properties); } + @Override + public boolean isValidBonemealTarget(LevelReader p_256234_, BlockPos p_57304_, BlockState p_57305_) { + return true; + } + + @Override + public boolean isBonemealSuccess(Level p_222573_, RandomSource p_222574_, BlockPos p_222575_, BlockState p_222576_) { + return true; + } + + @Override + public void performBonemeal(ServerLevel p_222568_, RandomSource p_222569_, BlockPos p_222570_, BlockState p_222571_) { + popResource(p_222568_, p_222570_, new ItemStack(this)); + } + @Override public PlantType getPlantType(BlockGetter world, BlockPos pos) { diff --git a/src/main/java/biomesoplenty/common/block/DoubleWaterPlantBlock.java b/src/main/java/biomesoplenty/common/block/DoubleWaterPlantBlock.java index b9358d1c7..5f9db4a79 100644 --- a/src/main/java/biomesoplenty/common/block/DoubleWaterPlantBlock.java +++ b/src/main/java/biomesoplenty/common/block/DoubleWaterPlantBlock.java @@ -6,7 +6,9 @@ import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; +import net.minecraft.server.level.ServerLevel; import net.minecraft.tags.FluidTags; +import net.minecraft.util.RandomSource; import net.minecraft.world.entity.LivingEntity; import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.context.BlockPlaceContext; @@ -14,10 +16,7 @@ import net.minecraft.world.level.Level; import net.minecraft.world.level.LevelAccessor; import net.minecraft.world.level.LevelReader; -import net.minecraft.world.level.block.Block; -import net.minecraft.world.level.block.Blocks; -import net.minecraft.world.level.block.DoublePlantBlock; -import net.minecraft.world.level.block.SimpleWaterloggedBlock; +import net.minecraft.world.level.block.*; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.block.state.StateDefinition; import net.minecraft.world.level.block.state.properties.BlockStateProperties; @@ -29,7 +28,7 @@ import javax.annotation.Nullable; -public class DoubleWaterPlantBlock extends DoublePlantBlock implements SimpleWaterloggedBlock +public class DoubleWaterPlantBlock extends DoublePlantBlock implements SimpleWaterloggedBlock, BonemealableBlock { public static final BooleanProperty WATERLOGGED = BlockStateProperties.WATERLOGGED; @@ -78,6 +77,21 @@ public boolean canSurvive(BlockState state, LevelReader worldIn, BlockPos pos) } } + @Override + public boolean isValidBonemealTarget(LevelReader p_256234_, BlockPos p_57304_, BlockState p_57305_) { + return true; + } + + @Override + public boolean isBonemealSuccess(Level p_222573_, RandomSource p_222574_, BlockPos p_222575_, BlockState p_222576_) { + return true; + } + + @Override + public void performBonemeal(ServerLevel p_222568_, RandomSource p_222569_, BlockPos p_222570_, BlockState p_222571_) { + popResource(p_222568_, p_222570_, new ItemStack(this)); + } + @Override public PlantType getPlantType(BlockGetter world, BlockPos pos) { diff --git a/src/main/java/biomesoplenty/common/block/GlowingMossBlock.java b/src/main/java/biomesoplenty/common/block/GlowingMossBlock.java index 96ec713db..8d7f96126 100644 --- a/src/main/java/biomesoplenty/common/block/GlowingMossBlock.java +++ b/src/main/java/biomesoplenty/common/block/GlowingMossBlock.java @@ -27,7 +27,7 @@ public GlowingMossBlock(BlockBehaviour.Properties p_153790_) { @Override public boolean isValidBonemealTarget(LevelReader p_153797_, BlockPos p_153798_, BlockState p_153799_) { - return p_153797_.getBlockState(p_153798_.above()).isAir(); + return p_153797_.getBlockState(p_153798_.above()).isAir() || p_153797_.getBlockState(p_153798_.below()).isAir(); } @Override @@ -41,5 +41,6 @@ public void performBonemeal(ServerLevel p_153792_, RandomSource p_153793_, Block { Registry> configuredFeatureRegistry = p_153792_.registryAccess().registryOrThrow(Registries.CONFIGURED_FEATURE); configuredFeatureRegistry.get(BOPCaveFeatures.GLOWING_MOSS_PATCH_BONEMEAL).place(p_153792_, p_153792_.getChunkSource().getGenerator(), p_153793_, p_153794_.above()); + configuredFeatureRegistry.get(BOPCaveFeatures.GLOWING_MOSS_PATCH_BONEMEAL_BOTTOM).place(p_153792_, p_153792_.getChunkSource().getGenerator(), p_153793_, p_153794_.below()); } } \ No newline at end of file diff --git a/src/main/java/biomesoplenty/common/block/GlowwormSilkBlock.java b/src/main/java/biomesoplenty/common/block/GlowwormSilkBlock.java index c28d65fe2..987392bf5 100644 --- a/src/main/java/biomesoplenty/common/block/GlowwormSilkBlock.java +++ b/src/main/java/biomesoplenty/common/block/GlowwormSilkBlock.java @@ -7,7 +7,6 @@ import biomesoplenty.api.block.BOPBlocks; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; -import net.minecraft.tags.BlockTags; import net.minecraft.world.level.LevelReader; import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.GrowingPlantHeadBlock; @@ -35,7 +34,7 @@ public boolean canSurvive(BlockState p_196260_1_, LevelReader p_196260_2_, Block } else { - return block == this.getHeadBlock() || block == this.getBodyBlock() || blockstate.getBlock() == BOPBlocks.GLOWING_MOSS_BLOCK.get() || (blockstate.is(BlockTags.DRIPSTONE_REPLACEABLE) && blockstate.isFaceSturdy(p_196260_2_, blockpos, Direction.DOWN)); + return block == this.getHeadBlock() || block == this.getBodyBlock() || blockstate.isFaceSturdy(p_196260_2_, blockpos, Direction.DOWN); } } } \ No newline at end of file diff --git a/src/main/java/biomesoplenty/common/block/GlowwormSilkBottomBlock.java b/src/main/java/biomesoplenty/common/block/GlowwormSilkBottomBlock.java index 81ad59436..cd05351b1 100644 --- a/src/main/java/biomesoplenty/common/block/GlowwormSilkBottomBlock.java +++ b/src/main/java/biomesoplenty/common/block/GlowwormSilkBottomBlock.java @@ -8,7 +8,6 @@ import biomesoplenty.init.ModParticles; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; -import net.minecraft.tags.BlockTags; import net.minecraft.util.RandomSource; import net.minecraft.world.level.Level; import net.minecraft.world.level.LevelReader; @@ -38,7 +37,7 @@ public boolean canSurvive(BlockState p_196260_1_, LevelReader p_196260_2_, Block } else { - return block == this.getHeadBlock() || block == this.getBodyBlock() || blockstate.getBlock() == BOPBlocks.GLOWING_MOSS_BLOCK.get() || (blockstate.is(BlockTags.DRIPSTONE_REPLACEABLE) && blockstate.isFaceSturdy(p_196260_2_, blockpos, Direction.DOWN)); + return block == this.getHeadBlock() || block == this.getBodyBlock() || blockstate.isFaceSturdy(p_196260_2_, blockpos, Direction.DOWN); } } diff --git a/src/main/java/biomesoplenty/common/block/OriginGrassBlock.java b/src/main/java/biomesoplenty/common/block/OriginGrassBlock.java index 72e083bb6..e97b6b110 100644 --- a/src/main/java/biomesoplenty/common/block/OriginGrassBlock.java +++ b/src/main/java/biomesoplenty/common/block/OriginGrassBlock.java @@ -1,6 +1,8 @@ package biomesoplenty.common.block; +import net.minecraft.core.BlockPos; import net.minecraft.world.item.context.UseOnContext; +import net.minecraft.world.level.LevelReader; import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.Blocks; import net.minecraft.world.level.block.GrassBlock; @@ -30,4 +32,10 @@ public BlockState getToolModifiedState(BlockState state, UseOnContext context, T return null; } + + @Override + public boolean isValidBonemealTarget(LevelReader p_256229_, BlockPos p_256432_, BlockState p_255677_) + { + return false; + } } diff --git a/src/main/java/biomesoplenty/common/block/OvergrownSandBlock.java b/src/main/java/biomesoplenty/common/block/OvergrownSandBlock.java index 51a63565a..b10d05638 100644 --- a/src/main/java/biomesoplenty/common/block/OvergrownSandBlock.java +++ b/src/main/java/biomesoplenty/common/block/OvergrownSandBlock.java @@ -5,19 +5,29 @@ package biomesoplenty.common.block; import biomesoplenty.api.block.BOPBlocks; +import biomesoplenty.common.worldgen.placement.BOPVegetationPlacements; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; +import net.minecraft.core.Holder; +import net.minecraft.core.registries.Registries; +import net.minecraft.data.worldgen.placement.VegetationPlacements; import net.minecraft.server.level.ServerLevel; import net.minecraft.util.ColorRGBA; import net.minecraft.util.RandomSource; import net.minecraft.world.level.BlockGetter; +import net.minecraft.world.level.Level; import net.minecraft.world.level.LevelReader; +import net.minecraft.world.level.block.Blocks; +import net.minecraft.world.level.block.BonemealableBlock; import net.minecraft.world.level.block.ColoredFallingBlock; import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.levelgen.placement.PlacedFeature; import net.minecraft.world.level.lighting.LightEngine; import net.minecraftforge.common.PlantType; -public class OvergrownSandBlock extends ColoredFallingBlock +import java.util.Optional; + +public class OvergrownSandBlock extends ColoredFallingBlock implements BonemealableBlock { public OvergrownSandBlock(ColorRGBA dustColor, Properties properties) { @@ -56,4 +66,57 @@ public void randomTick(BlockState p_222508_, ServerLevel p_222509_, BlockPos p_2 p_222509_.setBlockAndUpdate(p_222510_, BOPBlocks.BLACK_SAND.get().defaultBlockState()); } } + + @Override + public boolean isValidBonemealTarget(LevelReader p_256229_, BlockPos p_256432_, BlockState p_255677_) + { + return p_256229_.getBlockState(p_256432_.above()).isAir(); + } + + @Override + public boolean isBonemealSuccess(Level p_221275_, RandomSource p_221276_, BlockPos p_221277_, BlockState p_221278_) + { + return true; + } + + @Override + public void performBonemeal(ServerLevel p_221270_, RandomSource p_221271_, BlockPos p_221272_, BlockState p_221273_) + { + BlockPos blockpos = p_221272_.above(); + BlockState blockstate = Blocks.SHORT_GRASS.defaultBlockState(); + Optional> optional = p_221270_.registryAccess().registryOrThrow(Registries.PLACED_FEATURE).getHolder(BOPVegetationPlacements.SPROUT_BONEMEAL); + + label49: + for(int i = 0; i < 128; ++i) + { + BlockPos blockpos1 = blockpos; + + for(int j = 0; j < i / 16; ++j) + { + blockpos1 = blockpos1.offset(p_221271_.nextInt(3) - 1, (p_221271_.nextInt(3) - 1) * p_221271_.nextInt(3) / 2, p_221271_.nextInt(3) - 1); + if (!p_221270_.getBlockState(blockpos1.below()).is(this) || p_221270_.getBlockState(blockpos1).isCollisionShapeFullBlock(p_221270_, blockpos1)) { + continue label49; + } + } + + BlockState blockstate1 = p_221270_.getBlockState(blockpos1); + if (blockstate1.is(blockstate.getBlock()) && p_221271_.nextInt(10) == 0) + { + ((BonemealableBlock)blockstate.getBlock()).performBonemeal(p_221270_, p_221271_, blockpos1, blockstate1); + } + + if (blockstate1.isAir()) + { + Holder holder; + if (!optional.isPresent()) { + continue; + } + + holder = optional.get(); + + holder.value().place(p_221270_, p_221270_.getChunkSource().getGenerator(), p_221271_, blockpos1); + } + } + + } } diff --git a/src/main/java/biomesoplenty/common/worldgen/feature/BOPCaveFeatures.java b/src/main/java/biomesoplenty/common/worldgen/feature/BOPCaveFeatures.java index 6707c0211..a3ac76309 100644 --- a/src/main/java/biomesoplenty/common/worldgen/feature/BOPCaveFeatures.java +++ b/src/main/java/biomesoplenty/common/worldgen/feature/BOPCaveFeatures.java @@ -35,8 +35,10 @@ public class BOPCaveFeatures { public static final ResourceKey> GLOWING_GROTTO_FLOOR_PLANTS = createKey("glowing_grotto_floor_plants"); + public static final ResourceKey> GLOWING_GROTTO_CEILING_PLANTS = createKey("glowing_grotto_ceiling_plants"); public static final ResourceKey> GLOWING_MOSS_PATCH = createKey("glowing_moss_patch"); public static final ResourceKey> GLOWING_MOSS_PATCH_BONEMEAL = createKey("glowing_moss_patch_bonemeal"); + public static final ResourceKey> GLOWING_MOSS_PATCH_BONEMEAL_BOTTOM = createKey("glowing_moss_patch_bonemeal_bottom"); public static final ResourceKey> MUD_PLANTS = createKey("mud_plants"); public static final ResourceKey> MUD_PATCH = createKey("mud_patch"); public static final ResourceKey> GLOWWORM_SILK = createKey("glowworm_silk"); @@ -58,8 +60,13 @@ public static void bootstrap(BootstapContext> context) register(context, BOPCaveFeatures.GLOWING_GROTTO_FLOOR_PLANTS, Feature.SIMPLE_BLOCK, new SimpleBlockConfiguration(new WeightedStateProvider(SimpleWeightedRandomList.builder().add(BOPBlocks.GLOWSHROOM.get().defaultBlockState(), 6).add(BOPBlocks.GLOWING_MOSS_CARPET.get().defaultBlockState(), 25)))); final Holder> GLOWING_GROTTO_FLOOR_PLANTS = configuredFeatureGetter.getOrThrow(BOPCaveFeatures.GLOWING_GROTTO_FLOOR_PLANTS); + register(context, BOPCaveFeatures.GLOWING_GROTTO_CEILING_PLANTS, Feature.SIMPLE_BLOCK, new SimpleBlockConfiguration(BlockStateProvider.simple(BOPBlocks.GLOWWORM_SILK.get()))); + final Holder> GLOWING_GROTTO_CEILING_PLANTS = configuredFeatureGetter.getOrThrow(BOPCaveFeatures.GLOWING_GROTTO_CEILING_PLANTS); + + register(context, BOPCaveFeatures.GLOWING_MOSS_PATCH, Feature.VEGETATION_PATCH, new VegetationPatchConfiguration(BlockTags.MOSS_REPLACEABLE, BlockStateProvider.simple(BOPBlocks.GLOWING_MOSS_BLOCK.get()), PlacementUtils.inlinePlaced(GLOWING_GROTTO_FLOOR_PLANTS), CaveSurface.FLOOR, ConstantInt.of(1), 0.0F, 5, 0.5F, UniformInt.of(4, 7), 0.3F)); register(context, BOPCaveFeatures.GLOWING_MOSS_PATCH_BONEMEAL, Feature.VEGETATION_PATCH, new VegetationPatchConfiguration(BlockTags.MOSS_REPLACEABLE, BlockStateProvider.simple(BOPBlocks.GLOWING_MOSS_BLOCK.get()), PlacementUtils.inlinePlaced(GLOWING_GROTTO_FLOOR_PLANTS), CaveSurface.FLOOR, ConstantInt.of(1), 0.0F, 5, 0.4F, UniformInt.of(1, 2), 0.75F)); + register(context, BOPCaveFeatures.GLOWING_MOSS_PATCH_BONEMEAL_BOTTOM, Feature.VEGETATION_PATCH, new VegetationPatchConfiguration(BlockTags.MOSS_REPLACEABLE, BlockStateProvider.simple(BOPBlocks.GLOWING_MOSS_BLOCK.get()), PlacementUtils.inlinePlaced(GLOWING_GROTTO_CEILING_PLANTS), CaveSurface.CEILING, ConstantInt.of(1), 0.0F, 5, 0.4F, UniformInt.of(1, 2), 0.75F)); register(context, BOPCaveFeatures.MUD_PLANTS, Feature.SIMPLE_BLOCK, new SimpleBlockConfiguration(BlockStateProvider.simple(BOPBlocks.GLOWING_MOSS_CARPET.get()))); final Holder> MUD_PLANTS = configuredFeatureGetter.getOrThrow(BOPCaveFeatures.MUD_PLANTS); diff --git a/src/main/java/biomesoplenty/common/worldgen/feature/BOPVegetationFeatures.java b/src/main/java/biomesoplenty/common/worldgen/feature/BOPVegetationFeatures.java index c7d709d7b..a22c6072d 100644 --- a/src/main/java/biomesoplenty/common/worldgen/feature/BOPVegetationFeatures.java +++ b/src/main/java/biomesoplenty/common/worldgen/feature/BOPVegetationFeatures.java @@ -73,6 +73,7 @@ public class BOPVegetationFeatures public static final ResourceKey> PATCH_REED = createKey("patch_reed"); public static final ResourceKey> PATCH_SEA_OATS = createKey("patch_sea_oats"); public static final ResourceKey> PATCH_SPROUTS = createKey("patch_sprouts"); + public static final ResourceKey> SPROUT_BONEMEAL = createKey("sprout_bonemeal"); public static final ResourceKey> PATCH_TALL_LAVENDER = createKey("patch_tall_lavender"); public static final ResourceKey> PATCH_TINY_CACTUS = createKey("patch_tiny_cactus"); public static final ResourceKey> PATCH_TUNDRA_SHRUBS = createKey("patch_tundra_shrubs"); @@ -267,6 +268,7 @@ public static void bootstrap(BootstapContext> context) register(context, BOPVegetationFeatures.PATCH_TUNDRA_SHRUBS, Feature.RANDOM_PATCH, FeatureUtils.simplePatchConfiguration(Feature.SIMPLE_BLOCK, new SimpleBlockConfiguration(BlockStateProvider.simple(BOPBlocks.TUNDRA_SHRUB.get())))); register(context, BOPVegetationFeatures.PATCH_WATERGRASS, Feature.RANDOM_PATCH, waterPatchConfiguration(Feature.SIMPLE_BLOCK, new SimpleBlockConfiguration(BlockStateProvider.simple(BOPBlocks.WATERGRASS.get())))); register(context, BOPVegetationFeatures.PATCH_WATERLILY_FLOWER, Feature.RANDOM_PATCH, new RandomPatchConfiguration(10, 7, 3, PlacementUtils.onlyWhenEmpty(Feature.SIMPLE_BLOCK, new SimpleBlockConfiguration(BlockStateProvider.simple(BOPBlocks.WATERLILY.get()))))); + register(context, BOPVegetationFeatures.SPROUT_BONEMEAL, Feature.SIMPLE_BLOCK, new SimpleBlockConfiguration(BlockStateProvider.simple(BOPBlocks.SPROUT.get().defaultBlockState()))); register(context, BOPVegetationFeatures.PUMPKIN_PATCH, BOPBaseFeatures.PUMPKIN_PATCH, NoneFeatureConfiguration.INSTANCE); register(context, BOPVegetationFeatures.RED_MAPLE_LEAF_PILES, BOPBaseFeatures.RED_MAPLE_LEAF_PILE, NoneFeatureConfiguration.INSTANCE); register(context, BOPVegetationFeatures.ORANGE_MAPLE_LEAF_PILES, BOPBaseFeatures.ORANGE_MAPLE_LEAF_PILE, NoneFeatureConfiguration.INSTANCE); diff --git a/src/main/java/biomesoplenty/common/worldgen/placement/BOPVegetationPlacements.java b/src/main/java/biomesoplenty/common/worldgen/placement/BOPVegetationPlacements.java index 7e20bf43a..46cdea977 100644 --- a/src/main/java/biomesoplenty/common/worldgen/placement/BOPVegetationPlacements.java +++ b/src/main/java/biomesoplenty/common/worldgen/placement/BOPVegetationPlacements.java @@ -76,6 +76,7 @@ public class BOPVegetationPlacements public static final ResourceKey PATCH_TALL_LAVENDER_FOREST = createKey("patch_tall_lavender_forest"); public static final ResourceKey PATCH_TINY_CACTUS = createKey("patch_tiny_cactus"); public static final ResourceKey PATCH_TUNDRA_SHRUBS = createKey("patch_tundra_shrubs"); + public static final ResourceKey SPROUT_BONEMEAL = createKey("sprout_bonemeal"); public static final ResourceKey RAINFOREST_CLIFFS_VINES = createKey("rainforest_cliffs_vines"); public static final ResourceKey SMALL_BROWN_MUSHROOM = createKey("small_brown_mushroom"); public static final ResourceKey SMALL_TOADSTOOL = createKey("small_toadstool"); @@ -236,6 +237,7 @@ public static void bootstrap(BootstapContext context) final Holder> PATCH_REED = configuredFeatureGetter.getOrThrow(BOPVegetationFeatures.PATCH_REED); final Holder> PATCH_WATERGRASS = configuredFeatureGetter.getOrThrow(BOPVegetationFeatures.PATCH_WATERGRASS); final Holder> PATCH_WATERLILY_FLOWER = configuredFeatureGetter.getOrThrow(BOPVegetationFeatures.PATCH_WATERLILY_FLOWER); + final Holder> SPROUT_BONEMEAL = configuredFeatureGetter.getOrThrow(BOPVegetationFeatures.SPROUT_BONEMEAL); final Holder> FLOWER_LAVENDER = configuredFeatureGetter.getOrThrow(BOPVegetationFeatures.FLOWER_LAVENDER); final Holder> FLOWER_WILDFLOWER = configuredFeatureGetter.getOrThrow(BOPVegetationFeatures.FLOWER_WILDFLOWER); final Holder> FLOWER_CLOVER_PATCH = configuredFeatureGetter.getOrThrow(BOPVegetationFeatures.FLOWER_CLOVER_PATCH); @@ -377,6 +379,7 @@ public static void bootstrap(BootstapContext context) register(context, BOPVegetationPlacements.PATCH_TALL_LAVENDER_FOREST, PATCH_TALL_LAVENDER, List.of(RarityFilter.onAverageOnceEvery(3), InSquarePlacement.spread(), PlacementUtils.HEIGHTMAP, BiomeFilter.biome())); register(context, BOPVegetationPlacements.PATCH_TINY_CACTUS, PATCH_TINY_CACTUS, List.of(RarityFilter.onAverageOnceEvery(3), InSquarePlacement.spread(), PlacementUtils.HEIGHTMAP, BiomeFilter.biome())); register(context, BOPVegetationPlacements.PATCH_TUNDRA_SHRUBS, PATCH_TUNDRA_SHRUBS, VegetationPlacements.worldSurfaceSquaredWithCount(3)); + register(context, BOPVegetationPlacements.SPROUT_BONEMEAL, SPROUT_BONEMEAL, PlacementUtils.isEmpty()); register(context, BOPVegetationPlacements.RAINFOREST_CLIFFS_VINES, RAINFOREST_CLIFFS_VINES, VegetationPlacements.worldSurfaceSquaredWithCount(10)); register(context, BOPVegetationPlacements.SMALL_BROWN_MUSHROOM, SMALL_BROWN_MUSHROOM, List.of(RarityFilter.onAverageOnceEvery(2), InSquarePlacement.spread(), PlacementUtils.HEIGHTMAP, BiomeFilter.biome())); register(context, BOPVegetationPlacements.SMALL_TOADSTOOL, SMALL_TOADSTOOL, VegetationPlacements.worldSurfaceSquaredWithCount(2));