byte successfulClusterCount = 0;
for (byte count = 0; count < clusterPlaceAttempts; count++) {
final int x = chunk.getBlockX(random);
final int z = chunk.getBlockZ(random);
final int y = getHighestWorkableBlock(world, x, z);
if (y == -1 || !canes.canPlaceObject(world, x, y, z)) {
continue;
}
successfulClusterCount++;
canes.randomize();
canes.placeObject(world, x, y, z);