Clean up warnings, extra imports. Fix post_1_8 logic. Color multiplier cache

This commit is contained in:
Mike Primm 2012-01-16 23:06:31 -06:00
parent 5e9ba1e6e3
commit 497071aac9
32 changed files with 58 additions and 59 deletions

View file

@ -146,7 +146,8 @@ public class DynmapPlugin extends JavaPlugin implements DynmapAPI {
break;
case WORLD_SPAWN_CHANGE:
bep.registerEvent(Type.SPAWN_CHANGE, new WorldListener() {
public void onWorldSpawnChange(SpawnChangeEvent evt) {
@Override
public void onSpawnChange(SpawnChangeEvent evt) {
DynmapWorld w = new BukkitWorld(evt.getWorld());
core.listenerManager.processWorldEvent(EventType.WORLD_SPAWN_CHANGE, w);
}
@ -807,7 +808,7 @@ public class DynmapPlugin extends JavaPlugin implements DynmapAPI {
WorldListener worldTrigger = new WorldListener() {
@Override
public void onChunkLoad(ChunkLoadEvent event) {
if(core.ignore_chunk_loads)
if(DynmapCore.ignore_chunk_loads)
return;
Chunk c = event.getChunk();
/* Touch extreme corners */

View file

@ -126,7 +126,10 @@ public class NewMapChunkCache implements MapChunkCache {
if(bio == null) {
Biome bb = snap.getBiome(bx, bz);
if(bb != null)
bio = b[off] = biome_to_bmap[bb.ordinal()];
bio = biome_to_bmap[bb.ordinal()];
else
bio = BiomeMap.NULL;
b[off] = bio;
}
return bio;
}
@ -413,7 +416,7 @@ public class NewMapChunkCache implements MapChunkCache {
try {
craftworld = getworldhandle.invoke(w); /* World.getHandle() */
if(ticklist != null)
ourticklist = (TreeSet)ticklist.get(craftworld);
ourticklist = (TreeSet<?>)ticklist.get(craftworld);
} catch (Exception x) {
}
}
@ -491,7 +494,6 @@ public class NewMapChunkCache implements MapChunkCache {
snaparray[(chunk.x-x_min) + (chunk.z - z_min)*x_dim] = ss;
continue;
}
long tt0 = 0;
chunks_attempted++;
boolean wasLoaded = w.isChunkLoaded(chunk.x, chunk.z);
boolean didload = w.loadChunk(chunk.x, chunk.z, false);

View file

@ -23,6 +23,7 @@ public class SnapshotCache {
boolean hashighesty;
}
@SuppressWarnings("serial")
public class CacheHashMap extends LinkedHashMap<String, CacheRec> {
private int limit;
private IdentityHashMap<WeakReference<ChunkSnapshot>, String> reverselookup;