private void setVariantByCurrentBiome() { Biome biome = world.getBiome(getPosition()); if (biome instanceof BiomeTaiga) { variant = BaileyVariant.TAIGA; } else if (biome instanceof BiomeDesert) { variant = BaileyVariant.DESERT; } else if (biome instanceof BiomePlains) { variant = BaileyVariant.PLAINS; } else if (biome instanceof BiomeSavanna) { variant = BaileyVariant.SAVANNA; } else { variant = BaileyVariant.random(); } }
@Override public boolean isPermitted(Biome biome) { return biome instanceof BiomePlains || biome == Biomes.BEACH || biome instanceof BiomeSwamp || biome instanceof BiomeMushroomIsland || biome instanceof BiomeJungle; }
@Override public boolean isPermitted(Biome biome) { return biome instanceof BiomeForest || biome == Biomes.RIVER || biome instanceof BiomePlains || biome == Biomes.BEACH || biome instanceof BiomeJungle; }
@Override public boolean isPermitted(Biome biome) { return biome instanceof BiomeForest || biome == Biomes.RIVER || biome instanceof BiomeOcean || biome instanceof BiomePlains || biome instanceof BiomeJungle || biome instanceof BiomeSavanna; }
@Override public boolean isPermitted(Biome biome) { return (biome instanceof BiomeTaiga && biome != Biomes.COLD_TAIGA && biome != Biomes.COLD_TAIGA_HILLS && biome != Biomes.MUTATED_TAIGA_COLD) || biome instanceof BiomeForest || biome instanceof BiomePlains || biome == Biomes.BEACH; }
@Override public boolean isPermitted(Biome biome) { return biome instanceof BiomeTaiga || biome instanceof BiomeHills || biome == Biomes.STONE_BEACH || biome instanceof BiomeForest || biome == Biomes.RIVER || biome instanceof BiomePlains; }
@Override public boolean isPermitted(Biome biome) { return biome instanceof BiomeOcean || biome == Biomes.RIVER || biome instanceof BiomeBeach || biome instanceof BiomeForest || biome instanceof BiomePlains || biome instanceof BiomeJungle; }
@Override public boolean isPermitted(Biome biome) { return biome == Biomes.RIVER || biome instanceof BiomeOcean || biome instanceof BiomeForest || biome instanceof BiomePlains || biome instanceof BiomeJungle || biome instanceof BiomeSavanna; }
@Override public boolean isPermitted(Biome biome) { return biome instanceof BiomeBeach || biome instanceof BiomePlains || biome instanceof BiomeSwamp || biome instanceof BiomeMushroomIsland || biome instanceof BiomeJungle || biome instanceof BiomeSavanna; }
@Override public boolean isPermitted(Biome biome) { return biome instanceof BiomeForest || biome instanceof BiomeOcean || biome instanceof BiomePlains || biome == Biomes.RIVER || biome instanceof BiomeJungle || biome instanceof BiomeSavanna; }
@Override public boolean isPermitted(Biome biome) { return biome instanceof BiomeTaiga || biome instanceof BiomeHills || biome instanceof BiomeBeach || biome instanceof BiomeForest || biome instanceof BiomePlains || biome == Biomes.RIVER || biome instanceof BiomeJungle; }
@Override public boolean isPermitted(Biome biome) { return biome instanceof BiomePlains || biome == Biomes.BEACH || biome instanceof BiomeJungle || biome instanceof BiomeSavanna; }
@Override public boolean isPermitted(Biome biome) { return biome instanceof BiomeForest || biome instanceof BiomeOcean || biome == Biomes.RIVER || biome instanceof BiomePlains || biome == Biomes.BEACH || biome instanceof BiomeSwamp || biome instanceof BiomeMushroomIsland || biome instanceof BiomeJungle || biome instanceof BiomeSavanna; }
@Override public void generate(Random random, int chunkX, int chunkZ, World world, IChunkGenerator chunkGenerator, IChunkProvider chunkProvider) { if (world.provider.getDimension() == 0) { WorldGenAbstractTree apple = new WorldGenApple(false); WorldGenAbstractTree maple = new WorldGenMaple(false); WorldGenAbstractTree ebony = new WorldGenEbony(false); WorldGenAbstractTree fir = new WorldGenFir(false); WorldGenAbstractTree pine = new WorldGenPine(false); WorldGenAbstractTree willow = new WorldGenWillow(); WorldGenAbstractTree yew = new WorldGenYew(); // get the biome Biome biome = world.getBiome(new BlockPos(chunkX * 16, 64, chunkZ * 16)); if (biome instanceof BiomeDesert) { makeTree(ebony, chunkX, chunkZ, random, world, 0, 1); } if (biome instanceof BiomeForest || biome instanceof BiomeForestMutated) { if (random.nextInt(4) == 0) { makeTree(maple, chunkX, chunkZ, random, world, 0, 3); } if (random.nextInt(12) == 0) { makeTree(apple, chunkX, chunkZ, random, world, 1, 2); } makeTree(pine, chunkX, chunkZ, random, world, 0, 3); } if (biome instanceof BiomeHills) { makeTree(maple, chunkX, chunkZ, random, world, 0, 3); makeTree(fir, chunkX, chunkZ, random, world, 0, 3); } if (biome instanceof BiomeMesa && random.nextBoolean()) { makeTree(ebony, chunkX, chunkZ, random, world, 1, 3); } if (biome instanceof BiomePlains) { makeTree(apple, chunkX, chunkZ, random, world, 0, 1); } if (biome instanceof BiomeRiver && random.nextInt(3) == 0) { makeTree(yew, chunkX, chunkZ, random, world, 0, 3); } if (biome instanceof BiomeSavanna) { makeTree(ebony, chunkX, chunkZ, random, world, 0, 3); } if (biome instanceof BiomeSwamp) { if (random.nextInt(2) == 0) { makeTree(willow, chunkX, chunkZ, random, world, 0, 3); } if (random.nextInt(1) == 0) { makeTree(yew, chunkX, chunkZ, random, world, 0, 3); } } if (biome instanceof BiomeTaiga) { makeTree(pine, chunkX, chunkZ, random, world, 0, 3); makeTree(fir, chunkX, chunkZ, random, world, 1, 4); } if (biome instanceof BiomeJungle) { makeTree(rubber, chunkX, chunkZ, random, world, 0, 3); } } }
@Override public boolean isPermitted(Biome biome) { return biome instanceof BiomePlains || biome == Biomes.BEACH || biome instanceof BiomeJungle; }
@Override public boolean isPermitted(Biome biome) { return biome instanceof BiomeForest || biome == Biomes.RIVER || biome instanceof BiomePlains || biome == Biomes.BEACH; }
/** Assigns a temperature to the biome. * @return The base temperature for the biome */ private static float chooseTemp(Biome biome) { if (biome == Biomes.MUTATED_ICE_FLATS) { return -4; } else if (biome instanceof BiomeSnow) { return -3; } else if (biome == Biomes.FROZEN_RIVER) { return -2; } else if (biome == Biomes.COLD_TAIGA || biome == Biomes.COLD_TAIGA_HILLS || biome == Biomes.MUTATED_TAIGA_COLD) { return -1; } else if (biome == Biomes.COLD_BEACH) { return -0.5F; } else if (biome instanceof BiomeHills || biome instanceof BiomeTaiga || biome instanceof BiomeVoid || biome instanceof BiomeEnd) { return 0; } else if (biome == Biomes.STONE_BEACH) { return 0.5F; } else if (biome == Biomes.BIRCH_FOREST || biome == Biomes.BIRCH_FOREST_HILLS) { return 1; } else if (biome instanceof BiomeOcean || biome instanceof BiomeForest || biome instanceof BiomeRiver) { return 2; } else if (biome instanceof BiomePlains) { return 2.5F; } else if (biome instanceof BiomeSwamp || biome instanceof BiomeBeach) { return 3; } else if (biome instanceof BiomeMushroomIsland) { return 4; } else if (biome instanceof BiomeJungle) { return 4.5F; } else if (biome instanceof BiomeSavanna) { return 5; } else if (biome instanceof BiomeDesert || biome instanceof BiomeMesa || biome instanceof BiomeHell) { return 6; } else { float base = biome.getTemperature(); float converted = (base - 1) * 10; Geomastery.LOG.info("Unsupported biome {} has had its temperature set to {}", biome.getBiomeName(), converted); return converted; } }