geforkt von Mirrors/FastAsyncWorldEdit
Made findFreePosition and setOnGround respect half-blocks and such.
Dieser Commit ist enthalten in:
Ursprung
aaa01eb608
Commit
edcccfce5f
@ -86,7 +86,10 @@ public abstract class LocalPlayer {
|
|||||||
|
|
||||||
if (free == 2) {
|
if (free == 2) {
|
||||||
if (y - 1 != origY) {
|
if (y - 1 != origY) {
|
||||||
setPosition(new Vector(x + 0.5, y - 1, z + 0.5));
|
final Vector pos = new Vector(x, y - 2, z);
|
||||||
|
final int id = world.getBlockType(pos);
|
||||||
|
final int data = world.getBlockData(pos);
|
||||||
|
setPosition(new Vector(x + 0.5, y - 2 + BlockType.centralTopLimit(id, data), z + 0.5));
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
@ -108,8 +111,11 @@ public abstract class LocalPlayer {
|
|||||||
int z = searchPos.getBlockZ();
|
int z = searchPos.getBlockZ();
|
||||||
|
|
||||||
while (y >= 0) {
|
while (y >= 0) {
|
||||||
if (!BlockType.canPassThrough(world.getBlockType(new Vector(x, y, z)))) {
|
final Vector pos = new Vector(x, y, z);
|
||||||
setPosition(new Vector(x + 0.5, y + 1, z + 0.5));
|
final int id = world.getBlockType(pos);
|
||||||
|
if (!BlockType.canPassThrough(id)) {
|
||||||
|
final int data = world.getBlockData(pos);
|
||||||
|
setPosition(new Vector(x + 0.5, y + BlockType.centralTopLimit(id, data), z + 0.5));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren