fixing two common worldgen cascades in meteorites and flowers

This commit is contained in:
George Paton 2025-10-06 12:21:24 +11:00
parent 9ba40044ed
commit 278a7b5dfb
2 changed files with 23 additions and 23 deletions

View File

@ -576,8 +576,8 @@ public class HbmWorldGen implements IWorldGenerator {
} }
if(WorldConfig.meteoriteSpawn > 0 && rand.nextInt(WorldConfig.meteoriteSpawn) == 0) { if(WorldConfig.meteoriteSpawn > 0 && rand.nextInt(WorldConfig.meteoriteSpawn) == 0) {
int x = i + rand.nextInt(16); int x = i + rand.nextInt(16) + 8;
int z = j + rand.nextInt(16); int z = j + rand.nextInt(16) + 8;
int y = world.getHeightValue(x, z) - rand.nextInt(10); int y = world.getHeightValue(x, z) - rand.nextInt(10);
if(y > 1) (new Meteorite()).generate(world, rand, x, y, z, false, false, false); if(y > 1) (new Meteorite()).generate(world, rand, x, y, z, false, false, false);
} }

View File

@ -88,8 +88,8 @@ public class DungeonToolbox {
private static WorldGenFlowers genFlowers = new WorldGenFlowers(null); private static WorldGenFlowers genFlowers = new WorldGenFlowers(null);
public static void generateFlowers(World world, Random rand, int chunkX, int chunkZ, Block flower, int meta) { public static void generateFlowers(World world, Random rand, int chunkX, int chunkZ, Block flower, int meta) {
int x = chunkX + rand.nextInt(16); int x = chunkX + rand.nextInt(16) + 8;
int z = chunkZ + rand.nextInt(16); int z = chunkZ + rand.nextInt(16) + 8;
int y = world.getHeightValue(x, z); int y = world.getHeightValue(x, z);
genFlowers.func_150550_a(flower, meta); genFlowers.func_150550_a(flower, meta);
genFlowers.generate(world, rand, x, y, z); genFlowers.generate(world, rand, x, y, z);