Fix crash whilst generating ConiferTopperGenFeature if endPoints is empty.
@@ -38,6 +38,10 @@ public class ConiferTopperGenFeature extends GenFeature implements IPostGenFeatu
@Override
public boolean postGeneration(ConfiguredGenFeature<?> configuredGenFeature, IWorld world, BlockPos rootPos, Species species, Biome biome, int radius, List<BlockPos> endPoints, SafeChunkBounds safeBounds, BlockState initialDirtState, Float seasonValue, Float seasonFruitProductionFactor) {
+ if (endPoints.isEmpty()) {
+ return false;
+ }
+
// Manually place the highest few blocks of the conifer since the leafCluster voxmap won't handle it
final BlockPos highest = Collections.max(endPoints, Comparator.comparingInt(Vector3i::getY));
// Fetch leaves properties property set or the default for the Species.
