Prototype of chunk snapshot support - pre-Bukkit API (reflection

based, with fallback to existing APIs)
This commit is contained in:
Mike Primm 2011-05-20 01:38:49 -05:00
parent 26f4f7d994
commit 3365a96565
11 changed files with 361 additions and 137 deletions

View file

@ -1,6 +1,7 @@
package org.dynmap.kzedmap;
import org.bukkit.World;
import org.dynmap.MapChunkCache;
import org.dynmap.Color;
import org.dynmap.ConfigurationNode;
@ -11,14 +12,15 @@ public class CaveTileRenderer extends DefaultTileRenderer {
}
@Override
protected void scan(World world, int x, int y, int z, int seq, boolean isnether, final Color result) {
protected void scan(World world, int x, int y, int z, int seq, boolean isnether, final Color result,
MapChunkCache cache) {
boolean air = true;
result.setTransparent();
for (;;) {
if (y < 0)
return;
int id = world.getBlockTypeIdAt(x, y, z);
int id = cache.getBlockTypeID(x, y, z);
if(isnether) { /* Make ceiling into air in nether */
if(id != 0)
id = 0;