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

@@ -66,7 +66,7 @@ public class PortalTravelAgent {
for (int k1 = i1 - short1; k1 <= i1 + short1; ++k1) {
double d3 = (double) k1 + 0.5D - entity.locZ;
for (int l1 = 127; l1 >= 0; --l1) {
for (int l1 = 255; l1 >= 0; --l1) { // CraftBukkit - 127 -> 255
if (world.getTypeId(j1, l1, k1) == Block.PORTAL.id) {
while (world.getTypeId(j1, l1 - 1, k1) == Block.PORTAL.id) {
--l1;
@@ -150,7 +150,7 @@ public class PortalTravelAgent {
d2 = (double) j2 + 0.5D - entity.locZ;
label274:
for (l2 = 127; l2 >= 0; --l2) {
for (l2 = 255; l2 >= 0; --l2) { // CraftBukkit - 127 -> 255
if (world.isEmpty(i2, l2, j2)) {
while (l2 > 0 && world.isEmpty(i2, l2 - 1, j2)) {
--l2;
@@ -201,7 +201,7 @@ public class PortalTravelAgent {
d2 = (double) j2 + 0.5D - entity.locZ;
label222:
for (l2 = 127; l2 >= 0; --l2) {
for (l2 = 255; l2 >= 0; --l2) { // CraftBukkit - 127 -> 255
if (world.isEmpty(i2, l2, j2)) {
while (l2 > 0 && world.isEmpty(i2, l2 - 1, j2)) {
--l2;

View File

@@ -1923,7 +1923,7 @@ public class World implements IBlockAccess {
int k = this.g >> 2;
int l = k & 15;
int i1 = k >> 8 & 15;
int j1 = k >> 16 & 127;
int j1 = k >> 16 & 255; // CraftBukkit - 127 -> 255
int k1 = chunk.getTypeId(l, j1, i1);
l += i;