public void populate(Chunk chunk, Random random) {
if (chunk.getY() != 4) {
return;
}
final World world = chunk.getWorld();
final GlowstonePatchObject glowstone = new GlowstonePatchObject();
glowstone.setRandom(random);
for (int amount = getAmount(random); amount > 0; amount--) {
final int x = chunk.getBlockX(random);
final int y = random.nextInt(NetherGenerator.HEIGHT);
final int z = chunk.getBlockZ(random);
glowstone.randomize();
if (glowstone.canPlaceObject(world, x, y, z)) {
glowstone.placeObject(world, x, y, z);
}
}
}