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

@ -86,7 +86,7 @@ public class EntityAIAttackRangedBow extends EntityAIBase {
}
if (d0 <= (double) this.maxAttackDistance && this.seeTime >= 20) {
this.entity.getNavigator().clearPathEntity();
this.entity.getNavigator().clearPath();
++this.strafingTime;
} else {
this.entity.getNavigator().tryMoveToEntityLiving(entitylivingbase, this.moveSpeedAmp);

View file

@ -48,7 +48,7 @@ public class EntityAIEatAndCorruptBlock extends EntityAIBase {
public void startExecuting() {
this.eatingGrassTimer = 40;
this.world.setEntityState(this.grassEaterEntity, (byte) 10);
this.grassEaterEntity.getNavigator().clearPathEntity();
this.grassEaterEntity.getNavigator().clearPath();
}
/**

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;
}
}

View file

@ -85,7 +85,7 @@ public class EntityAIGrabEffectsFromOwner extends EntityAIBase {
*/
public void resetTask() {
this.theOwner = null;
this.petPathfinder.clearPathEntity();
this.petPathfinder.clearPath();
this.thePet.setPathPriority(PathNodeType.WATER, this.oldWaterCost);
}
@ -101,7 +101,7 @@ public class EntityAIGrabEffectsFromOwner extends EntityAIBase {
public void updateTask() {
this.thePet.getLookHelper().setLookPositionWithEntity(this.theOwner, 10.0F, (float) this.thePet.getVerticalFaceSpeed());
if (this.thePet.getDistanceSqToEntity(theOwner) < this.minDist * this.minDist) {
if (this.thePet.getDistanceSq(theOwner) < this.minDist * this.minDist) {
if (this.thePet.stealEffectsFromOwner(theOwner)) {
return;
}
@ -113,7 +113,7 @@ public class EntityAIGrabEffectsFromOwner 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);
@ -122,7 +122,7 @@ public class EntityAIGrabEffectsFromOwner 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;
}
}

View file

@ -91,7 +91,7 @@ public class EntityAIPickUpAlly extends EntityAIBase {
* Resets the task
*/
public void resetTask() {
this.entity.getNavigator().clearPathEntity();
this.entity.getNavigator().clearPath();
this.pickupTarget = null;
}

View file

@ -58,7 +58,7 @@ public class EntityAIProtectAlly extends EntityAIBase {
public void startExecuting() {
this.castTimer = 100;
this.world.setEntityState(this.entity, (byte) 53);
this.entity.getNavigator().clearPathEntity();
this.entity.getNavigator().clearPath();
}
/**

View file

@ -71,7 +71,7 @@ public class EntityAIRetreatToHeal<T extends Entity> extends EntityAIBase {
if (vec3d == null) {
return false; //Nowhere to run, gotta fight!
} else if (this.closestLivingEntity.getDistanceSq(vec3d.x, vec3d.y, vec3d.z) < this.closestLivingEntity.getDistanceSqToEntity(this.theEntity)) {
} else if (this.closestLivingEntity.getDistanceSq(vec3d.x, vec3d.y, vec3d.z) < this.closestLivingEntity.getDistanceSq(this.theEntity)) {
return false; //I'll be headed off if I choose this direction.
} else {
this.entityPathEntity = this.entityPathNavigate.getPathToXYZ(vec3d.x, vec3d.y, vec3d.z);
@ -112,13 +112,13 @@ public class EntityAIRetreatToHeal<T extends Entity> extends EntityAIBase {
@Override
public void updateTask() {
if (this.closestLivingEntity != null) {
if (this.theEntity.getDistanceSqToEntity(this.closestLivingEntity) < 49.0D) {
if (this.theEntity.getDistanceSq(this.closestLivingEntity) < 49.0D) {
this.theEntity.getNavigator().setSpeed(this.nearSpeed);
} else {
this.theEntity.getNavigator().setSpeed(this.farSpeed);
}
if (this.theEntity.ticksExisted % 20 == 0 && this.theEntity.getDistanceSqToEntity(this.closestLivingEntity) >= safeHealDistance * safeHealDistance) {
if (this.theEntity.ticksExisted % 20 == 0 && this.theEntity.getDistanceSq(this.closestLivingEntity) >= safeHealDistance * safeHealDistance) {
healEntity();
return;
}

View file

@ -47,7 +47,7 @@ public class EntityAIStealthRetreat extends EntityAIBase {
if (vec3d == null) {
return false;
} else if (attacked.getDistanceSq(vec3d.x, vec3d.y, vec3d.z) < attacked.getDistanceSqToEntity(this.entity)) {
} else if (attacked.getDistanceSq(vec3d.x, vec3d.y, vec3d.z) < attacked.getDistanceSq(this.entity)) {
return false;
} else {
this.entityPathEntity = this.entityPathNavigate.getPathToXYZ(vec3d.x, vec3d.y, vec3d.z);
@ -87,7 +87,7 @@ public class EntityAIStealthRetreat extends EntityAIBase {
return;
}
if (this.entity.getDistanceSqToEntity(this.entity.getAttackTarget()) < 49.0D) {
if (this.entity.getDistanceSq(this.entity.getAttackTarget()) < 49.0D) {
this.entity.getNavigator().setSpeed(this.nearSpeed);
} else {
this.entity.getNavigator().setSpeed(this.farSpeed);

View file

@ -93,7 +93,7 @@ public class EntityCorruptedSpider extends EntityAspectedDemonBase {
super.onUpdate();
if (!this.getEntityWorld().isRemote) {
this.setBesideClimbableBlock(this.isCollidedHorizontally);
this.setBesideClimbableBlock(this.collidedHorizontally);
}
}

View file

@ -215,7 +215,7 @@ public class EntityMimic extends EntityDemonBase {
super.onUpdate();
if (!this.getEntityWorld().isRemote) {
this.setBesideClimbableBlock(this.isCollidedHorizontally);
this.setBesideClimbableBlock(this.collidedHorizontally);
}
}

View file

@ -410,7 +410,7 @@ public class EntitySentientSpecter extends EntityDemonBase {
double d1 = target.getEntityBoundingBox().minY + (double) (target.height / 3.0F) - entitytippedarrow.posY;
double d2 = target.posZ - this.posZ;
double d3 = (double) MathHelper.sqrt(d0 * d0 + d2 * d2);
entitytippedarrow.setThrowableHeading(d0, d1 + d3 * 0.2, d2, 1.6F, 0); //TODO: Yes, it is an accurate arrow. Don't be hatin'
entitytippedarrow.shoot(d0, d1 + d3 * 0.2, d2, 1.6F, 0); //TODO: Yes, it is an accurate arrow. Don't be hatin'
int i = EnchantmentHelper.getMaxEnchantmentLevel(Enchantments.POWER, this);
int j = EnchantmentHelper.getMaxEnchantmentLevel(Enchantments.PUNCH, this);
entitytippedarrow.setDamage((double) (velocity * 2.0F) + this.rand.nextGaussian() * 0.25D + (double) ((float) this.getEntityWorld().getDifficulty().getDifficultyId() * 0.11F));

View file

@ -46,7 +46,7 @@ public class EntityBloodLight extends EntityThrowable implements IThrowableEntit
motionX = -MathHelper.sin(rotationYaw / 180.0F * (float) Math.PI) * MathHelper.cos(rotationPitch / 180.0F * (float) Math.PI);
motionZ = MathHelper.cos(rotationYaw / 180.0F * (float) Math.PI) * MathHelper.cos(rotationPitch / 180.0F * (float) Math.PI);
motionY = -MathHelper.sin(rotationPitch / 180.0F * (float) Math.PI);
this.setThrowableHeading(motionX, motionY, motionZ, par3 * 1.5F, 1.0F);
this.shoot(motionX, motionY, motionZ, par3 * 1.5F, 1.0F);
}
@Override
@ -55,7 +55,7 @@ public class EntityBloodLight extends EntityThrowable implements IThrowableEntit
}
@Override
public void setThrowableHeading(double var1, double var3, double var5, float var7, float var8) {
public void shoot(double var1, double var3, double var5, float var7, float var8) {
float var9 = MathHelper.sqrt(var1 * var1 + var3 * var3 + var5 * var5);
var1 /= var9;
var3 /= var9;