Fabric 1.16.5: Use BiomeEffectsAccessor to get foliage color
This commit is contained in:
parent
52770b4b83
commit
77dd55d65d
1 changed files with 5 additions and 1 deletions
|
|
@ -91,7 +91,11 @@ public class FabricMapChunkCache extends GenericMapChunkCache {
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
public int getFoliageColor(BiomeMap bm, int[] colormap, int x, int z) {
|
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
|
@Override
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue