mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2025-07-03 08:25:31 +00:00
implement biomeStream
This commit is contained in:
parent
460a7651bc
commit
8b74a5dee0
@ -26,6 +26,7 @@ import net.minecraft.world.biome.source.util.MultiNoiseUtil.MultiNoiseSampler;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.util.stream.Stream;
|
||||
import java.util.stream.StreamSupport;
|
||||
|
||||
import com.dfsek.terra.api.config.ConfigPack;
|
||||
@ -41,11 +42,6 @@ public class TerraBiomeSource extends BiomeSource {
|
||||
private ConfigPack pack;
|
||||
|
||||
public TerraBiomeSource(ConfigPack pack) {
|
||||
super(StreamSupport
|
||||
.stream(pack.getBiomeProvider()
|
||||
.getBiomes()
|
||||
.spliterator(), false)
|
||||
.map(b -> ((ProtoPlatformBiome) b.getPlatformBiome()).getDelegate()));
|
||||
this.pack = pack;
|
||||
|
||||
LOGGER.debug("Biomes: " + getBiomes());
|
||||
@ -56,6 +52,15 @@ public class TerraBiomeSource extends BiomeSource {
|
||||
return Codecs.TERRA_BIOME_SOURCE;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Stream<RegistryEntry<Biome>> biomeStream() {
|
||||
return StreamSupport
|
||||
.stream(pack.getBiomeProvider()
|
||||
.getBiomes()
|
||||
.spliterator(), false)
|
||||
.map(b -> ((ProtoPlatformBiome) b.getPlatformBiome()).getDelegate());
|
||||
}
|
||||
|
||||
@Override
|
||||
public RegistryEntry<Biome> getBiome(int biomeX, int biomeY, int biomeZ, MultiNoiseSampler noiseSampler) {
|
||||
return ((ProtoPlatformBiome) pack
|
||||
|
Loading…
x
Reference in New Issue
Block a user