mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2025-01-26 18:11:49 +01:00
Initial update to 1.18.1
This commit is contained in:
parent
d1a1e7d3c2
commit
81404b4d41
@ -13,7 +13,7 @@
|
||||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<craftbukkit.version>1.18-R0.1-SNAPSHOT</craftbukkit.version>
|
||||
<craftbukkit.version>1.18.1-R0.1-SNAPSHOT</craftbukkit.version>
|
||||
<placeholderapi.version>2.10.9</placeholderapi.version>
|
||||
<citizensapi.version>${project.version}</citizensapi.version>
|
||||
<powermock.version>1.4.12</powermock.version>
|
||||
|
@ -12,7 +12,7 @@
|
||||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<craftbukkit.version>1.18-R0.1-SNAPSHOT</craftbukkit.version>
|
||||
<craftbukkit.version>1.18.1-R0.1-SNAPSHOT</craftbukkit.version>
|
||||
</properties>
|
||||
|
||||
<repositories>
|
||||
|
@ -337,11 +337,6 @@ public class PlayerNavigation extends PathNavigation {
|
||||
return new Vec3(this.mob.getX(), getSurfaceY(), this.mob.getZ());
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasDelayedRecomputation() {
|
||||
return this.hasDelayedRecomputation;
|
||||
}
|
||||
|
||||
protected boolean hasValidPathType(BlockPathTypes var0) {
|
||||
if ((var0 == BlockPathTypes.WATER) || (var0 == BlockPathTypes.LAVA) || (var0 == BlockPathTypes.OPEN))
|
||||
return false;
|
||||
@ -419,17 +414,6 @@ public class PlayerNavigation extends PathNavigation {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void recomputePath(BlockPos var0) {
|
||||
if (this.path == null || this.path.isDone() || this.path.getNodeCount() == 0)
|
||||
return;
|
||||
Node var1 = this.path.getEndNode();
|
||||
Vec3 var2 = new Vec3((var1.x + this.mob.getX()) / 2.0D, (var1.y + this.mob.getY()) / 2.0D,
|
||||
(var1.z + this.mob.getZ()) / 2.0D);
|
||||
if (var0.closerThan(var2, (this.path.getNodeCount() - this.path.getNextNodeIndex())))
|
||||
recomputePath();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void resetMaxVisitedNodesMultiplier() {
|
||||
this.maxVisitedNodesMultiplier = 1.0F;
|
||||
@ -473,6 +457,20 @@ public class PlayerNavigation extends PathNavigation {
|
||||
this.speedModifier = var0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldRecomputePath(BlockPos var0) {
|
||||
if (this.hasDelayedRecomputation) {
|
||||
return false;
|
||||
} else if (this.path != null && !this.path.isDone() && this.path.getNodeCount() != 0) {
|
||||
Node var1 = this.path.getEndNode();
|
||||
Vec3 var2 = new Vec3((var1.x + this.mob.getX()) / 2.0D, (var1.y + this.mob.getY()) / 2.0D,
|
||||
(var1.z + this.mob.getZ()) / 2.0D);
|
||||
return var0.closerThan(var2, this.path.getNodeCount() - this.path.getNextNodeIndex());
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
private boolean shouldTargetNextNodeInDirection(Vec3 var0) {
|
||||
if (this.path.getNextNodeIndex() + 1 >= this.path.getNodeCount())
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user