diff --git a/src/main/java/world/bentobox/skygrid/generators/Biomes.java b/src/main/java/world/bentobox/skygrid/generators/Biomes.java index 4fa641c..ba5ecc5 100644 --- a/src/main/java/world/bentobox/skygrid/generators/Biomes.java +++ b/src/main/java/world/bentobox/skygrid/generators/Biomes.java @@ -26,12 +26,18 @@ public enum Biomes { SNOWY_BEACH(Environment.NORMAL, Biome.SNOWY_BEACH, 0, 100), STONY_PEAKS(Environment.NORMAL, Biome.STONY_PEAKS, 20, 60), DESERT(Environment.NORMAL, Biome.DESERT, 60, 4), + BADLANDS(Environment.NORMAL, Biome.BADLANDS, 90, 1), FOREST(Environment.NORMAL, Biome.FOREST, 50, 60), + FLOWER_FOREST(Environment.NORMAL, Biome.FLOWER_FOREST, 50, 60), + BIRCH_FOREST(Environment.NORMAL, Biome.BIRCH_FOREST, 50, 59), PLAINS(Environment.NORMAL, Biome.PLAINS, 40, 30), + CHERRY_GROVE(Environment.NORMAL, Biome.CHERRY_GROVE, 45, 35), SWAMP(Environment.NORMAL, Biome.SWAMP, 40, 70), JUNGLE(Environment.NORMAL, Biome.JUNGLE, 60, 50), + BAMBOO_JUNGLE(Environment.NORMAL, Biome.BAMBOO_JUNGLE, 60, 49), SAVANNA(Environment.NORMAL, Biome.SAVANNA, 40, 10), TAIGA(Environment.NORMAL, Biome.TAIGA, 30, 5), + MUSHROOM_FIELDS(Environment.NORMAL, Biome.MUSHROOM_FIELDS, 50, 50), // Nether NETHER_WASTES(Environment.NETHER, Biome.NETHER_WASTES, 40, 30), SOUL_SAND_VALLEY(Environment.NETHER, Biome.SOUL_SAND_VALLEY, 40, 70), diff --git a/src/main/java/world/bentobox/skygrid/generators/SkyGridPop.java b/src/main/java/world/bentobox/skygrid/generators/SkyGridPop.java index 92f1c7e..73116db 100644 --- a/src/main/java/world/bentobox/skygrid/generators/SkyGridPop.java +++ b/src/main/java/world/bentobox/skygrid/generators/SkyGridPop.java @@ -148,33 +148,22 @@ private void setFrame(int xx, int zz, Block frame) { } private void setSaplingType(Block b) { - // Set sapling type - switch (b.getBiome()) { - case JUNGLE: - b.setType(Material.JUNGLE_SAPLING, false); - break; - case PLAINS: - if (random.nextBoolean()) { - b.setType(Material.BIRCH_SAPLING, false); // Birch - } - // else Oak - break; - case TAIGA: - b.setType(Material.SPRUCE_SAPLING, false); - break; - case SWAMP: - break; - case DESERT: - b.setType(Material.DEAD_BUSH, false); - break; - case SAVANNA: - b.setType(Material.ACACIA_SAPLING, false); // Acacia - break; - case FOREST: - default: - b.setType(SAPLING_TYPE[random.nextInt(6)], false); - } - + // Set sapling type if there is one specific to this biome + Material sapling = switch (b.getBiome()) { + case JUNGLE -> Material.JUNGLE_SAPLING; + case PLAINS -> random.nextBoolean() ? Material.BIRCH_SAPLING : Material.OAK_SAPLING; + case TAIGA -> Material.SPRUCE_SAPLING; + case SWAMP -> Material.MANGROVE_PROPAGULE; + case DESERT -> Material.DEAD_BUSH; + case BADLANDS -> Material.DEAD_BUSH; + case CHERRY_GROVE -> Material.CHERRY_SAPLING; + case BAMBOO_JUNGLE -> Material.BAMBOO; + case SAVANNA -> Material.ACACIA_SAPLING; // Acacia + case BIRCH_FOREST -> Material.BIRCH_SAPLING; + case MUSHROOM_FIELDS -> random.nextBoolean() ? Material.RED_MUSHROOM : Material.BROWN_MUSHROOM; + default -> SAPLING_TYPE[random.nextInt(6)]; + }; + b.setType(sapling); } private void setSpawner(Block b) {