Posted October 7, 20186 yr I tried this in my generate method in my world generation class: case(0): if(world.getBiome(new BlockPos(chunkX, 64, chunkZ + random.nextInt(16))).getClass().equals(MineralBiome.class)) { generateHuge(random, chunkX, chunkZ, world, chunkGenerator, chunkProvider); break; } generateOverworld(random, chunkX, chunkZ, world, chunkGenerator, chunkProvider); break; And it worked until I made the biome have less weight, and it stopped generating. How can I have special generation so it works?
October 7, 20186 yr 1 hour ago, EOT3000 said: new BlockPos(chunkX, 64, chunkZ + random.nextInt(16)) First of all as the variable names suggest these are chunk positions, not block positions. You need to left-shift these by 4 to translate to block positions. Also what is up with this random.nextInt(16)? Why is it there? Why is it 16? Why is it Z only? 1 hour ago, EOT3000 said: getClass().equals(MineralBiome.class) You could just do a direct comparason of objects(world.getBiome(...) == YourBiomes.MINERAL_BIOME)
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.