@Override public float getSurfaceVolatility() { return this.biomeBase.getHeightVariation(); }
public boolean isCompatible(Biome biome) { return biome.getDefaultTemperature() >= minTemperature && biome.getDefaultTemperature() <= maxTemperature && biome.getRainfall() >= minRainfall && biome.getRainfall() <= maxRainfall && biome.decorator.treesPerChunk >= minTreesPerChunk && biome.decorator.treesPerChunk <= maxTreesPerChunk && biome.getHeightVariation() >= minHeightVariation && biome.getHeightVariation() <= maxHeightVariation; }
@Override protected List<String> getLines() { //noinspection ConstantConditions return ForgeRegistries.BIOMES.getValuesCollection().stream() .map(b -> String.join(",", b.getRegistryName().toString(), getBiomeName(b), b.getTempCategory().name() , Boolean.toString(b.isHighHumidity()), Float.toString(b.getHeightVariation()), b.topBlock.getBlock().getRegistryName().toString() , BiomeDictionary.getTypes(b).stream().map(BiomeDictionary.Type::getName).collect(Collectors.joining("|")), b.getBiomeClass().toString())) .sorted(Comparator.naturalOrder()).collect(Collectors.toList()); }
private static double calculateBiomeDistance(Biome a, Biome b) { if (a == b) { return -1000; } float dr = a.getRainfall() - b.getRainfall(); float dt = a.getDefaultTemperature() - b.getDefaultTemperature(); float dv = a.getHeightVariation() - b.getHeightVariation(); float dh = a.getBaseHeight() - b.getBaseHeight(); return Math.sqrt(dr * dr + dt * dt + dv * dv + dh * dh); }
public void generateOverworld(Random random, int chunkX, int chunkZ, World world, IChunkGenerator chunkGenerator, IChunkProvider chunkProvider) { boolean mapFeatures = world.getWorldInfo().isMapFeaturesEnabled(); if (mapFeatures) { Biome biome = world.getBiome(new BlockPos((chunkX << 4) + 8, 0, (chunkZ << 4) + 8)); if (!Configs.disable_hunter_camps && hunterCamp.canCampSpawnAt(world, biome, chunkX, chunkZ)) { BlockPos pos = new BlockPos(chunkX << 4, 1, chunkZ << 4); int tries = 5; int max = random.nextInt(3) + 1; tries += Math.min(Math.max(biome.decorator.treesPerChunk, 0), 5); tries += 10 * (biome.getHeightVariation()); if (Biomes.ROOFED_FOREST.equals(biome)) tries += 4; if (debug) VampirismMod.log.i("WorldGen", "Trying to generate camp at %s with %d tries", pos, tries); for (int j = 0; j < max; j++) { for (int i = 0; i < tries; i++) { if (hunterCamp.generate(world, random, pos)) { break; } } } } for (int j2 = 0; j2 < 10; ++j2) { BlockPos pos = new BlockPos((chunkX << 4), 0, (chunkZ << 4)); int i3 = random.nextInt(16) + 8; int l3 = random.nextInt(256); int l1 = random.nextInt(16) + 8; (vampireDungeon).generate(world, random, pos.add(i3, l3, l1)); } } }
obj.addProperty("Class", biome.getClass().getName()); obj.addProperty("Root Height", biome.getBaseHeight()); obj.addProperty("Height Variation", biome.getHeightVariation()); final boolean topNull = biome.topBlock == null || biome.topBlock.getBlock() == null || biome.topBlock.getBlock().delegate == null; final boolean bottomNull = biome.topBlock == null || biome.topBlock.getBlock() == null || biome.topBlock.getBlock().delegate == null;
public static boolean isSwamp(World world, BlockPos pos) { ChunkDataTFC data = ChunkDataTFC.get(world, pos); return data != null && data.isInitialized() && data.getRainfall() >= 375f && data.getFloraDiversity() >= 0.5f && data.getFloraDensity() >= 0.5f && world.getBiome(pos).getHeightVariation() < 0.15; }
if (worldIn.getBiomeForCoordsBody(position).getHeightVariation() < 0.3 && rand.nextInt(6) == 0) { int r = rand.nextInt(2); int r1 = rand.nextInt(2);
Biome biome = this.biomesForGeneration[j1 + 2 + (k1 + 2) * 10]; float baseHeight = biome.getBaseHeight(); float variation = biome.getHeightVariation();
blendedHeight *= 0.5F; variationBlended += blendBiome.getHeightVariation() * blendedHeight; rootBlended += blendBiome.getBaseHeight() * blendedHeight; totalBlendedHeight += blendedHeight;
float heightVariation = biomeScaleOffset + biome.getHeightVariation() * biomeScaleWeight;
float heightVariation = Math.abs(biomeScaleOffset + biome1.getHeightVariation() * biomeScaleWeight);