mirror of
https://github.com/webbukkit/dynmap.git
synced 2024-09-27 13:22:34 +02:00
Add grayscaledark attribute to control dark color in graytone
This commit is contained in:
parent
ee8c919eda
commit
23ea19e737
@ -12,20 +12,22 @@ public class DefaultHDLighting implements HDLighting {
|
||||
private String name;
|
||||
protected boolean grayscale;
|
||||
protected final Color graytone;
|
||||
protected final Color graytonedark;
|
||||
|
||||
public DefaultHDLighting(DynmapCore core, ConfigurationNode configuration) {
|
||||
name = (String) configuration.get("name");
|
||||
grayscale = configuration.getBoolean("grayscale", false);
|
||||
graytone = configuration.getColor("graytone", null);
|
||||
graytonedark = configuration.getColor("graytonedark", "#000000");
|
||||
}
|
||||
|
||||
protected void checkGrayscale(Color[] outcolor) {
|
||||
if (grayscale) {
|
||||
outcolor[0].setGrayscale();
|
||||
if (graytone != null) outcolor[0].blendColor(graytone);
|
||||
if (graytone != null) outcolor[0].scaleColor(graytonedark,graytone);
|
||||
if (outcolor.length > 1) {
|
||||
outcolor[1].setGrayscale();
|
||||
if (graytone != null) outcolor[1].blendColor(graytone);
|
||||
if (graytone != null) outcolor[1].scaleColor(graytonedark, graytone);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -122,4 +122,12 @@ lightings:
|
||||
color6: '#FFCC99'
|
||||
color7: '#FFFF00'
|
||||
night-and-day: true
|
||||
# Shadows enabled day mode - grayscale parchment, brown ink
|
||||
- class: org.dynmap.hdmap.ShadowHDLighting
|
||||
name: parchmentbrownink
|
||||
shadowstrength: 1.0
|
||||
grayscale: true
|
||||
graytone: '#C09A53'
|
||||
graytonedark: '#400000'
|
||||
smooth-lighting: true
|
||||
|
Loading…
Reference in New Issue
Block a user