Clean up some stray 128 values and update the defaults

Dieser Commit ist enthalten in:
zml2008 2012-03-01 20:47:19 -08:00
Ursprung 87e40141c6
Commit 373e4b90c9
5 geänderte Dateien mit 74 neuen und 74 gelöschten Zeilen

Datei anzeigen

@ -49,7 +49,7 @@
<dependency>
<groupId>org.bukkit</groupId>
<artifactId>bukkit</artifactId>
<version>1.1-R5-SNAPSHOT</version>
<version>1.1-R6</version>
</dependency>
<!-- Archive reading library for snapshots -->

Datei anzeigen

@ -77,7 +77,7 @@ public abstract class LocalPlayer {
byte free = 0;
while (y <= 129) {
while (y <= world.getMaxY() + 2) {
if (BlockType.canPassThrough(world.getBlockType(new Vector(x, y, z)))) {
++free;
} else {
@ -142,7 +142,7 @@ public abstract class LocalPlayer {
byte free = 0;
byte spots = 0;
while (y <= 129) {
while (y <= world.getMaxY() + 2) {
if (BlockType.canPassThrough(world.getBlockType(new Vector(x, y, z)))) {
++free;
} else {
@ -266,7 +266,7 @@ public abstract class LocalPlayer {
int maxY = Math.min(getWorld().getMaxY() + 1, initialY + distance);
LocalWorld world = getPosition().getWorld();
while (y <= 129) {
while (y <= world.getMaxY() + 2) {
if (!BlockType.canPassThrough(world.getBlockType(new Vector(x, y, z)))) {
break; // Hit something
} else if (y > maxY + 1) {

Datei anzeigen

@ -370,7 +370,7 @@ public abstract class LocalWorld {
* @return
*/
public int getMaxY() {
return 127;
return 255;
}
/**

Datei anzeigen

@ -239,8 +239,8 @@ public class CuboidRegion extends AbstractRegion {
}
private void recalculate() {
pos1 = pos1.clampY(0, world == null ? 127 : world.getMaxY());
pos2 = pos2.clampY(0, world == null ? 127 : world.getMaxY());
pos1 = pos1.clampY(0, world == null ? 255 : world.getMaxY());
pos2 = pos2.clampY(0, world == null ? 255 : world.getMaxY());
}
@Override

Datei anzeigen

@ -123,8 +123,8 @@ public class Polygonal2DRegion extends AbstractRegion {
minY = Math.min(oldMinY, oldMaxY);
maxY = Math.max(oldMinY, oldMaxY);
minY = Math.min(Math.max(0, minY), world == null ? 127 : world.getMaxY());
maxY = Math.min(Math.max(0, maxY), world == null ? 127 : world.getMaxY());
minY = Math.min(Math.max(0, minY), world == null ? 255 : world.getMaxY());
maxY = Math.min(Math.max(0, maxY), world == null ? 255 : world.getMaxY());
min = new BlockVector(minX, minY, minZ);
max = new BlockVector(maxX, maxY, maxZ);