Cleanup and a few bugfixes
This commit is contained in:
@@ -240,8 +240,7 @@ public abstract class LocalPlayer {
|
||||
// Found a ceiling!
|
||||
if (!BlockType.canPassThrough(world.getBlockType(new Vector(x, y, z)))) {
|
||||
int platformY = Math.max(initialY, y - 3 - clearance);
|
||||
world.setBlockType(new Vector(x, platformY, z),
|
||||
BlockID.GLASS);
|
||||
world.setBlockType(new Vector(x, platformY, z), BlockID.GLASS);
|
||||
setPosition(new Vector(x + 0.5, platformY + 1, z + 0.5));
|
||||
return true;
|
||||
}
|
||||
@@ -273,8 +272,7 @@ public abstract class LocalPlayer {
|
||||
} else if (y > maxY + 1) {
|
||||
break;
|
||||
} else if (y == maxY + 1) {
|
||||
world.setBlockType(new Vector(x, y - 2, z),
|
||||
BlockID.GLASS);
|
||||
world.setBlockType(new Vector(x, y - 2, z), BlockID.GLASS);
|
||||
setPosition(new Vector(x + 0.5, y - 1, z + 0.5));
|
||||
return true;
|
||||
}
|
||||
@@ -351,10 +349,12 @@ public abstract class LocalPlayer {
|
||||
* @return
|
||||
*/
|
||||
public PlayerDirection getCardinalDirection() {
|
||||
if (getPitch() > 67.5)
|
||||
if (getPitch() > 67.5) {
|
||||
return PlayerDirection.DOWN;
|
||||
if (getPitch() < -67.5)
|
||||
}
|
||||
if (getPitch() < -67.5) {
|
||||
return PlayerDirection.UP;
|
||||
}
|
||||
|
||||
// From hey0's code
|
||||
double rot = (getYaw() - 90) % 360;
|
||||
|
||||
Reference in New Issue
Block a user