[Change] Removed BiomeSourceFromRegistry-Interface

This commit is contained in:
Frank 2023-04-08 13:25:47 +02:00
parent 0320ee61f6
commit 7b0dd1c169
3 changed files with 1 additions and 37 deletions

View file

@ -1,18 +0,0 @@
package org.betterx.worlds.together.biomesource;
import net.minecraft.core.HolderGetter;
import net.minecraft.world.level.biome.Biome;
import net.minecraft.world.level.biome.BiomeSource;
@Deprecated(forRemoval = true)
public interface BiomeSourceFromRegistry<T extends BiomeSource> {
HolderGetter<Biome> getBiomeRegistry();
boolean didBiomeRegistryChange();
default <R extends BiomeSource> boolean togetherBiomeSourceContentChanged(BiomeSourceFromRegistry<R> other) {
if (other.getBiomeRegistry() != getBiomeRegistry()) return true;
if (other.didBiomeRegistryChange() || didBiomeRegistryChange()) return true;
return false;
}
}

View file

@ -1,6 +1,5 @@
package org.betterx.worlds.together.chunkgenerator;
import org.betterx.worlds.together.biomesource.BiomeSourceFromRegistry;
import org.betterx.worlds.together.biomesource.BiomeSourceWithConfig;
import org.betterx.worlds.together.biomesource.MergeableBiomeSource;
@ -33,10 +32,6 @@ public interface EnforceableChunkGenerator<G extends ChunkGenerator> {
if (!ba.getTogetherConfig().couldSetWithoutRepair(bb.getTogetherConfig()))
return true;
}
if (one instanceof BiomeSourceFromRegistry ba && two instanceof BiomeSourceFromRegistry bb) {
if (ba.togetherBiomeSourceContentChanged(bb))
return true;
}
if (one instanceof MergeableBiomeSource ba) {
if (ba.togetherShouldMerge(two))
return true;