From 63403a7dca3f6f18d948b7f91e2a4994908d9ce7 Mon Sep 17 00:00:00 2001 From: tastybento Date: Fri, 8 Nov 2024 14:56:05 -0800 Subject: [PATCH] Use new biomes --- .../skygrid/generators/SkyGridPop.java | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/main/java/world/bentobox/skygrid/generators/SkyGridPop.java b/src/main/java/world/bentobox/skygrid/generators/SkyGridPop.java index 8a6cba7..3cbb018 100644 --- a/src/main/java/world/bentobox/skygrid/generators/SkyGridPop.java +++ b/src/main/java/world/bentobox/skygrid/generators/SkyGridPop.java @@ -174,18 +174,18 @@ private void setFrame(LimitedRegion region, int xx, int yy, int zz) { private void setSaplingType(LimitedRegion region, Location loc) { // Set sapling type if there is one specific to this biome - Material sapling = switch (region.getBiome(loc)) { - 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; + Material sapling = switch (region.getBiome(loc).getKey().getKey()) { + 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 "savana" -> 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)]; }; region.setType(loc.add(new Vector(0, 1, 0)), sapling);