mirror of
https://github.com/webbukkit/dynmap.git
synced 2024-12-25 10:07:37 +01:00
Forge 1.19.2
This commit is contained in:
parent
a6ead1bc3d
commit
9060c8f32b
@ -3,8 +3,11 @@ package org.dynmap.forge_1_19_2;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.NoSuchElementException;
|
import java.util.NoSuchElementException;
|
||||||
|
|
||||||
|
import net.minecraft.world.level.biome.Biome;
|
||||||
|
import net.minecraft.world.level.biome.BiomeSpecialEffects;
|
||||||
import org.dynmap.DynmapChunk;
|
import org.dynmap.DynmapChunk;
|
||||||
import org.dynmap.Log;
|
import org.dynmap.Log;
|
||||||
|
import org.dynmap.common.BiomeMap;
|
||||||
import org.dynmap.common.chunk.GenericChunk;
|
import org.dynmap.common.chunk.GenericChunk;
|
||||||
import org.dynmap.common.chunk.GenericChunkCache;
|
import org.dynmap.common.chunk.GenericChunkCache;
|
||||||
import org.dynmap.common.chunk.GenericMapChunkCache;
|
import org.dynmap.common.chunk.GenericMapChunkCache;
|
||||||
@ -87,4 +90,17 @@ public class ForgeMapChunkCache extends GenericMapChunkCache {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@Override
|
||||||
|
public int getFoliageColor(BiomeMap bm, int[] colormap, int x, int z) {
|
||||||
|
return bm.<Biome>getBiomeObject().map(Biome::getSpecialEffects)
|
||||||
|
.flatMap(BiomeSpecialEffects::getFoliageColorOverride)
|
||||||
|
.orElse(colormap[bm.biomeLookup()]);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getGrassColor(BiomeMap bm, int[] colormap, int x, int z) {
|
||||||
|
BiomeSpecialEffects effects = bm.<Biome>getBiomeObject().map(Biome::getSpecialEffects).orElse(null);
|
||||||
|
if (effects == null) return colormap[bm.biomeLookup()];
|
||||||
|
return effects.getGrassColorModifier().modifyColor(x, z, effects.getGrassColorOverride().orElse(colormap[bm.biomeLookup()]));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user