mirror of
https://github.com/Minestom/Minestom.git
synced 2024-09-27 14:13:24 +02:00
Small cleanup
This commit is contained in:
parent
d6c0a24bed
commit
9b8579eaf4
@ -1072,7 +1072,8 @@ public abstract class Entity implements Viewable, EventHandler, DataContainer, P
|
||||
|
||||
final Chunk lastChunk = instance.getChunkAt(lastX, lastZ);
|
||||
final Chunk newChunk = instance.getChunkAt(x, z);
|
||||
if (forceUpdate || (lastChunk != null && newChunk != null && lastChunk != newChunk)) {
|
||||
final boolean chunkChange = lastChunk != null && newChunk != null && lastChunk != newChunk;
|
||||
if (forceUpdate || chunkChange) {
|
||||
instance.switchEntityChunk(this, lastChunk, newChunk);
|
||||
if (this instanceof Player) {
|
||||
// Refresh player view
|
||||
|
@ -314,14 +314,14 @@ public abstract class EntityCreature extends LivingEntity implements NavigableEn
|
||||
|
||||
@Override
|
||||
public void pathFindingTick(float speed) {
|
||||
synchronized (pathLock){
|
||||
synchronized (pathLock) {
|
||||
NavigableEntity.super.pathFindingTick(speed);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean setPathTo(@Nullable Position position) {
|
||||
synchronized (pathLock){
|
||||
synchronized (pathLock) {
|
||||
return NavigableEntity.super.setPathTo(position);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user