Fabric 1.16.5: Use BiomeEffectsAccessor to get foliage color

This commit is contained in:
mastermc05 2022-11-18 14:53:24 +02:00
parent e3911b0d3b
commit a5e7ae1013
1 changed files with 5 additions and 1 deletions

View File

@ -91,7 +91,11 @@ public class FabricMapChunkCache extends GenericMapChunkCache {
}
@Override
public int getFoliageColor(BiomeMap bm, int[] colormap, int x, int z) {
return bm.<Biome>getBiomeObject().map(Biome::getEffects).flatMap(BiomeEffects::getFoliageColor).orElse(colormap[bm.biomeLookup()]);
return bm.<Biome>getBiomeObject()
.map(Biome::getEffects)
.map(BiomeEffectsAccessor.class::cast)
.flatMap(BiomeEffectsAccessor::getFoliageColor)
.orElse(colormap[bm.biomeLookup()]);
}
@Override