Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,30 @@ public void modify(Holder<Biome> biome, Phase phase, ModifiableBiomeInfo.BiomeIn

PlacedFeature placedFeature = placedFeatureHolder.value();

return placedFeature.getFeatures().anyMatch(configuredFeature -> {
for (FeatureCanceller featureCanceller : featureCancellations.getCancellers()) {
if (featureCanceller.shouldCancel(configuredFeature, featureCancellations)) {
return true;
}
try {
var features = placedFeature.getFeatures();
if (features == null) {
return false;
}

return features.filter(cf -> cf.config() != null).anyMatch(configuredFeature -> {
for (FeatureCanceller featureCanceller : featureCancellations.getCancellers()) {
try {
if (featureCanceller.shouldCancel(configuredFeature, featureCancellations)) {
return true;
}
} catch (NullPointerException e) {
// This should be logged
// In this case, we do not want a single FeatureCanceller to break the entire process.
return false;
}
}
return false;
});
} catch (NullPointerException e) {
// I don't know how to log this
return false;
});
}
}));
}
}
Expand Down