diff --git a/pom.xml b/pom.xml index 6df1aee..5c6190d 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ world.bentobox caveblock - 0.0.1 + 0.0.2 CaveBlock CaveBlock is an add-on for BentoBox, an expandable Minecraft Bukkit plugin for island-type games like SkyBlock or AcidIsland. @@ -223,4 +223,4 @@ - + \ No newline at end of file diff --git a/src/main/java/world/bentobox/caveblock/generators/populators/EntitiesPopulator.java b/src/main/java/world/bentobox/caveblock/generators/populators/EntitiesPopulator.java index e8da544..2a8db24 100644 --- a/src/main/java/world/bentobox/caveblock/generators/populators/EntitiesPopulator.java +++ b/src/main/java/world/bentobox/caveblock/generators/populators/EntitiesPopulator.java @@ -64,7 +64,7 @@ public class EntitiesPopulator extends BlockPopulator for (Map.Entry> entry : entityChanceMap.entrySet()) { - for (int subY = 1; subY < worldHeight; subY += 16) + for (int subY = 0; subY < worldHeight; subY += 16) { for (int tries = 0; tries < generationTry; tries++) { @@ -72,7 +72,7 @@ public class EntitiesPopulator extends BlockPopulator { int x = random.nextInt(15); int z = random.nextInt(15); - int y = subY + random.nextInt(15); + int y = Math.min(worldHeight - 2, subY + random.nextInt(15)); this.tryToPlaceEntity(world, chunk.getBlock(x, y, z), entry.getKey(), x, z, mainMaterial); } diff --git a/src/main/java/world/bentobox/caveblock/generators/populators/MaterialPopulator.java b/src/main/java/world/bentobox/caveblock/generators/populators/MaterialPopulator.java index 179f003..b0b26ee 100644 --- a/src/main/java/world/bentobox/caveblock/generators/populators/MaterialPopulator.java +++ b/src/main/java/world/bentobox/caveblock/generators/populators/MaterialPopulator.java @@ -66,7 +66,7 @@ public class MaterialPopulator extends BlockPopulator for (Map.Entry> entry : materialChanceMap.entrySet()) { - for (int subY = 1; subY < worldHeight; subY += 16) + for (int subY = 0; subY < worldHeight; subY += 16) { for (int tries = 0; tries < generationTry; tries++) { @@ -74,7 +74,7 @@ public class MaterialPopulator extends BlockPopulator { int x = random.nextInt(15); int z = random.nextInt(15); - int y = subY + random.nextInt(16); + int y = Math.min(worldHeight - 2, subY + random.nextInt(15)); Block block = chunk.getBlock(x, y, z); @@ -100,7 +100,7 @@ public class MaterialPopulator extends BlockPopulator x = Math.min(15, x + 1); break; case 1: - y = Math.min(worldHeight - 1, y + 1); + y = Math.min(worldHeight - 2, y + 1); break; case 2: z = Math.min(15, z + 1); @@ -109,7 +109,7 @@ public class MaterialPopulator extends BlockPopulator x = Math.max(0, x - 1); break; case 4: - y = Math.max(0, y - 1); + y = Math.max(1, y - 1); break; case 5: z = Math.max(0, z - 1);