generalized biome data

This commit is contained in:
Unknown
2020-01-28 17:56:22 -05:00
parent 970d047651
commit 405e65049e
@@ -25,10 +25,10 @@ public class BiomeData {
public boolean test(FakeBiomeSource source) {
if(this.biome == null) {
return this.biomePredicate.test(VoronoiBiomeAccessType.INSTANCE.getBiome(source.getHashedSeed(), this.pos.getX(),this.pos.getY(), this.pos.getZ(), source));
return this.biomePredicate.test(sampleBiome(source, this.pos.getX(), this.pos.getY(), this.pos.getZ()));
}
return VoronoiBiomeAccessType.INSTANCE.getBiome(source.getHashedSeed(), this.pos.getX(),this.pos.getY(), this.pos.getZ(), source) == this.biome;
return sampleBiome(source, this.pos.getX(), this.pos.getY(), this.pos.getZ()) == this.biome;
}
public BlockPos getPos() {
@@ -39,6 +39,10 @@ public class BiomeData {
return this.biome;
}
public static Biome sampleBiome(FakeBiomeSource source, int x, int y, int z) {
return VoronoiBiomeAccessType.INSTANCE.getBiome(source.getHashedSeed(), z, y, x, source);
}
@Override
public boolean equals(Object obj) {
if(obj == this)return true;