Fixed the symmetry issues of the Ritual of Containment

This commit is contained in:
WayofTime 2016-09-21 07:37:48 -04:00
parent 9538e9aa0d
commit dade5f0837
3 changed files with 10 additions and 4 deletions

View file

@ -1,3 +1,8 @@
------------------------------------------------------
Version 2.1.0-64
------------------------------------------------------
- Fixed the symmetry issues of the Ritual of Containment
------------------------------------------------------
Version 2.1.0-63
------------------------------------------------------

View file

@ -90,9 +90,10 @@ public class EntityAIStealthRetreat extends EntityAIBase
public void updateTask()
{
ticksLeft--;
if (ticksLeft <= 0)
if (ticksLeft <= 0 || this.entity.getAttackTarget() == null)
{
this.entity.attackStateMachine = 0;
return;
}
if (this.entity.getDistanceSqToEntity(this.entity.getAttackTarget()) < 49.0D)

View file

@ -43,9 +43,9 @@ public class RitualContainment extends Ritual
if (entity instanceof EntityPlayer && (((EntityPlayer) entity).capabilities.isCreativeMode || PlayerHelper.getUUIDFromPlayer((EntityPlayer) entity).toString().equals(masterRitualStone.getOwner())))
continue;
double xDif = entity.posX - masterRitualStone.getBlockPos().getX() + 0.5;
double yDif = entity.posY - masterRitualStone.getBlockPos().getY() + 3;
double zDif = entity.posZ - masterRitualStone.getBlockPos().getZ() + 0.5;
double xDif = entity.posX - (masterRitualStone.getBlockPos().getX() + 0.5);
double yDif = entity.posY - (masterRitualStone.getBlockPos().getY() + 2.5);
double zDif = entity.posZ - (masterRitualStone.getBlockPos().getZ() + 0.5);
entity.motionX = -0.05 * xDif;
entity.motionY = -0.05 * yDif;