From 9e55509e62d942141e57bd2ab49663ff1d656db3 Mon Sep 17 00:00:00 2001 From: Mike Primm Date: Fri, 7 Oct 2011 23:34:59 +0800 Subject: [PATCH] Restore biome data loading for non-normal (Bukkit is fixed), fix trap --- .../org/dynmap/hdmap/TexturePackHDShader.java | 2 +- .../org/dynmap/utils/NewMapChunkCache.java | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/main/java/org/dynmap/hdmap/TexturePackHDShader.java b/src/main/java/org/dynmap/hdmap/TexturePackHDShader.java index b63a6f0c..11448697 100644 --- a/src/main/java/org/dynmap/hdmap/TexturePackHDShader.java +++ b/src/main/java/org/dynmap/hdmap/TexturePackHDShader.java @@ -94,7 +94,7 @@ public class TexturePackHDShader implements HDShader { c = new Color(); scaledtp = tp.resampleTexturePack(map.getPerspective().getModelScale()); /* Biome raw data only works on normal worlds at this point */ - do_biome_shading = biome_shaded && (cache.getWorld().getEnvironment() == Environment.NORMAL); + do_biome_shading = biome_shaded; // && (cache.getWorld().getEnvironment() == Environment.NORMAL); do_swamp_shading = do_biome_shading && swamp_shaded; do_water_shading = do_biome_shading && waterbiomeshaded; } diff --git a/src/main/java/org/dynmap/utils/NewMapChunkCache.java b/src/main/java/org/dynmap/utils/NewMapChunkCache.java index 778c4242..2e3451f3 100644 --- a/src/main/java/org/dynmap/utils/NewMapChunkCache.java +++ b/src/main/java/org/dynmap/utils/NewMapChunkCache.java @@ -377,9 +377,9 @@ public class NewMapChunkCache implements MapChunkCache { @SuppressWarnings({ "unchecked", "rawtypes" }) public void setChunks(World w, List chunks) { this.w = w; - if(w.getEnvironment() != Environment.NORMAL) { - biome = biomeraw = false; - } + //if(w.getEnvironment() != Environment.NORMAL) { + // biome = biomeraw = false; + //} this.chunks = chunks; if(poppreservedchunk == null) { /* Get CraftWorld.popPreservedChunk(x,z) - reduces memory bloat from map traversals (optional) */ @@ -423,7 +423,7 @@ public class NewMapChunkCache implements MapChunkCache { iterator = chunks.listIterator(); DynmapPlugin.setIgnoreChunkLoads(true); - boolean isnormral = w.getEnvironment() == Environment.NORMAL; + //boolean isnormral = w.getEnvironment() == Environment.NORMAL; // Load the required chunks. while((cnt < max_to_load) && iterator.hasNext()) { DynmapChunk chunk = iterator.next(); @@ -726,13 +726,13 @@ public class NewMapChunkCache implements MapChunkCache { } @Override public boolean setChunkDataTypes(boolean blockdata, boolean biome, boolean highestblocky, boolean rawbiome) { - if((w != null) && (w.getEnvironment() != Environment.NORMAL)) { - this.biome = this.biomeraw = false; - } - else { +// if((w != null) && (w.getEnvironment() != Environment.NORMAL)) { +// this.biome = this.biomeraw = false; +// } +// else { this.biome = biome; this.biomeraw = rawbiome; - } +// } this.highesty = highestblocky; this.blockdata = blockdata; return true;