Restore biome data loading for non-normal (Bukkit is fixed), fix trap

This commit is contained in:
Mike Primm 2011-10-07 10:34:59 -05:00
parent abf909e047
commit b5fed110ec
2 changed files with 10 additions and 10 deletions

View File

@ -94,7 +94,7 @@ public class TexturePackHDShader implements HDShader {
c = new Color(); c = new Color();
scaledtp = tp.resampleTexturePack(map.getPerspective().getModelScale()); scaledtp = tp.resampleTexturePack(map.getPerspective().getModelScale());
/* Biome raw data only works on normal worlds at this point */ /* 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_swamp_shading = do_biome_shading && swamp_shaded;
do_water_shading = do_biome_shading && waterbiomeshaded; do_water_shading = do_biome_shading && waterbiomeshaded;
} }

View File

@ -377,9 +377,9 @@ public class NewMapChunkCache implements MapChunkCache {
@SuppressWarnings({ "unchecked", "rawtypes" }) @SuppressWarnings({ "unchecked", "rawtypes" })
public void setChunks(World w, List<DynmapChunk> chunks) { public void setChunks(World w, List<DynmapChunk> chunks) {
this.w = w; this.w = w;
if(w.getEnvironment() != Environment.NORMAL) { //if(w.getEnvironment() != Environment.NORMAL) {
biome = biomeraw = false; // biome = biomeraw = false;
} //}
this.chunks = chunks; this.chunks = chunks;
if(poppreservedchunk == null) { if(poppreservedchunk == null) {
/* Get CraftWorld.popPreservedChunk(x,z) - reduces memory bloat from map traversals (optional) */ /* Get CraftWorld.popPreservedChunk(x,z) - reduces memory bloat from map traversals (optional) */
@ -423,7 +423,7 @@ public class NewMapChunkCache implements MapChunkCache {
iterator = chunks.listIterator(); iterator = chunks.listIterator();
DynmapPlugin.setIgnoreChunkLoads(true); DynmapPlugin.setIgnoreChunkLoads(true);
boolean isnormral = w.getEnvironment() == Environment.NORMAL; //boolean isnormral = w.getEnvironment() == Environment.NORMAL;
// Load the required chunks. // Load the required chunks.
while((cnt < max_to_load) && iterator.hasNext()) { while((cnt < max_to_load) && iterator.hasNext()) {
DynmapChunk chunk = iterator.next(); DynmapChunk chunk = iterator.next();
@ -726,13 +726,13 @@ public class NewMapChunkCache implements MapChunkCache {
} }
@Override @Override
public boolean setChunkDataTypes(boolean blockdata, boolean biome, boolean highestblocky, boolean rawbiome) { public boolean setChunkDataTypes(boolean blockdata, boolean biome, boolean highestblocky, boolean rawbiome) {
if((w != null) && (w.getEnvironment() != Environment.NORMAL)) { // if((w != null) && (w.getEnvironment() != Environment.NORMAL)) {
this.biome = this.biomeraw = false; // this.biome = this.biomeraw = false;
} // }
else { // else {
this.biome = biome; this.biome = biome;
this.biomeraw = rawbiome; this.biomeraw = rawbiome;
} // }
this.highesty = highestblocky; this.highesty = highestblocky;
this.blockdata = blockdata; this.blockdata = blockdata;
return true; return true;