World height related fixes - 128 -> 256. Addresses BUKKIT-889

This commit is contained in:
Mike Primm
2012-03-01 15:13:53 -06:00
committed by EvilSeph
parent efc9ced128
commit 82f2a2e773
7 changed files with 15 additions and 15 deletions

View File

@@ -80,7 +80,7 @@ public class CraftBlock implements Block {
}
public byte getData() {
return (byte) chunk.getHandle().getData(this.x & 0xF, this.y & 0x7F, this.z & 0xF);
return (byte) chunk.getHandle().getData(this.x & 0xF, this.y & 0xFF, this.z & 0xF);
}
public void setType(final Material type) {
@@ -116,7 +116,7 @@ public class CraftBlock implements Block {
}
public int getTypeId() {
return chunk.getHandle().getTypeId(this.x & 0xF, this.y & 0x7F, this.z & 0xF);
return chunk.getHandle().getTypeId(this.x & 0xF, this.y & 0xFF, this.z & 0xF);
}
public byte getLightLevel() {
@@ -124,11 +124,11 @@ public class CraftBlock implements Block {
}
public byte getLightFromSky() {
return (byte) chunk.getHandle().getBrightness(EnumSkyBlock.SKY, this.x & 0xF, this.y & 0x7F, this.z & 0xF);
return (byte) chunk.getHandle().getBrightness(EnumSkyBlock.SKY, this.x & 0xF, this.y & 0xFF, this.z & 0xF);
}
public byte getLightFromBlocks() {
return (byte) chunk.getHandle().getBrightness(EnumSkyBlock.BLOCK, this.x & 0xF, this.y & 0x7F, this.z & 0xF);
return (byte) chunk.getHandle().getBrightness(EnumSkyBlock.BLOCK, this.x & 0xF, this.y & 0xFF, this.z & 0xF);
}