mirror of
https://github.com/FabricMC/fabric.git
synced 2025-04-08 21:14:41 -04:00
Check to make sure Feature isn't present before adding it (#4323)
(cherry picked from commitb1c29d8eb4
) (cherry picked from commitadd2a486e4
)
This commit is contained in:
parent
c24bd9945d
commit
d527f9fdd9
1 changed files with 8 additions and 1 deletions
|
@ -289,7 +289,14 @@ public class BiomeModificationContextImpl implements BiomeModificationContext {
|
|||
featureSteps.add(RegistryEntryList.of(Collections.emptyList()));
|
||||
}
|
||||
|
||||
featureSteps.set(index, plus(featureSteps.get(index), getEntry(features, entry)));
|
||||
RegistryEntry.Reference<PlacedFeature> feature = getEntry(features, entry);
|
||||
|
||||
// Don't add the feature if it's already present
|
||||
if (featureSteps.get(index).contains(feature)) {
|
||||
return;
|
||||
}
|
||||
|
||||
featureSteps.set(index, plus(featureSteps.get(index), feature));
|
||||
|
||||
// Ensure the list of flower features is up-to-date
|
||||
rebuildFeatures = true;
|
||||
|
|
Loading…
Add table
Reference in a new issue