Skip to content

Commit

Permalink
Don't try to add replacement or sub biomes to a finalized list.
Browse files Browse the repository at this point in the history
- Work around bclib adding FAPI biomes after requesting ours
  • Loading branch information
gniftygnome committed Apr 9, 2024
1 parent ff00d68 commit 93b95dd
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,15 +79,15 @@ public void addRemoval(RegistryKey<Biome> biome, boolean fromData) {
}

public void addReplacement(RegistryKey<Biome> target, RegistryKey<Biome> biome, double rate, boolean fromData) {
if (biomesInjected) {
if (biomesInjected || (replacementRequests.containsKey(target) && replacementRequests.get(target).finalized)) {
Biolith.LOGGER.error("Biolith's BiomePlacement.addReplacement() called too late for biome: {}", biome.getValue());
} else {
replacementRequests.computeIfAbsent(target, ReplacementRequestSet::new).addRequest(biome, rate, fromData);
}
}

public void addSubBiome(RegistryKey<Biome> target, RegistryKey<Biome> biome, SubBiomeMatcher matcher, boolean fromData) {
if (biomesInjected) {
if (biomesInjected || (subBiomeRequests.containsKey(target) && subBiomeRequests.get(target).finalized)) {
Biolith.LOGGER.error("Biolith's BiomePlacement.addSubBiome() called too late for biome: {}", biome.getValue());
} else {
subBiomeRequests.computeIfAbsent(target, SubBiomeRequestSet::new).addRequest(biome, matcher, fromData);
Expand Down

0 comments on commit 93b95dd

Please sign in to comment.