World world = // retrieve game world int x = 50; int z = 100; BiomeGenBase biome = world.getBiomeGenForCoords(x, z);
World world = // retrieve game world ListIn this example, we retrieve the game world and then retrieve the biomes within a certain radius of the specified coordinates (0, 0). The biomes are stored in the `nearbyBiomes` list. Package library: net.minecraft.worldnearbyBiomes = new ArrayList<>(); int x = 0; int z = 0; int radius = 10; for (int i = -radius; i <= radius; i++) { for (int j = -radius; j <= radius; j++) { nearbyBiomes.add(world.getBiomeGenForCoords(x + i, z + j)); } }