diff --git a/server/src/main/java/server/init/UniverseRegistry.java b/server/src/main/java/server/init/UniverseRegistry.java index 6d06e238..a4ae417b 100755 --- a/server/src/main/java/server/init/UniverseRegistry.java +++ b/server/src/main/java/server/init/UniverseRegistry.java @@ -71,7 +71,7 @@ import server.worldgen.caves.MapGenBigCaves; import server.worldgen.caves.MapGenCaves; import server.worldgen.caves.MapGenRavine; import server.worldgen.populator.PopulatorAsteroids; -import server.worldgen.populator.PopulatorBiome; +import server.worldgen.populator.PopulatorTerranian; import server.worldgen.populator.PopulatorBlackened; import server.worldgen.populator.PopulatorChaos; import server.worldgen.populator.PopulatorForest; @@ -512,7 +512,7 @@ public abstract class UniverseRegistry extends DimensionRegistry { registerPlanet("Terra", new Planet(6378136, 8766144L, 24000L, 28.0f, 9.81f, 259.15f, Blocks.stone.getState(), Blocks.water.getState(), 63), new GeneratorData() .setGenerator(new GeneratorPerlin(true)) .setReplacer(new ReplacerTerranian(Blocks.grass.getState(), Blocks.dirt.getState(), Blocks.gravel.getState(), Blocks.sand.getState())) - .setPopulator(new PopulatorBiome()) + .setPopulator(new PopulatorTerranian()) .setBiomeGen(new BiomeGenerator(new Biome(8.0f, 80.0f), false, 4, 4, 6, 50, new Biome[] {new Biome(60.0f, 0.0f, Scaling.PLAINS_LOW), new Biome(60.0f, 0.0f, Scaling.PLAINS_LOW), new Biome(60.0f, 0.0f, Scaling.HILLS_LOW), new Biome(28.0f, 0.0f, Scaling.PLAINS_LOW), new Biome(20.0f, 0.0f, Scaling.HILLS_PLATEAU), new Biome(12.0f, 40.0f, Scaling.PLAINS_LOW)}, new Biome[] {new Biome(8.0f, 80.0f), new Biome(8.0f, 80.0f, 0.1F, 0.4F), new Biome(8.0f, 80.0f), new Biome(-12.0f, 30.0f, Scaling.HILLS_LARGE), new Biome(12.0f, 40.0f, Scaling.PLAINS_LOW), new Biome(4.0f, 60.0f), new Biome(12.0f, 90.0f, Scaling.SEA_POND), new Biome(18.0f, 90.0f)}, @@ -637,7 +637,7 @@ public abstract class UniverseRegistry extends DimensionRegistry { new GeneratorData().setGenerator(new GeneratorPerlin(true)) .setReplacer(new ReplacerAltSimple(Blocks.grass.getState(), Blocks.dirt.getState(), Blocks.gravel.getState())) .setBiomeGen(new BiomeGenerator(new Biome(8.0f, 80.0f), true, 5, 3, 3, 30)) - .setPopulator(new PopulatorForest(0)).addCaveGen(new MapGenCaves(Blocks.lava.getState()), new MapGenRavine(Blocks.lava.getState())) + .setPopulator(new PopulatorForest(3)).addCaveGen(new MapGenCaves(Blocks.lava.getState()), new MapGenRavine(Blocks.lava.getState())) .addFeature(new FeatureDungeons(10)).enableSnow() .addLake(Blocks.water.getState(), null, Blocks.grass.getState(), 4, 0, 255, false) .addLake(Blocks.lava.getState(), null, null, 8, 8, 255, true) diff --git a/server/src/main/java/server/worldgen/populator/PopulatorBasic.java b/server/src/main/java/server/worldgen/populator/PopulatorBasic.java index 8486a8e4..edd5d240 100755 --- a/server/src/main/java/server/worldgen/populator/PopulatorBasic.java +++ b/server/src/main/java/server/worldgen/populator/PopulatorBasic.java @@ -26,7 +26,6 @@ import server.worldgen.tree.WorldGenTree; public abstract class PopulatorBasic implements Populator { protected static final PerlinGen TREE_NOISE = new PerlinGen(new Random(726528729282625L), 8); - protected static final PerlinGen GRASS_NOISE = new PerlinGen(new Random(297363826225L), 1); protected static final FeatureDoublePlant DOUBLE_PLANT_GEN = new FeatureDoublePlant(); protected final WorldGenBaseTree worldGeneratorTrees = new WorldGenBaseTree(false); diff --git a/server/src/main/java/server/worldgen/populator/PopulatorBeach.java b/server/src/main/java/server/worldgen/populator/PopulatorBeach.java deleted file mode 100755 index 1f20ab94..00000000 --- a/server/src/main/java/server/worldgen/populator/PopulatorBeach.java +++ /dev/null @@ -1,12 +0,0 @@ -package server.worldgen.populator; - -public class PopulatorBeach extends PopulatorBasic -{ - public PopulatorBeach() - { - this.treesPerChunk = -999; - this.deadBushPerChunk = 0; - this.reedsPerChunk = 0; - this.cactiPerChunk = 0; - } -} diff --git a/server/src/main/java/server/worldgen/populator/PopulatorDefault.java b/server/src/main/java/server/worldgen/populator/PopulatorDefault.java deleted file mode 100755 index 7a0a30e7..00000000 --- a/server/src/main/java/server/worldgen/populator/PopulatorDefault.java +++ /dev/null @@ -1,4 +0,0 @@ -package server.worldgen.populator; - -public class PopulatorDefault extends PopulatorBasic { -} diff --git a/server/src/main/java/server/worldgen/populator/PopulatorForest.java b/server/src/main/java/server/worldgen/populator/PopulatorForest.java index d3e915ec..07e66986 100755 --- a/server/src/main/java/server/worldgen/populator/PopulatorForest.java +++ b/server/src/main/java/server/worldgen/populator/PopulatorForest.java @@ -7,6 +7,7 @@ import common.init.WoodType; import common.rng.Random; import common.util.BlockPos; import common.util.ExtMath; +import server.rng.PerlinGen; import server.world.WorldServer; import server.worldgen.foliage.WorldGenBigMushroom; import server.worldgen.tree.WorldGenBaseTree; @@ -17,7 +18,16 @@ import server.worldgen.tree.WorldGenTree; public class PopulatorForest extends PopulatorBasic { - private static final BlockDoublePlant[] FLOWER_TYPES = new BlockDoublePlant[] { + private static final BlockFlower.EnumFlowerType[] TULIP_TYPES = new BlockFlower.EnumFlowerType[] { + BlockFlower.EnumFlowerType.ORANGE_TULIP, BlockFlower.EnumFlowerType.RED_TULIP, + BlockFlower.EnumFlowerType.PINK_TULIP, BlockFlower.EnumFlowerType.WHITE_TULIP + }; + + private static final BlockFlower.EnumFlowerType[] FLOWER_TYPES = new BlockFlower.EnumFlowerType[] { + BlockFlower.EnumFlowerType.POPPY, BlockFlower.EnumFlowerType.HOUSTONIA, BlockFlower.EnumFlowerType.DAISY + }; + protected static final PerlinGen GRASS_NOISE = new PerlinGen(new Random(297363826225L), 1); + private static final BlockDoublePlant[] DFLOWER_TYPES = new BlockDoublePlant[] { Blocks.syringa, Blocks.rose_bush, Blocks.paeonia }; protected static final WorldGenBirch tallBirch = new WorldGenBirch(false, true); @@ -25,11 +35,6 @@ public class PopulatorForest extends PopulatorBasic protected static final WorldGenDarkOak darkOak = new WorldGenDarkOak(false); private final int subType; -// protected LeavesType leavesType = null; -// protected WorldGenBaseTree cherry; -// protected WorldGenBaseTree maple; -// protected WorldGenBigTree cherryBig; -// protected WorldGenBigTree mapleBig; protected WorldGenBaseTree cherry = new WorldGenBaseTree(false, Blocks.cherry_log.getState(), // .withProperty(BlockNewLog.VARIANT, BlockPlanks.EnumType.CHERRY), WoodType.CHERRY); // .withProperty(BlockLeaves.TYPE, worldIn.getLeavesGen())); protected WorldGenBaseTree maple = new WorldGenBaseTree(false, Blocks.maple_log.getState(), // .withProperty(BlockNewLog.VARIANT, BlockPlanks.EnumType.MAPLE), @@ -45,13 +50,6 @@ public class PopulatorForest extends PopulatorBasic this.treesPerChunk = 10; this.grassPerChunk = 2; - if (this.subType == 1) - { - this.treesPerChunk = 6; - this.flowersPerChunk = 100; - this.grassPerChunk = 1; - } - if (this.subType == 4) { this.treesPerChunk = 20; @@ -69,23 +67,52 @@ public class PopulatorForest extends PopulatorBasic protected WorldGenTree genBigTreeChance(Random rand) { - if(this.subType == 5) + if(this.subType == 1) return rand.chance() ? PopulatorForest.tallBirch : PopulatorForest.normalBirch; return (WorldGenTree) (this.subType == 3 && rand.rarity(3) ? darkOak : - (this.subType != 2 && rand.rarity(5) ? (this.subType != 3 && this.subType != 4 && rand.chance(this.subType == 1 ? 2 : 30) ? (rand.chance(25) ? this.cherryBig : this.cherry) : + (rand.rarity(5) ? (this.subType != 3 && this.subType != 4 && rand.chance(30) ? (rand.chance(25) ? this.cherryBig : this.cherry) : this.subType == 4 && rand.chance(42) ? this.worldGeneratorBigTree : this.worldGeneratorTrees) : - (this.subType == 4 || rand.chance(this.subType == 2 ? 30 : 2) ? (rand.chance(this.subType == 4 ? 32 : 5) ? this.mapleBig : this.maple) : normalBirch))); + (this.subType == 4 || rand.chance(2) ? (rand.chance(this.subType == 4 ? 32 : 5) ? this.mapleBig : this.maple) : normalBirch))); } protected BlockFlower.EnumFlowerType pickRandomFlower(Random rand, BlockPos pos) { - if (this.subType == 1) - { - double d0 = ExtMath.clampd((1.0D + GRASS_NOISE.generate((double)pos.getX() / 48.0D, (double)pos.getZ() / 48.0D)) / 2.0D, 0.0D, 0.9999D); - BlockFlower.EnumFlowerType blockflower$enumflowertype = BlockFlower.EnumFlowerType.values()[(int)(d0 * (double)BlockFlower.EnumFlowerType.values().length)]; - return blockflower$enumflowertype == BlockFlower.EnumFlowerType.BLUE_ORCHID ? BlockFlower.EnumFlowerType.ROSE : blockflower$enumflowertype; - } + if(this.subType == 0) { + double d0 = GRASS_NOISE.generate((double)pos.getX() / 200.0D, (double)pos.getZ() / 200.0D); + + if (d0 < -0.8D) + { + return rand.pick(TULIP_TYPES); +// int j = rand.nextInt(4); + // +// switch (j) +// { +// case 0: +// return BlockFlower.EnumFlowerType.ORANGE_TULIP; + // +// case 1: +// return BlockFlower.EnumFlowerType.RED_TULIP; + // +// case 2: +// return BlockFlower.EnumFlowerType.PINK_TULIP; + // +// case 3: +// default: +// return BlockFlower.EnumFlowerType.WHITE_TULIP; +// } + } + else if (d0 < -0.5 && rand.rarity(3)) + { + return rand.pick(FLOWER_TYPES); +// int i = rand.nextInt(3); +// return i == 0 ? BlockFlower.EnumFlowerType.POPPY : (i == 1 ? BlockFlower.EnumFlowerType.HOUSTONIA : BlockFlower.EnumFlowerType.OXEYE_DAISY); + } + else + { + return super.pickRandomFlower(rand, pos); + } + } else if (this.subType == 4) { double d0 = ExtMath.clampd((1.0D + GRASS_NOISE.generate((double)pos.getX() / 48.0D, (double)pos.getZ() / 48.0D)) / 2.0D, 0.0D, 0.9999D); @@ -99,6 +126,52 @@ public class PopulatorForest extends PopulatorBasic public void decorate(WorldServer worldIn, Random rand, BlockPos pos) { + if(this.subType == 0) { + double d0 = GRASS_NOISE.generate((double)(pos.getX() + 8) / 200.0D, (double)(pos.getZ() + 8) / 200.0D); + + if(d0 < -0.5) { + this.treesPerChunk = -999; + if (d0 < -0.8D) + { + this.flowersPerChunk = 15; + this.grassPerChunk = 5; + } + else + { + this.flowersPerChunk = 4; + this.grassPerChunk = 10; + DOUBLE_PLANT_GEN.setPlantType(Blocks.large_tallgrass); + + for (int i = 0; i < 7; ++i) + { + int j = rand.chOffset(); + int k = rand.chOffset(); + int l = rand.zrange(worldIn.getHeight(pos.add(j, 0, k)).getY() + 32); + DOUBLE_PLANT_GEN.generate(worldIn, rand, pos.add(j, l, k)); + } + } + + // int n = rand.range(0, 2); + if (rand.chance()) + { + DOUBLE_PLANT_GEN.setPlantType(Blocks.sunflower); + + // for (int i1 = 0; i1 < 10; ++i1) + // { + int j1 = rand.chOffset(); + int k1 = rand.chOffset(); + int l1 = rand.zrange(worldIn.getHeight(pos.add(j1, 0, k1)).getY() + 32); + DOUBLE_PLANT_GEN.generate(worldIn, rand, pos.add(j1, l1, k1)); + // } + } + super.decorate(worldIn, rand, pos); + return; + } + else { + this.treesPerChunk = 10; + } + } + // if(worldIn.getLeavesGen() != this.leavesType) { // this.leavesType = worldIn.getLeavesGen(); // this.cherry = new WorldGenBaseTree(false, Blocks.log2.getDefaultState().withProperty(BlockNewLog.VARIANT, BlockPlanks.EnumType.CHERRY), @@ -142,18 +215,13 @@ public class PopulatorForest extends PopulatorBasic int j1 = rand.range(-3, 1); - if (this.subType == 1) - { - j1 += 2; - } - for (int k1 = 0; k1 < j1; ++k1) { // int l1 = rand.nextInt(3); // if (l1 == 0) // { - DOUBLE_PLANT_GEN.setPlantType(rand.pick(FLOWER_TYPES)); + DOUBLE_PLANT_GEN.setPlantType(rand.pick(DFLOWER_TYPES)); // } // else if (l1 == 1) // { diff --git a/server/src/main/java/server/worldgen/populator/PopulatorPlains.java b/server/src/main/java/server/worldgen/populator/PopulatorPlains.java deleted file mode 100755 index 2d1e4d58..00000000 --- a/server/src/main/java/server/worldgen/populator/PopulatorPlains.java +++ /dev/null @@ -1,115 +0,0 @@ -package server.worldgen.populator; - -import common.block.foliage.BlockFlower; -import common.init.Blocks; -import common.rng.Random; -import common.util.BlockPos; -import server.world.WorldServer; - -public class PopulatorPlains extends PopulatorBasic -{ - private static final BlockFlower.EnumFlowerType[] TULIP_TYPES = new BlockFlower.EnumFlowerType[] { - BlockFlower.EnumFlowerType.ORANGE_TULIP, BlockFlower.EnumFlowerType.RED_TULIP, - BlockFlower.EnumFlowerType.PINK_TULIP, BlockFlower.EnumFlowerType.WHITE_TULIP - }; - - private static final BlockFlower.EnumFlowerType[] FLOWER_TYPES = new BlockFlower.EnumFlowerType[] { - BlockFlower.EnumFlowerType.POPPY, BlockFlower.EnumFlowerType.HOUSTONIA, BlockFlower.EnumFlowerType.DAISY - }; - -// protected boolean field_150628_aC; - - protected PopulatorPlains() - { - this.treesPerChunk = -999; - this.flowersPerChunk = 4; - this.grassPerChunk = 10; - } - - protected BlockFlower.EnumFlowerType pickRandomFlower(Random rand, BlockPos pos) - { - double d0 = GRASS_NOISE.generate((double)pos.getX() / 200.0D, (double)pos.getZ() / 200.0D); - - if (d0 < -0.8D) - { - return rand.pick(TULIP_TYPES); -// int j = rand.nextInt(4); -// -// switch (j) -// { -// case 0: -// return BlockFlower.EnumFlowerType.ORANGE_TULIP; -// -// case 1: -// return BlockFlower.EnumFlowerType.RED_TULIP; -// -// case 2: -// return BlockFlower.EnumFlowerType.PINK_TULIP; -// -// case 3: -// default: -// return BlockFlower.EnumFlowerType.WHITE_TULIP; -// } - } - else if (rand.rarity(3)) - { - return rand.pick(FLOWER_TYPES); -// int i = rand.nextInt(3); -// return i == 0 ? BlockFlower.EnumFlowerType.POPPY : (i == 1 ? BlockFlower.EnumFlowerType.HOUSTONIA : BlockFlower.EnumFlowerType.OXEYE_DAISY); - } - else - { - return BlockFlower.EnumFlowerType.DANDELION; - } - } - - public void decorate(WorldServer worldIn, Random rand, BlockPos pos) - { - double d0 = GRASS_NOISE.generate((double)(pos.getX() + 8) / 200.0D, (double)(pos.getZ() + 8) / 200.0D); - - if (d0 < -0.8D) - { - this.flowersPerChunk = 15; - this.grassPerChunk = 5; - } - else - { - this.flowersPerChunk = 4; - this.grassPerChunk = 10; - DOUBLE_PLANT_GEN.setPlantType(Blocks.large_tallgrass); - - for (int i = 0; i < 7; ++i) - { - int j = rand.chOffset(); - int k = rand.chOffset(); - int l = rand.zrange(worldIn.getHeight(pos.add(j, 0, k)).getY() + 32); - DOUBLE_PLANT_GEN.generate(worldIn, rand, pos.add(j, l, k)); - } - } - -// int n = rand.range(0, 2); - if (rand.chance()) - { - DOUBLE_PLANT_GEN.setPlantType(Blocks.sunflower); - -// for (int i1 = 0; i1 < 10; ++i1) -// { - int j1 = rand.chOffset(); - int k1 = rand.chOffset(); - int l1 = rand.zrange(worldIn.getHeight(pos.add(j1, 0, k1)).getY() + 32); - DOUBLE_PLANT_GEN.generate(worldIn, rand, pos.add(j1, l1, k1)); -// } - } - - super.decorate(worldIn, rand, pos); - } - -// protected Biome createMutatedBiome(int p_180277_1_) -// { -// BiomePlains biomegenplains = new BiomePlains(p_180277_1_); -// biomegenplains.setBiomeName("sunflowerPlains"); -// biomegenplains.field_150628_aC = true; -// biomegenplains.setColor(9286496); -// return biomegenplains; -// } -} diff --git a/server/src/main/java/server/worldgen/populator/PopulatorSavanna.java b/server/src/main/java/server/worldgen/populator/PopulatorSavanna.java index b0022ce4..62f64eb8 100755 --- a/server/src/main/java/server/worldgen/populator/PopulatorSavanna.java +++ b/server/src/main/java/server/worldgen/populator/PopulatorSavanna.java @@ -11,21 +11,11 @@ public class PopulatorSavanna extends PopulatorBasic { private static final WorldGenSavanna field_150627_aC = new WorldGenSavanna(false); - private final boolean dplant; - - protected PopulatorSavanna(boolean dplant) + protected PopulatorSavanna() { - this.dplant = dplant; - if(dplant) { - this.treesPerChunk = 1; - this.flowersPerChunk = 4; - this.grassPerChunk = 20; - } - else { - this.treesPerChunk = 2; - this.flowersPerChunk = 2; - this.grassPerChunk = 5; - } + this.treesPerChunk = 1; + this.flowersPerChunk = 4; + this.grassPerChunk = 20; } protected WorldGenTree genBigTreeChance(Random rand) @@ -35,17 +25,15 @@ public class PopulatorSavanna extends PopulatorBasic public void decorate(WorldServer worldIn, Random rand, BlockPos pos) { - if(this.dplant) { - DOUBLE_PLANT_GEN.setPlantType(Blocks.large_tallgrass); - - for (int i = 0; i < 7; ++i) - { - int j = rand.chOffset(); - int k = rand.chOffset(); - int l = rand.zrange(worldIn.getHeight(pos.add(j, 0, k)).getY() + 32); - DOUBLE_PLANT_GEN.generate(worldIn, rand, pos.add(j, l, k)); - } - } + DOUBLE_PLANT_GEN.setPlantType(Blocks.large_tallgrass); + + for (int i = 0; i < 7; ++i) + { + int j = rand.chOffset(); + int k = rand.chOffset(); + int l = rand.zrange(worldIn.getHeight(pos.add(j, 0, k)).getY() + 32); + DOUBLE_PLANT_GEN.generate(worldIn, rand, pos.add(j, l, k)); + } super.decorate(worldIn, rand, pos); } diff --git a/server/src/main/java/server/worldgen/populator/PopulatorSnow.java b/server/src/main/java/server/worldgen/populator/PopulatorSnow.java index 3abca16d..eb235519 100755 --- a/server/src/main/java/server/worldgen/populator/PopulatorSnow.java +++ b/server/src/main/java/server/worldgen/populator/PopulatorSnow.java @@ -1,46 +1,11 @@ package server.worldgen.populator; import common.rng.Random; -import common.util.BlockPos; -import server.world.WorldServer; -import server.worldgen.feature.WorldGenIcePath; -import server.worldgen.feature.WorldGenIceSpike; import server.worldgen.tree.WorldGenTaiga2; import server.worldgen.tree.WorldGenTree; public class PopulatorSnow extends PopulatorBasic { - private final WorldGenIceSpike spikeGen = new WorldGenIceSpike(); - private final WorldGenIcePath pathGen = new WorldGenIcePath(4); - private final boolean spiky; - - public PopulatorSnow(boolean spiky) - { - this.spiky = spiky; - } - - public void decorate(WorldServer worldIn, Random rand, BlockPos pos) - { - if (this.spiky) - { - for (int i = 0; i < 3; ++i) - { - int j = rand.chOffset(); - int k = rand.chOffset(); - this.spikeGen.generate(worldIn, rand, worldIn.getHeight(pos.add(j, 0, k))); - } - - for (int l = 0; l < 2; ++l) - { - int i1 = rand.chOffset(); - int j1 = rand.chOffset(); - this.pathGen.generate(worldIn, rand, worldIn.getHeight(pos.add(i1, 0, j1))); - } - } - - super.decorate(worldIn, rand, pos); - } - protected WorldGenTree genBigTreeChance(Random rand) { return new WorldGenTaiga2(false); diff --git a/server/src/main/java/server/worldgen/populator/PopulatorSpikes.java b/server/src/main/java/server/worldgen/populator/PopulatorSpikes.java new file mode 100644 index 00000000..adbed344 --- /dev/null +++ b/server/src/main/java/server/worldgen/populator/PopulatorSpikes.java @@ -0,0 +1,39 @@ +package server.worldgen.populator; + +import common.rng.Random; +import common.util.BlockPos; +import server.world.WorldServer; +import server.worldgen.feature.WorldGenIcePath; +import server.worldgen.feature.WorldGenIceSpike; +import server.worldgen.tree.WorldGenTaiga2; +import server.worldgen.tree.WorldGenTree; + +public class PopulatorSpikes extends PopulatorBasic +{ + private final WorldGenIceSpike spikeGen = new WorldGenIceSpike(); + private final WorldGenIcePath pathGen = new WorldGenIcePath(4); + + public void decorate(WorldServer worldIn, Random rand, BlockPos pos) + { + for (int i = 0; i < 3; ++i) + { + int j = rand.chOffset(); + int k = rand.chOffset(); + this.spikeGen.generate(worldIn, rand, worldIn.getHeight(pos.add(j, 0, k))); + } + + for (int l = 0; l < 2; ++l) + { + int i1 = rand.chOffset(); + int j1 = rand.chOffset(); + this.pathGen.generate(worldIn, rand, worldIn.getHeight(pos.add(i1, 0, j1))); + } + + super.decorate(worldIn, rand, pos); + } + + protected WorldGenTree genBigTreeChance(Random rand) + { + return new WorldGenTaiga2(false); + } +} diff --git a/server/src/main/java/server/worldgen/populator/PopulatorBiome.java b/server/src/main/java/server/worldgen/populator/PopulatorTerranian.java similarity index 60% rename from server/src/main/java/server/worldgen/populator/PopulatorBiome.java rename to server/src/main/java/server/worldgen/populator/PopulatorTerranian.java index b4c70803..0db6ee26 100644 --- a/server/src/main/java/server/worldgen/populator/PopulatorBiome.java +++ b/server/src/main/java/server/worldgen/populator/PopulatorTerranian.java @@ -4,29 +4,21 @@ import common.rng.Random; import common.util.BlockPos; import server.world.WorldServer; -public class PopulatorBiome implements Populator { - private final Populator plains = (new PopulatorPlains()); +public class PopulatorTerranian implements Populator { private final Populator desert = (new PopulatorDesert()); private final Populator extremeHills = (new PopulatorHills(false)); - private final Populator extremeHillsPlus = (new PopulatorHills(true)); private final Populator taiga = (new PopulatorTaiga(0)); + private final Populator swampland = (new PopulatorSwamp()); + private final Populator icePlains = (new PopulatorSnow()); + private final Populator jungle = (new PopulatorTropical()); + private final Populator stoneBeach = (new PopulatorRocky()); + private final Populator savanna = (new PopulatorSavanna()); + private final Populator forest = (new PopulatorForest(0)); + + private final Populator extremeHillsPlus = (new PopulatorHills(true)); private final Populator megaTaiga = (new PopulatorTaiga(1)); private final Populator tallTreeTaiga = new PopulatorTaiga(2); - private final Populator swampland = (new PopulatorSwamp()); - private final Populator river = (new PopulatorDefault()); - private final Populator icePlains = (new PopulatorSnow(false)); - private final Populator iceSpikes = new PopulatorSnow(true); - private final Populator beach = (new PopulatorBeach()); - private final Populator jungle = (new PopulatorTropical(false)); - private final Populator jungleEdge = (new PopulatorTropical(true)); - private final Populator stoneBeach = (new PopulatorRocky()); - private final Populator savanna = (new PopulatorSavanna(true)); - private final Populator savannaNoDPlants = new PopulatorSavanna(false); - private final Populator forest = (new PopulatorForest(0)); - private final Populator flowerForest = new PopulatorForest(1); - private final Populator birchForest = (new PopulatorForest(2)); - private final Populator roofedForest = (new PopulatorForest(3)); - private final Populator tallBirchForest = new PopulatorForest(5); + private final Populator tallBirchForest = new PopulatorForest(1); public void decorate(WorldServer world, Random rand, BlockPos pos) { float absTemp = world.getGenTemperature(pos.getX(), pos.getZ()); @@ -44,8 +36,12 @@ public class PopulatorBiome implements Populator { gen = this.extremeHills; else if(absTemp < 5.0f && humidity >= 70.0f) gen = this.taiga; + else if(absTemp < 5.0f) + gen = this.icePlains; else if(absTemp < 22.0f && humidity >= 85.0f) gen = this.swampland; + else if(humidity >= 85.0f) + gen = this.jungle; gen.decorate(world, rand, pos); } diff --git a/server/src/main/java/server/worldgen/populator/PopulatorTropical.java b/server/src/main/java/server/worldgen/populator/PopulatorTropical.java index 3f47e7d6..390e6081 100755 --- a/server/src/main/java/server/worldgen/populator/PopulatorTropical.java +++ b/server/src/main/java/server/worldgen/populator/PopulatorTropical.java @@ -21,28 +21,16 @@ public class PopulatorTropical extends PopulatorBasic private static final WoodType LEAVES = WoodType.JUNGLE; // .withProperty(BlockOldLeaf.VARIANT, BlockPlanks.EnumType.JUNGLE); // .withProperty(BlockLeaves.CHECK_DECAY, Boolean.valueOf(false)); private static final WoodType BUSH = WoodType.OAK; // .withProperty(BlockOldLeaf.VARIANT, BlockPlanks.EnumType.OAK); // .withProperty(BlockLeaves.CHECK_DECAY, Boolean.valueOf(false)); - private final boolean edge; - - public PopulatorTropical(boolean edge) + public PopulatorTropical() { - this.edge = edge; - - if (edge) - { - this.treesPerChunk = 2; - } - else - { - this.treesPerChunk = 50; - } - + this.treesPerChunk = 50; this.grassPerChunk = 25; this.flowersPerChunk = 4; } protected WorldGenTree genBigTreeChance(Random rand) { - return (WorldGenTree)(rand.chance(10) ? this.worldGeneratorBigTree : (rand.chance(2) ? new WorldGenShrub(LOG, BUSH) : (!this.edge && rand.chance(3) ? new WorldGenJungle(false, 10, 20, LOG, LEAVES) : new WorldGenBaseTree(false, rand.range(4, 10), LOG, LEAVES, true)))); + return (WorldGenTree)(rand.chance(10) ? this.worldGeneratorBigTree : (rand.chance(2) ? new WorldGenShrub(LOG, BUSH) : (rand.chance(3) ? new WorldGenJungle(false, 10, 20, LOG, LEAVES) : new WorldGenBaseTree(false, rand.range(4, 10), LOG, LEAVES, true)))); } protected FeatureGenerator getRandomWorldGenForGrass(Random rand)