From 9e3dbbec76bcecd43e6903de93423619745fedd0 Mon Sep 17 00:00:00 2001 From: Frank Date: Fri, 1 Jul 2022 12:49:22 +0200 Subject: [PATCH] Some Cleanup --- .../features/features/TemplateFeature.java | 40 ------------------- 1 file changed, 40 deletions(-) diff --git a/src/main/java/org/betterx/bclib/api/v3/levelgen/features/features/TemplateFeature.java b/src/main/java/org/betterx/bclib/api/v3/levelgen/features/features/TemplateFeature.java index 8fe8798b..d70948ec 100644 --- a/src/main/java/org/betterx/bclib/api/v3/levelgen/features/features/TemplateFeature.java +++ b/src/main/java/org/betterx/bclib/api/v3/levelgen/features/features/TemplateFeature.java @@ -14,51 +14,11 @@ import net.minecraft.world.level.levelgen.feature.Feature; import net.minecraft.world.level.levelgen.feature.FeaturePlaceContext; public class TemplateFeature extends Feature { - - public static BCLFeature createAndRegisterRare( - ResourceLocation location, - TemplateFeatureConfig configuration, - int onceEveryChunk - ) { - - - return BCLFeatureBuilder - .start(location, org.betterx.bclib.api.v3.levelgen.features.BCLFeature.TEMPLATE) - .decoration(GenerationStep.Decoration.SURFACE_STRUCTURES) - .onceEvery(onceEveryChunk) //discard neighboring chunks - .count(16) //try 16 placements in chunk - .squarePlacement() //randomize x/z in chunk - .randomHeight10FromFloorCeil() //randomize height 10 above and 10 below max vertical - .findSolidFloor(12) //cast downward ray to find solid surface - .isEmptyAbove4() //make sure we have 4 free blocks above - .onlyInBiome() //ensure that we still are in the correct biome - - .buildAndRegister(configuration); - } - - public static BCLFeature createAndRegister( - ResourceLocation location, - TemplateFeatureConfig configuration, - int count - ) { - return BCLFeatureBuilder - .start(location, org.betterx.bclib.api.v3.levelgen.features.BCLFeature.TEMPLATE) - .decoration(GenerationStep.Decoration.SURFACE_STRUCTURES) - .count(count) - .squarePlacement() - .randomHeight10FromFloorCeil() - .findSolidFloor(12) //cast downward ray to find solid surface - .isEmptyAbove4() - .onlyInBiome() - .buildAndRegister(configuration); - } - public TemplateFeature(Codec codec) { super(codec); } protected StructureWorldNBT randomStructure(TemplateFeatureConfig cfg, RandomSource random) { - if (cfg.structures.size() > 1) { final float chanceSum = cfg.structures.parallelStream().map(c -> c.chance).reduce(0.0f, (p, c) -> p + c); float rnd = random.nextFloat() * chanceSum;