mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-04 14:04:49 +01:00
Sped up teleporting even more, + fixed isSneaking
This commit is contained in:
parent
5f20de34a9
commit
d142fabfc1
2 changed files with 5 additions and 18 deletions
|
@ -127,27 +127,16 @@ public class PlayerManager {
|
||||||
int j1 = j - l;
|
int j1 = j - l;
|
||||||
|
|
||||||
// Craftbukkit start
|
// Craftbukkit start
|
||||||
if (!this.a(i, j, k, l)) {
|
if (i1 > 10 || i1 < -10 || j1 > 10 || j1 < -10) {
|
||||||
this.a(i, j, true).a(entityplayer);
|
b(entityplayer);
|
||||||
}
|
a(entityplayer);
|
||||||
|
return;
|
||||||
if (!this.a(i - i1, j - j1, i, j)) {
|
|
||||||
PlayerInstance playerinstance = this.a(i - i1, j - j1, false);
|
|
||||||
|
|
||||||
if (playerinstance != null) {
|
|
||||||
playerinstance.b(entityplayer);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
// Craftbukkit end
|
// Craftbukkit end
|
||||||
|
|
||||||
if (i1 != 0 || j1 != 0) {
|
if (i1 != 0 || j1 != 0) {
|
||||||
for (int k1 = i - 10; k1 <= i + 10; ++k1) {
|
for (int k1 = i - 10; k1 <= i + 10; ++k1) {
|
||||||
for (int l1 = j - 10; l1 <= j + 10; ++l1) {
|
for (int l1 = j - 10; l1 <= j + 10; ++l1) {
|
||||||
// Craftbukkit start
|
|
||||||
if ((k1 == i) && (l1 == j)) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
// Craftbukkit end
|
|
||||||
if (!this.a(k1, l1, k, l)) {
|
if (!this.a(k1, l1, k, l)) {
|
||||||
this.a(k1, l1, true).a(entityplayer);
|
this.a(k1, l1, true).a(entityplayer);
|
||||||
}
|
}
|
||||||
|
|
|
@ -170,9 +170,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||||
entity.a.e = newEntity;
|
entity.a.e = newEntity;
|
||||||
entity = newEntity;
|
entity = newEntity;
|
||||||
} else {
|
} else {
|
||||||
oldWorld.manager.b(entity);
|
|
||||||
entity.a.a(location.getX(), location.getY(), location.getZ(), location.getYaw(), location.getPitch());
|
entity.a.a(location.getX(), location.getY(), location.getZ(), location.getYaw(), location.getPitch());
|
||||||
newWorld.manager.a(entity);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -181,7 +179,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isSneaking() {
|
public boolean isSneaking() {
|
||||||
return entity.J();
|
return entity.U();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void updateInventory() {
|
public void updateInventory() {
|
||||||
|
|
Loading…
Reference in a new issue