From f9d4959bc80739ddb227f8b8b814c49696872ed7 Mon Sep 17 00:00:00 2001 From: Adubbz Date: Wed, 1 Jan 2020 17:15:49 +1100 Subject: [PATCH] Fix huge mushroom generation in BOP biomes. Note that this is still broken in Vanilla biomes due to a Forge bug. The Forge bug is present with or without BOP installed. --- .../common/biome/nether/FungiForestBiome.java | 5 +- .../biome/overworld/LushSwampBiome.java | 2 +- .../common/biome/overworld/MireBiome.java | 2 +- .../biome/overworld/MysticGroveBiome.java | 2 +- .../feature/BOPBigBrownMushroomFeature.java | 118 ++++++++++++++++++ .../gen/feature/BOPBigRedMushroomFeature.java | 118 ++++++++++++++++++ .../world/gen/feature/BOPBiomeFeatures.java | 4 +- .../data/forge/tags/blocks/dirt.json | 7 ++ 8 files changed, 250 insertions(+), 8 deletions(-) create mode 100644 src/main/java/biomesoplenty/common/world/gen/feature/BOPBigBrownMushroomFeature.java create mode 100644 src/main/java/biomesoplenty/common/world/gen/feature/BOPBigRedMushroomFeature.java create mode 100644 src/main/resources/data/forge/tags/blocks/dirt.json diff --git a/src/main/java/biomesoplenty/common/biome/nether/FungiForestBiome.java b/src/main/java/biomesoplenty/common/biome/nether/FungiForestBiome.java index 35b678e43..6db073057 100644 --- a/src/main/java/biomesoplenty/common/biome/nether/FungiForestBiome.java +++ b/src/main/java/biomesoplenty/common/biome/nether/FungiForestBiome.java @@ -8,7 +8,6 @@ import biomesoplenty.common.world.gen.feature.BOPBiomeFeatures; import net.minecraft.block.Blocks; import net.minecraft.entity.EntityClassification; import net.minecraft.entity.EntityType; -import net.minecraft.fluid.Fluids; import net.minecraft.world.biome.DefaultBiomeFeatures; import net.minecraft.world.gen.GenerationStage; import net.minecraft.world.gen.carver.WorldCarver; @@ -39,8 +38,8 @@ public class FungiForestBiome extends NetherBiomeBOP this.addFeature(GenerationStage.Decoration.UNDERGROUND_DECORATION, Feature.GLOWSTONE_BLOB.configured(IFeatureConfig.NONE).decorated(Placement.COUNT_RANGE.configured(new CountRangeConfig(10, 0, 0, 128)))); //Vegetation - this.addFeature(GenerationStage.Decoration.UNDERGROUND_DECORATION, Feature.HUGE_RED_MUSHROOM.configured(DefaultBiomeFeatures.HUGE_RED_MUSHROOM_CONFIG).decorated(Placement.COUNT_HEIGHTMAP_DOUBLE.configured(new FrequencyConfig(250)))); - this.addFeature(GenerationStage.Decoration.UNDERGROUND_DECORATION, Feature.HUGE_BROWN_MUSHROOM.configured(DefaultBiomeFeatures.HUGE_BROWN_MUSHROOM_CONFIG).decorated(Placement.COUNT_HEIGHTMAP_DOUBLE.configured(new FrequencyConfig(75)))); + this.addFeature(GenerationStage.Decoration.UNDERGROUND_DECORATION, BOPBiomeFeatures.BIG_RED_MUSHROOM.configured(DefaultBiomeFeatures.HUGE_RED_MUSHROOM_CONFIG).decorated(Placement.COUNT_HEIGHTMAP_DOUBLE.configured(new FrequencyConfig(250)))); + this.addFeature(GenerationStage.Decoration.UNDERGROUND_DECORATION, BOPBiomeFeatures.BIG_BROWN_MUSHROOM.configured(DefaultBiomeFeatures.HUGE_BROWN_MUSHROOM_CONFIG).decorated(Placement.COUNT_HEIGHTMAP_DOUBLE.configured(new FrequencyConfig(75)))); this.addFeature(GenerationStage.Decoration.UNDERGROUND_DECORATION, Feature.RANDOM_PATCH.configured(BiomeFeatureHelper.createClusterConfiguration(BOPBlocks.toadstool.defaultBlockState())).decorated(Placement.COUNT_HEIGHTMAP_DOUBLE.configured(new FrequencyConfig(7)))); this.addFeature(GenerationStage.Decoration.UNDERGROUND_DECORATION, BOPBiomeFeatures.NETHERWART_BUBBLE.configured(DefaultBiomeFeatures.NORMAL_TREE_CONFIG).decorated(Placement.COUNT_HEIGHTMAP_DOUBLE.configured(new FrequencyConfig(3)))); this.addFeature(GenerationStage.Decoration.UNDERGROUND_DECORATION, BOPBiomeFeatures.SCATTERED_NETHER_WART.configured(IFeatureConfig.NONE).decorated(Placement.COUNT_HEIGHTMAP_DOUBLE.configured(new FrequencyConfig(4)))); diff --git a/src/main/java/biomesoplenty/common/biome/overworld/LushSwampBiome.java b/src/main/java/biomesoplenty/common/biome/overworld/LushSwampBiome.java index be3b5d946..0735fe3d0 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/LushSwampBiome.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/LushSwampBiome.java @@ -50,7 +50,7 @@ public class LushSwampBiome extends BiomeBOP // Vegetation this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, BOPBiomeFeatures.TALL_SWAMP_TREE.configured(DefaultBiomeFeatures.NORMAL_TREE_CONFIG).decorated(Placement.COUNT_EXTRA_HEIGHTMAP.configured(new AtSurfaceWithExtraConfig(3, 0.1F, 1)))); - this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, Feature.HUGE_RED_MUSHROOM.configured(DefaultBiomeFeatures.HUGE_RED_MUSHROOM_CONFIG).decorated(Placement.COUNT_EXTRA_HEIGHTMAP.configured(new AtSurfaceWithExtraConfig((int)0.5F, 0.1F, 1)))); + this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, BOPBiomeFeatures.BIG_RED_MUSHROOM.configured(DefaultBiomeFeatures.HUGE_RED_MUSHROOM_CONFIG).decorated(Placement.COUNT_EXTRA_HEIGHTMAP.configured(new AtSurfaceWithExtraConfig((int)0.5F, 0.1F, 1)))); this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, BOPBiomeFeatures.LUSH_SWAMP_FLOWERS.configured(IFeatureConfig.NONE).decorated(Placement.COUNT_HEIGHTMAP_32.configured(new FrequencyConfig(5)))); this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, new StandardGrassFeature(NoFeatureConfig::deserialize).configured(IFeatureConfig.NONE).decorated(Placement.COUNT_HEIGHTMAP_DOUBLE.configured(new FrequencyConfig(8)))); this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, Feature.RANDOM_PATCH.configured(BiomeFeatureHelper.createClusterConfigurationDouble(BOPBlocks.tall_cattail.defaultBlockState())).decorated(Placement.COUNT_HEIGHTMAP_32.configured(new FrequencyConfig(4)))); diff --git a/src/main/java/biomesoplenty/common/biome/overworld/MireBiome.java b/src/main/java/biomesoplenty/common/biome/overworld/MireBiome.java index 5a8909541..61edbfb7c 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/MireBiome.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/MireBiome.java @@ -60,7 +60,7 @@ public class MireBiome extends BiomeBOP // Vegetation this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, Feature.RANDOM_SELECTOR.configured(new MultipleRandomFeatureConfig(ImmutableList.of(BOPBiomeFeatures.DARK_OAK_TWIGLET_TREE.configured(DefaultBiomeFeatures.NORMAL_TREE_CONFIG).weighted(0.8F), BOPBiomeFeatures.TALL_TWIGLET_TREE.configured(DefaultBiomeFeatures.NORMAL_TREE_CONFIG).weighted(0.4F), BOPBiomeFeatures.DEAD_TREE.configured(DefaultBiomeFeatures.NORMAL_TREE_CONFIG).weighted(0.1F)), BOPBiomeFeatures.DYING_TREE.configured(DefaultBiomeFeatures.NORMAL_TREE_CONFIG))).decorated(Placement.COUNT_EXTRA_HEIGHTMAP.configured(new AtSurfaceWithExtraConfig(2, 0.2F, 1)))); - this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, Feature.HUGE_BROWN_MUSHROOM.configured(DefaultBiomeFeatures.HUGE_BROWN_MUSHROOM_CONFIG).decorated(Placement.COUNT_HEIGHTMAP_DOUBLE.configured(new FrequencyConfig(17)))); + this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, BOPBiomeFeatures.BIG_BROWN_MUSHROOM.configured(DefaultBiomeFeatures.HUGE_BROWN_MUSHROOM_CONFIG).decorated(Placement.COUNT_HEIGHTMAP_DOUBLE.configured(new FrequencyConfig(17)))); this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, new StandardGrassFeature(NoFeatureConfig::deserialize).configured(IFeatureConfig.NONE).decorated(Placement.COUNT_HEIGHTMAP_DOUBLE.configured(new FrequencyConfig(4)))); this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, Feature.RANDOM_PATCH.configured(BiomeFeatureHelper.createClusterConfiguration(Blocks.BROWN_MUSHROOM.defaultBlockState())).decorated(Placement.CHANCE_HEIGHTMAP_DOUBLE.configured(new ChanceConfig(15)))); this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, Feature.RANDOM_PATCH.configured(BiomeFeatureHelper.createClusterConfiguration(Blocks.RED_MUSHROOM.defaultBlockState())).decorated(Placement.CHANCE_HEIGHTMAP_DOUBLE.configured(new ChanceConfig(8)))); diff --git a/src/main/java/biomesoplenty/common/biome/overworld/MysticGroveBiome.java b/src/main/java/biomesoplenty/common/biome/overworld/MysticGroveBiome.java index cc6ef30b7..db58707c7 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/MysticGroveBiome.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/MysticGroveBiome.java @@ -60,7 +60,7 @@ public class MysticGroveBiome extends BiomeBOP this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, Feature.RANDOM_SELECTOR.configured(new MultipleRandomFeatureConfig(ImmutableList.of(BOPBiomeFeatures.GIANT_TREE.configured(DefaultBiomeFeatures.NORMAL_TREE_CONFIG).weighted(0.025F), BOPBiomeFeatures.TALL_SWAMP_TREE.configured(DefaultBiomeFeatures.NORMAL_TREE_CONFIG).weighted(0.1F), BOPBiomeFeatures.BIG_FLOWERING_OAK_TREE.configured(DefaultBiomeFeatures.NORMAL_TREE_CONFIG).weighted(0.2F), BOPBiomeFeatures.JACARANDA_TREE.configured(DefaultBiomeFeatures.NORMAL_TREE_CONFIG).weighted(0.3F), BOPBiomeFeatures.BIG_MAGIC_TREE.configured(DefaultBiomeFeatures.NORMAL_TREE_CONFIG).weighted(0.3F)), BOPBiomeFeatures.MAGIC_TREE.configured(DefaultBiomeFeatures.NORMAL_TREE_CONFIG))).decorated(Placement.COUNT_EXTRA_HEIGHTMAP.configured(new AtSurfaceWithExtraConfig(10, 0.5F, 1)))); this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, BOPBiomeFeatures.MYSTIC_GROVE_FLOWERS.configured(IFeatureConfig.NONE).decorated(Placement.COUNT_HEIGHTMAP_32.configured(new FrequencyConfig(18)))); - this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, Feature.HUGE_RED_MUSHROOM.configured(DefaultBiomeFeatures.HUGE_RED_MUSHROOM_CONFIG).decorated(Placement.COUNT_EXTRA_HEIGHTMAP.configured(new AtSurfaceWithExtraConfig(1, 0.1F, 1)))); + this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, BOPBiomeFeatures.BIG_RED_MUSHROOM.configured(DefaultBiomeFeatures.HUGE_RED_MUSHROOM_CONFIG).decorated(Placement.COUNT_EXTRA_HEIGHTMAP.configured(new AtSurfaceWithExtraConfig(1, 0.1F, 1)))); this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, Feature.RANDOM_PATCH.configured(BiomeFeatureHelper.createClusterConfigurationDouble(BOPBlocks.blue_hydrangea.defaultBlockState())).decorated(Placement.COUNT_HEIGHTMAP_32.configured(new FrequencyConfig(4)))); this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, Feature.RANDOM_PATCH.configured(BiomeFeatureHelper.createClusterConfigurationDouble(Blocks.LILAC.defaultBlockState())).decorated(Placement.COUNT_HEIGHTMAP_32.configured(new FrequencyConfig(1)))); this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, new StandardGrassFeature(NoFeatureConfig::deserialize).configured(IFeatureConfig.NONE).decorated(Placement.COUNT_HEIGHTMAP_DOUBLE.configured(new FrequencyConfig(15)))); diff --git a/src/main/java/biomesoplenty/common/world/gen/feature/BOPBigBrownMushroomFeature.java b/src/main/java/biomesoplenty/common/world/gen/feature/BOPBigBrownMushroomFeature.java new file mode 100644 index 000000000..5920edcb3 --- /dev/null +++ b/src/main/java/biomesoplenty/common/world/gen/feature/BOPBigBrownMushroomFeature.java @@ -0,0 +1,118 @@ +/******************************************************************************* + * Copyright 2014-2019, the Biomes O' Plenty Team + * + * This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International Public License. + * + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + ******************************************************************************/ +package biomesoplenty.common.world.gen.feature; + +import biomesoplenty.core.BiomesOPlenty; +import com.mojang.datafixers.Dynamic; +import net.minecraft.block.Block; +import net.minecraft.block.BlockState; +import net.minecraft.block.Blocks; +import net.minecraft.block.HugeMushroomBlock; +import net.minecraft.tags.BlockTags; +import net.minecraft.util.Direction; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.IWorld; +import net.minecraft.world.gen.feature.BigBrownMushroomFeature; +import net.minecraft.world.gen.feature.BigMushroomFeatureConfig; + +import java.util.Random; +import java.util.function.Function; + +public class BOPBigBrownMushroomFeature extends BigBrownMushroomFeature +{ + public BOPBigBrownMushroomFeature(Function, ? extends BigMushroomFeatureConfig> deserializer) + { + super(deserializer); + } + + @Override + protected void placeTrunk(IWorld world, Random random, BlockPos pos, BigMushroomFeatureConfig config, int height, BlockPos.Mutable mutablePos) + { + for (int i = 0; i < height; ++i) + { + mutablePos.set(pos).move(Direction.UP, i); + // Fix Forge's inversion bug + if (world.getBlockState(mutablePos).canBeReplacedByLeaves(world, mutablePos)) + { + this.setBlock(world, mutablePos, config.stemProvider.getState(random, pos)); + } + } + } + + @Override + protected void makeCap(IWorld world, Random random, BlockPos pos, int height, BlockPos.Mutable mutablePos, BigMushroomFeatureConfig config) + { + int radius = config.foliageRadius; + + for (int x = -radius; x <= radius; ++x) + { + for (int z = -radius; z <= radius; ++z) + { + boolean westEdge = x == -radius; + boolean eastEdge = x == radius; + boolean northEdge = z == -radius; + boolean southEdge = z == radius; + boolean eastOrWestEdge = westEdge || eastEdge; + boolean northOrSouthEdge = northEdge || southEdge; + if (!eastOrWestEdge || !northOrSouthEdge) + { + mutablePos.set(pos).move(x, height, z); + // Fix Forge's inversion bug + if (world.getBlockState(mutablePos).canBeReplacedByLeaves(world, mutablePos)) + { + boolean westFace = westEdge || northOrSouthEdge && x == 1 - radius; + boolean eastFace = eastEdge || northOrSouthEdge && x == radius - 1; + boolean northFace = northEdge || eastOrWestEdge && z == 1 - radius; + boolean southFace = southEdge || eastOrWestEdge && z == radius - 1; + this.setBlock(world, mutablePos, config.capProvider.getState(random, pos).setValue(HugeMushroomBlock.WEST, Boolean.valueOf(westFace)).setValue(HugeMushroomBlock.EAST, Boolean.valueOf(eastFace)).setValue(HugeMushroomBlock.NORTH, Boolean.valueOf(northFace)).setValue(HugeMushroomBlock.SOUTH, Boolean.valueOf(southFace))); + } + } + } + } + } + + @Override + protected boolean isValidPosition(IWorld world, BlockPos pos, int height, BlockPos.Mutable mutablePos, BigMushroomFeatureConfig config) + { + int i = pos.getY(); + if (i >= 1 && i + height + 1 < world.getMaxHeight()) + { + Block groundBlock = world.getBlockState(pos.below()).getBlock(); + // Allow growth in the nether + if (!isDirt(groundBlock) && groundBlock != Blocks.NETHERRACK && groundBlock != Blocks.SOUL_SAND) + { + return false; + } + else + { + for (int y = 0; y <= height; ++y) + { + int radius = this.getTreeRadiusForHeight(-1, -1, config.foliageRadius, y); + + for (int x = -radius; x <= radius; ++x) + { + for (int z = -radius; z <= radius; ++z) + { + BlockState obstructingState = world.getBlockState(mutablePos.set(pos).move(x, y, z)); + if (!obstructingState.isAir(world, mutablePos) && !obstructingState.is(BlockTags.LEAVES)) + { + return false; + } + } + } + } + + return true; + } + } + else + { + return false; + } + } +} diff --git a/src/main/java/biomesoplenty/common/world/gen/feature/BOPBigRedMushroomFeature.java b/src/main/java/biomesoplenty/common/world/gen/feature/BOPBigRedMushroomFeature.java new file mode 100644 index 000000000..1c58b747e --- /dev/null +++ b/src/main/java/biomesoplenty/common/world/gen/feature/BOPBigRedMushroomFeature.java @@ -0,0 +1,118 @@ +/******************************************************************************* + * Copyright 2014-2019, the Biomes O' Plenty Team + * + * This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International Public License. + * + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + ******************************************************************************/ +package biomesoplenty.common.world.gen.feature; + +import biomesoplenty.core.BiomesOPlenty; +import com.mojang.datafixers.Dynamic; +import net.minecraft.block.Block; +import net.minecraft.block.BlockState; +import net.minecraft.block.Blocks; +import net.minecraft.block.HugeMushroomBlock; +import net.minecraft.tags.BlockTags; +import net.minecraft.util.Direction; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.IWorld; +import net.minecraft.world.gen.feature.BigMushroomFeatureConfig; +import net.minecraft.world.gen.feature.BigRedMushroomFeature; + +import java.util.Random; +import java.util.function.Function; + +public class BOPBigRedMushroomFeature extends BigRedMushroomFeature +{ + public BOPBigRedMushroomFeature(Function, ? extends BigMushroomFeatureConfig> deserializer) + { + super(deserializer); + } + + @Override + protected void placeTrunk(IWorld world, Random random, BlockPos pos, BigMushroomFeatureConfig config, int height, BlockPos.Mutable mutablePos) + { + for (int i = 0; i < height; ++i) + { + mutablePos.set(pos).move(Direction.UP, i); + // Fix Forge's inversion bug + if (world.getBlockState(mutablePos).canBeReplacedByLeaves(world, mutablePos)) + { + this.setBlock(world, mutablePos, config.stemProvider.getState(random, pos)); + } + } + } + + @Override + protected void makeCap(IWorld world, Random random, BlockPos pos, int height, BlockPos.Mutable mutablePos, BigMushroomFeatureConfig config) + { + for (int y = height - 3; y <= height; ++y) + { + int radius = y < height ? config.foliageRadius : config.foliageRadius - 1; + int innerRadius = config.foliageRadius - 2; + + for (int x = -radius; x <= radius; ++x) + { + for (int z = -radius; z <= radius; ++z) + { + boolean westEdge = x == -radius; + boolean eastEdge = x == radius; + boolean northEdge = z == -radius; + boolean southEdge = z == radius; + boolean eastOrWestEdge = westEdge || eastEdge; + boolean northOrSouthEdge = northEdge || southEdge; + if (y >= height || eastOrWestEdge != northOrSouthEdge) + { + mutablePos.set(pos).move(x, y, z); + // Fix Forge's inversion bug + if (world.getBlockState(mutablePos).canBeReplacedByLeaves(world, mutablePos)) + { + this.setBlock(world, mutablePos, config.capProvider.getState(random, pos).setValue(HugeMushroomBlock.UP, Boolean.valueOf(y >= height - 1)).setValue(HugeMushroomBlock.WEST, Boolean.valueOf(x < -innerRadius)).setValue(HugeMushroomBlock.EAST, Boolean.valueOf(x > innerRadius)).setValue(HugeMushroomBlock.NORTH, Boolean.valueOf(z < -innerRadius)).setValue(HugeMushroomBlock.SOUTH, Boolean.valueOf(z > innerRadius))); + } + } + } + } + } + } + + @Override + protected boolean isValidPosition(IWorld world, BlockPos pos, int height, BlockPos.Mutable mutablePos, BigMushroomFeatureConfig config) + { + int i = pos.getY(); + if (i >= 1 && i + height + 1 < world.getMaxHeight()) + { + Block groundBlock = world.getBlockState(pos.below()).getBlock(); + // Allow growth in the Nether + if (!isDirt(groundBlock) && groundBlock != Blocks.NETHERRACK && groundBlock != Blocks.SOUL_SAND) + { + return false; + } + else + { + for (int y = 0; y <= height; ++y) + { + int radius = this.getTreeRadiusForHeight(-1, -1, config.foliageRadius, y); + + for (int x = -radius; x <= radius; ++x) + { + for (int z = -radius; z <= radius; ++z) + { + BlockState obstructingState = world.getBlockState(mutablePos.set(pos).move(x, y, z)); + if (!obstructingState.isAir(world, mutablePos) && !obstructingState.is(BlockTags.LEAVES)) + { + return false; + } + } + } + } + + return true; + } + } + else + { + return false; + } + } +} diff --git a/src/main/java/biomesoplenty/common/world/gen/feature/BOPBiomeFeatures.java b/src/main/java/biomesoplenty/common/world/gen/feature/BOPBiomeFeatures.java index 3769fb358..137a571b6 100644 --- a/src/main/java/biomesoplenty/common/world/gen/feature/BOPBiomeFeatures.java +++ b/src/main/java/biomesoplenty/common/world/gen/feature/BOPBiomeFeatures.java @@ -14,8 +14,6 @@ import net.minecraft.block.Blocks; import net.minecraft.block.LeavesBlock; import net.minecraft.block.SaplingBlock; import net.minecraft.util.Direction; -import net.minecraft.world.gen.blockplacer.DoublePlantBlockPlacer; -import net.minecraft.world.gen.blockstateprovider.SimpleBlockStateProvider; import net.minecraft.world.gen.feature.*; import net.minecraft.world.gen.surfacebuilders.SurfaceBuilder; import net.minecraft.world.gen.surfacebuilders.SurfaceBuilderConfig; @@ -125,6 +123,8 @@ public class BOPBiomeFeatures public static final Feature NETHER_VINES = new NetherVinesFeature(NoFeatureConfig::deserialize); public static final Feature FLESH_SPLATTER = new FleshSplatterFeature(NoFeatureConfig::deserialize); public static final Feature BONE_SPINE = new BoneSpineFeature(NoFeatureConfig::deserialize); + public static final Feature BIG_BROWN_MUSHROOM = new BOPBigBrownMushroomFeature(BigMushroomFeatureConfig::deserialize); + public static final Feature BIG_RED_MUSHROOM = new BOPBigRedMushroomFeature(BigMushroomFeatureConfig::deserialize); public static final Feature NETHERWART_BUBBLE = new BushTreeFeature.Builder().placeOn((world, pos) -> world.getBlockState(pos).getBlock() == Blocks.NETHERRACK).log(Blocks.NETHER_WART_BLOCK.defaultBlockState()).leaves(Blocks.NETHER_WART_BLOCK.defaultBlockState()).maxHeight(2).create(); public static final Feature ASH_SPLATTER = new AshSplatterFeature(NoFeatureConfig::deserialize); public static final Feature SCATTERED_NETHER_WART = new NetherWartFeature(NoFeatureConfig::deserialize); diff --git a/src/main/resources/data/forge/tags/blocks/dirt.json b/src/main/resources/data/forge/tags/blocks/dirt.json new file mode 100644 index 000000000..8b7639336 --- /dev/null +++ b/src/main/resources/data/forge/tags/blocks/dirt.json @@ -0,0 +1,7 @@ +{ + "replace": false, + "values": [ + "minecraft:grass_block", + "minecraft:mycelium" + ] +} \ No newline at end of file