[Change] Removed BiomeSourceFromRegistry
-Interface
This commit is contained in:
parent
0320ee61f6
commit
7b0dd1c169
3 changed files with 1 additions and 37 deletions
|
@ -5,7 +5,6 @@ import org.betterx.bclib.api.v2.levelgen.biomes.BCLBiome;
|
||||||
import org.betterx.bclib.api.v2.levelgen.biomes.BCLBiomeRegistry;
|
import org.betterx.bclib.api.v2.levelgen.biomes.BCLBiomeRegistry;
|
||||||
import org.betterx.bclib.api.v2.levelgen.biomes.BiomeAPI;
|
import org.betterx.bclib.api.v2.levelgen.biomes.BiomeAPI;
|
||||||
import org.betterx.bclib.config.Configs;
|
import org.betterx.bclib.config.Configs;
|
||||||
import org.betterx.worlds.together.biomesource.BiomeSourceFromRegistry;
|
|
||||||
import org.betterx.worlds.together.biomesource.BiomeSourceHelper;
|
import org.betterx.worlds.together.biomesource.BiomeSourceHelper;
|
||||||
import org.betterx.worlds.together.biomesource.MergeableBiomeSource;
|
import org.betterx.worlds.together.biomesource.MergeableBiomeSource;
|
||||||
import org.betterx.worlds.together.biomesource.ReloadableBiomeSource;
|
import org.betterx.worlds.together.biomesource.ReloadableBiomeSource;
|
||||||
|
@ -14,7 +13,6 @@ import org.betterx.worlds.together.world.BiomeSourceWithSeed;
|
||||||
import org.betterx.worlds.together.world.event.WorldBootstrap;
|
import org.betterx.worlds.together.world.event.WorldBootstrap;
|
||||||
|
|
||||||
import net.minecraft.core.Holder;
|
import net.minecraft.core.Holder;
|
||||||
import net.minecraft.core.HolderGetter;
|
|
||||||
import net.minecraft.core.Registry;
|
import net.minecraft.core.Registry;
|
||||||
import net.minecraft.core.RegistryAccess;
|
import net.minecraft.core.RegistryAccess;
|
||||||
import net.minecraft.core.registries.Registries;
|
import net.minecraft.core.registries.Registries;
|
||||||
|
@ -29,7 +27,7 @@ import java.util.*;
|
||||||
import java.util.stream.Stream;
|
import java.util.stream.Stream;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
public abstract class BCLBiomeSource extends BiomeSource implements BiomeSourceWithSeed, MergeableBiomeSource<BCLBiomeSource>, BiomeSourceWithNoiseRelatedSettings, ReloadableBiomeSource, BiomeSourceFromRegistry<BCLBiomeSource> {
|
public abstract class BCLBiomeSource extends BiomeSource implements BiomeSourceWithSeed, MergeableBiomeSource<BCLBiomeSource>, BiomeSourceWithNoiseRelatedSettings, ReloadableBiomeSource {
|
||||||
@FunctionalInterface
|
@FunctionalInterface
|
||||||
public interface PickerAdder {
|
public interface PickerAdder {
|
||||||
boolean add(BCLBiome bclBiome, BiomeAPI.BiomeType type, BiomePicker picker);
|
boolean add(BCLBiome bclBiome, BiomeAPI.BiomeType type, BiomePicker picker);
|
||||||
|
@ -63,11 +61,6 @@ public abstract class BCLBiomeSource extends BiomeSource implements BiomeSourceW
|
||||||
return dynamicPossibleBiomes;
|
return dynamicPossibleBiomes;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean didBiomeRegistryChange() {
|
|
||||||
return false;
|
|
||||||
//return this.registryModificationCounter != InternalBiomeAPI.getBiomeRegistryModificationCount(biomeRegistry);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected boolean wasBound() {
|
protected boolean wasBound() {
|
||||||
return didCreatePickers;
|
return didCreatePickers;
|
||||||
|
@ -288,12 +281,6 @@ public abstract class BCLBiomeSource extends BiomeSource implements BiomeSourceW
|
||||||
this.setMaxHeight(generator.noiseSettings().height());
|
this.setMaxHeight(generator.noiseSettings().height());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public HolderGetter<Biome> getBiomeRegistry() {
|
|
||||||
//return biomeRegistry;
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected void reloadBiomes(boolean force) {
|
protected void reloadBiomes(boolean force) {
|
||||||
rebuildBiomes(force);
|
rebuildBiomes(force);
|
||||||
this.initMap(currentSeed);
|
this.initMap(currentSeed);
|
||||||
|
|
|
@ -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;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,6 +1,5 @@
|
||||||
package org.betterx.worlds.together.chunkgenerator;
|
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.BiomeSourceWithConfig;
|
||||||
import org.betterx.worlds.together.biomesource.MergeableBiomeSource;
|
import org.betterx.worlds.together.biomesource.MergeableBiomeSource;
|
||||||
|
|
||||||
|
@ -33,10 +32,6 @@ public interface EnforceableChunkGenerator<G extends ChunkGenerator> {
|
||||||
if (!ba.getTogetherConfig().couldSetWithoutRepair(bb.getTogetherConfig()))
|
if (!ba.getTogetherConfig().couldSetWithoutRepair(bb.getTogetherConfig()))
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (one instanceof BiomeSourceFromRegistry ba && two instanceof BiomeSourceFromRegistry bb) {
|
|
||||||
if (ba.togetherBiomeSourceContentChanged(bb))
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
if (one instanceof MergeableBiomeSource ba) {
|
if (one instanceof MergeableBiomeSource ba) {
|
||||||
if (ba.togetherShouldMerge(two))
|
if (ba.togetherShouldMerge(two))
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue