mirror of
https://github.com/webbukkit/dynmap.git
synced 2025-02-03 13:31:32 +01:00
Fabric 1.16.5: Use BiomeEffectsAccessor to get foliage color
This commit is contained in:
parent
e3911b0d3b
commit
a5e7ae1013
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user