From 23ea19e73786f32624aab92930a3037157389cd1 Mon Sep 17 00:00:00 2001 From: Mike Primm Date: Sat, 16 May 2020 17:06:14 -0500 Subject: [PATCH] Add grayscaledark attribute to control dark color in graytone --- .../src/main/java/org/dynmap/hdmap/DefaultHDLighting.java | 6 ++++-- DynmapCore/src/main/resources/lightings.txt | 8 ++++++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/DynmapCore/src/main/java/org/dynmap/hdmap/DefaultHDLighting.java b/DynmapCore/src/main/java/org/dynmap/hdmap/DefaultHDLighting.java index 50cdf1fc..8cff6f40 100644 --- a/DynmapCore/src/main/java/org/dynmap/hdmap/DefaultHDLighting.java +++ b/DynmapCore/src/main/java/org/dynmap/hdmap/DefaultHDLighting.java @@ -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); } } } diff --git a/DynmapCore/src/main/resources/lightings.txt b/DynmapCore/src/main/resources/lightings.txt index c9c87d3a..fc8bc799 100644 --- a/DynmapCore/src/main/resources/lightings.txt +++ b/DynmapCore/src/main/resources/lightings.txt @@ -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 \ No newline at end of file