Merge branch '1.15.2' into 1.16.4

This commit is contained in:
Leijurv 2021-02-02 17:09:56 -08:00
commit 98da144691
No known key found for this signature in database
GPG Key ID: 44A3EA646EADAC6A
2 changed files with 5 additions and 5 deletions

View File

@ -164,8 +164,8 @@ repositories {
mavenCentral()
maven {
name = 'spongepowered-repo'
url = 'http://repo.spongepowered.org/maven/'
name = 'SpongePowered'
url = 'https://repo.spongepowered.org/repository/maven-public/'
}
maven {
name = 'impactdevelopment-repo'

View File

@ -31,7 +31,7 @@ public class GoalRunAway implements Goal {
private final BlockPos[] from;
private final double distanceSq;
private final int distanceSq;
private final Integer maintainY;
@ -44,7 +44,7 @@ public class GoalRunAway implements Goal {
throw new IllegalArgumentException();
}
this.from = from;
this.distanceSq = distance * distance;
this.distanceSq = (int) (distance * distance);
this.maintainY = maintainY;
}
@ -56,7 +56,7 @@ public class GoalRunAway implements Goal {
for (BlockPos p : from) {
int diffX = x - p.getX();
int diffZ = z - p.getZ();
double distSq = diffX * diffX + diffZ * diffZ;
int distSq = diffX * diffX + diffZ * diffZ;
if (distSq < distanceSq) {
return false;
}