Support mantle cave biome getter

This commit is contained in:
DanLT 2021-09-01 12:33:53 -08:00
parent e20fa7f3a2
commit 963d3de709

View File

@ -184,6 +184,23 @@ public interface Engine extends DataProvider, Fallible, LootProvider, BlockUpdat
return getComplex().getRegionStream().get(x, z);
}
@BlockCoordinates
default IrisBiome getCaveOrMantleBiome(int x, int y, int z) {
MatterCavern m = getMantle().getMantle().get(x, y, z, MatterCavern.class);
if(m != null && m.getCustomBiome() != null && !m.getCustomBiome().isEmpty())
{
IrisBiome biome = getData().getBiomeLoader().load(m.getCustomBiome());
if(biome != null)
{
return biome;
}
}
return getCaveBiome(x, z);
}
@BlockCoordinates
default IrisBiome getCaveBiome(int x, int z) {
return getComplex().getCaveBiomeStream().get(x, z);