Add grayscaledark attribute to control dark color in graytone
This commit is contained in:
parent
8c1cc36088
commit
bbd253853d
2 changed files with 12 additions and 2 deletions
|
|
@ -12,20 +12,22 @@ public class DefaultHDLighting implements HDLighting {
|
||||||
private String name;
|
private String name;
|
||||||
protected boolean grayscale;
|
protected boolean grayscale;
|
||||||
protected final Color graytone;
|
protected final Color graytone;
|
||||||
|
protected final Color graytonedark;
|
||||||
|
|
||||||
public DefaultHDLighting(DynmapCore core, ConfigurationNode configuration) {
|
public DefaultHDLighting(DynmapCore core, ConfigurationNode configuration) {
|
||||||
name = (String) configuration.get("name");
|
name = (String) configuration.get("name");
|
||||||
grayscale = configuration.getBoolean("grayscale", false);
|
grayscale = configuration.getBoolean("grayscale", false);
|
||||||
graytone = configuration.getColor("graytone", null);
|
graytone = configuration.getColor("graytone", null);
|
||||||
|
graytonedark = configuration.getColor("graytonedark", "#000000");
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void checkGrayscale(Color[] outcolor) {
|
protected void checkGrayscale(Color[] outcolor) {
|
||||||
if (grayscale) {
|
if (grayscale) {
|
||||||
outcolor[0].setGrayscale();
|
outcolor[0].setGrayscale();
|
||||||
if (graytone != null) outcolor[0].blendColor(graytone);
|
if (graytone != null) outcolor[0].scaleColor(graytonedark,graytone);
|
||||||
if (outcolor.length > 1) {
|
if (outcolor.length > 1) {
|
||||||
outcolor[1].setGrayscale();
|
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'
|
color6: '#FFCC99'
|
||||||
color7: '#FFFF00'
|
color7: '#FFFF00'
|
||||||
night-and-day: true
|
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…
Add table
Add a link
Reference in a new issue