use of ivorius.reccomplex.world.gen.feature.structure.generic.generation.VanillaDecorationGeneration in project RecurrentComplex by Ivorforce.
the class RCBiomeDecorator method doDecorate.
protected static int doDecorate(WorldServer worldIn, Random random, BlockPos blockPos, DecorationType type, int amount, boolean lowChance) {
ChunkPos chunkPos = new ChunkPos(blockPos);
double baseWeight = RCConfig.baseDecorationWeights.get(type);
if (baseWeight <= 0)
return amount;
Biome biomeIn = worldIn.getBiome(chunkPos.getBlock(16, 0, 16));
StructureSelector<VanillaDecorationGeneration, DecorationType> selector = StructureRegistry.INSTANCE.decorationSelectors().get(biomeIn, worldIn.provider);
double totalWeight = selector.totalWeight(type);
if (totalWeight <= 0)
return amount;
return trySurface(worldIn, random, chunkPos, selector, type, totalWeight, baseWeight, amount, lowChance);
}
Aggregations