Merge pull request #171 from mikeprimm/master

Fix debugger loading, and handle height field boundary condition at zero
This commit is contained in:
mikeprimm 2011-05-28 01:27:03 -07:00
commit 6596742bbe
3 changed files with 6 additions and 2 deletions

View File

@ -20,6 +20,9 @@ public class CraftChunkSnapshot implements ChunkSnapshot {
this.z = z;
this.buf = buf;
this.hmap = hmap;
for(int i = 0; i < 256; i++)
if(hmap[i] < 1)
hmap[i] = 1;
}
/**

View File

@ -261,7 +261,7 @@ public class DynmapPlugin extends JavaPlugin {
for (ConfigurationNode debuggerConfiguration : debuggersConfiguration) {
try {
Class<?> debuggerClass = Class.forName((String) debuggerConfiguration.getString("class"));
Constructor<?> constructor = debuggerClass.getConstructor(JavaPlugin.class, Map.class);
Constructor<?> constructor = debuggerClass.getConstructor(JavaPlugin.class, ConfigurationNode.class);
Debugger debugger = (Debugger) constructor.newInstance(this, debuggerConfiguration);
Debug.addDebugger(debugger);
} catch (Exception e) {

View File

@ -122,6 +122,7 @@ public class FlatMap extends MapType {
mapiter.initialize(t.x * t.size + x, 127, t.y * t.size);
for (int y = 0; y < t.size; y++, mapiter.incrementZ()) {
int blockType;
mapiter.setY(127);
if(isnether) {
while((blockType = mapiter.getBlockTypeID()) != 0) {
mapiter.decrementY();