From 57a69bf9adbf8f6e524c0e9de7eef0e8f8ed5400 Mon Sep 17 00:00:00 2001 From: Mike Primm Date: Fri, 10 Feb 2012 00:44:04 -0600 Subject: [PATCH] Add smooth-lighting global setting (switch on smooth lighting on all) --- src/main/java/org/dynmap/bukkit/NewMapChunkCache.java | 4 ++++ src/main/resources/configuration.txt | 3 +++ 2 files changed, 7 insertions(+) diff --git a/src/main/java/org/dynmap/bukkit/NewMapChunkCache.java b/src/main/java/org/dynmap/bukkit/NewMapChunkCache.java index 37248ac4..81900574 100644 --- a/src/main/java/org/dynmap/bukkit/NewMapChunkCache.java +++ b/src/main/java/org/dynmap/bukkit/NewMapChunkCache.java @@ -312,6 +312,10 @@ public class NewMapChunkCache implements MapChunkCache { public int getWorldHeight() { return worldheight; } + @Override + public long getBlockKey() { + return (((chunkindex * worldheight) + y) << 8) | (bx << 4) | bz; + } } private class OurEndMapIterator extends OurMapIterator { diff --git a/src/main/resources/configuration.txt b/src/main/resources/configuration.txt index 837ebab4..b6eaea1e 100644 --- a/src/main/resources/configuration.txt +++ b/src/main/resources/configuration.txt @@ -186,6 +186,9 @@ enabletilehash: true # Optional - enabled BetterGrass style rendering of grass and snow block sides #better-grass: true +# Optional - enable smooth lighting by default on all maps supporting it (can be set per map as lighting option) +smooth-lighting: false + # Pre 0.29 render options - set all three to false if you want same results as 0.28 (i.e. you have existing maps and don't want to render) # use-generated-textures: if true, use generated textures (same as client); false is static, pre 0.29 textures # correct-water-lighting: if true, use corrected water lighting (same as client); false is legacy, pre 0.29 water (darker)