Move config to annotation system

All old configs must be deleted for this to work properly. Since the rest
of the update is filled with world breaking changes, this should be fine.

Also some mapping updates

(cherry picked from commit d587a8c)
This commit is contained in:
Nicholas Ignoffo 2017-08-19 18:56:50 -07:00 committed by Nicholas Ignoffo
parent a10b2ece9a
commit d99cf77288
45 changed files with 320 additions and 561 deletions

View file

@ -51,7 +51,7 @@ public class EntityAIFollowOwner extends EntityAIBase {
return false;
} else if (this.thePet.isStationary()) {
return false;
} else if (this.thePet.getDistanceSqToEntity(entitylivingbase) < (double) (this.minDist * this.minDist)) {
} else if (this.thePet.getDistanceSq(entitylivingbase) < (double) (this.minDist * this.minDist)) {
return false;
} else {
this.theOwner = entitylivingbase;
@ -63,7 +63,7 @@ public class EntityAIFollowOwner extends EntityAIBase {
* Returns whether an in-progress EntityAIBase should continue executing
*/
public boolean continueExecuting() {
return !this.petPathfinder.noPath() && this.thePet.getDistanceSqToEntity(this.theOwner) > (double) (this.maxDist * this.maxDist) && !this.thePet.isStationary();
return !this.petPathfinder.noPath() && this.thePet.getDistanceSq(this.theOwner) > (double) (this.maxDist * this.maxDist) && !this.thePet.isStationary();
}
/**
@ -80,7 +80,7 @@ public class EntityAIFollowOwner extends EntityAIBase {
*/
public void resetTask() {
this.theOwner = null;
this.petPathfinder.clearPathEntity();
this.petPathfinder.clearPath();
this.thePet.setPathPriority(PathNodeType.WATER, this.oldWaterCost);
}
@ -102,7 +102,7 @@ public class EntityAIFollowOwner extends EntityAIBase {
if (!this.petPathfinder.tryMoveToEntityLiving(this.theOwner, this.followSpeed)) {
if (!this.thePet.getLeashed()) {
if (this.thePet.getDistanceSqToEntity(this.theOwner) >= 144.0D) {
if (this.thePet.getDistanceSq(this.theOwner) >= 144.0D) {
int i = MathHelper.floor(this.theOwner.posX) - 2;
int j = MathHelper.floor(this.theOwner.posZ) - 2;
int k = MathHelper.floor(this.theOwner.getEntityBoundingBox().minY);
@ -111,7 +111,7 @@ public class EntityAIFollowOwner extends EntityAIBase {
for (int i1 = 0; i1 <= 4; ++i1) {
if ((l < 1 || i1 < 1 || l > 3 || i1 > 3) && this.theWorld.getBlockState(new BlockPos(i + l, k - 1, j + i1)).isTopSolid() && this.isEmptyBlock(new BlockPos(i + l, k, j + i1)) && this.isEmptyBlock(new BlockPos(i + l, k + 1, j + i1))) {
this.thePet.setLocationAndAngles((double) ((float) (i + l) + 0.5F), (double) k, (double) ((float) (j + i1) + 0.5F), this.thePet.rotationYaw, this.thePet.rotationPitch);
this.petPathfinder.clearPathEntity();
this.petPathfinder.clearPath();
return;
}
}