diff --git a/src/main/java/ru/bclib/world/features/BCLFeature.java b/src/main/java/ru/bclib/world/features/BCLFeature.java index 09be3972..ff5d09b9 100644 --- a/src/main/java/ru/bclib/world/features/BCLFeature.java +++ b/src/main/java/ru/bclib/world/features/BCLFeature.java @@ -83,15 +83,19 @@ public class BCLFeature { * @return new BCLFeature instance. */ public static BCLFeature makeVegetationFeature(ResourceLocation id, Feature feature, int density, boolean allHeight) { - @SuppressWarnings("deprecation") - PlacementModifier count = allHeight ? CountOnEveryLayerPlacement.of(8) : CountPlacement.of(UniformInt.of(0, density)); - return makeFeature(id, Decoration.VEGETAL_DECORATION, feature, - count, - InSquarePlacement.spread(), - PlacementUtils.HEIGHTMAP//, - // Will result with: Tried to biome check an unregistered feature - // BiomeFilter.biome() - ); + if (allHeight) { + @SuppressWarnings("deprecation") + PlacementModifier count =CountOnEveryLayerPlacement.of(density); + return makeFeature(id, Decoration.VEGETAL_DECORATION, feature, count, BiomeFilter.biome()); + } + else { + return makeFeature(id, Decoration.VEGETAL_DECORATION, feature, + CountPlacement.of(UniformInt.of(0, density)), + InSquarePlacement.spread(), + PlacementUtils.HEIGHTMAP, + BiomeFilter.biome() + ); + } } /**