Allowed Teleposer to move FMP structures
This commit is contained in:
parent
6ad0d3b702
commit
acdaec4694
42 changed files with 140 additions and 132 deletions
|
@ -43,19 +43,19 @@ public class EntityDemonAIHurtByTarget extends EntityAIHurtByTarget
|
|||
((TEDemonPortal) portal).notifyDemons(taskOwner, this.taskOwner.getAITarget());
|
||||
}
|
||||
|
||||
// double d0 = this.getTargetDistance();
|
||||
// List list = this.taskOwner.worldObj.getEntitiesWithinAABB(this.taskOwner.getClass(), AxisAlignedBB.getBoundingBox(this.taskOwner.posX, this.taskOwner.posY, this.taskOwner.posZ, this.taskOwner.posX + 1.0D, this.taskOwner.posY + 1.0D, this.taskOwner.posZ + 1.0D).expand(d0, 10.0D, d0));
|
||||
// Iterator iterator = list.iterator();
|
||||
//
|
||||
// while (iterator.hasNext())
|
||||
// {
|
||||
// EntityCreature entitycreature = (EntityCreature)iterator.next();
|
||||
//
|
||||
// if (this.taskOwner != entitycreature && entitycreature.getAttackTarget() == null && !entitycreature.isOnSameTeam(this.taskOwner.getAITarget()))
|
||||
// {
|
||||
// entitycreature.setAttackTarget(this.taskOwner.getAITarget());
|
||||
// }
|
||||
// }
|
||||
double d0 = this.getTargetDistance();
|
||||
List list = this.taskOwner.worldObj.getEntitiesWithinAABB(this.taskOwner.getClass(), AxisAlignedBB.getBoundingBox(this.taskOwner.posX, this.taskOwner.posY, this.taskOwner.posZ, this.taskOwner.posX + 1.0D, this.taskOwner.posY + 1.0D, this.taskOwner.posZ + 1.0D).expand(d0, 10.0D, d0));
|
||||
Iterator iterator = list.iterator();
|
||||
|
||||
while (iterator.hasNext())
|
||||
{
|
||||
EntityCreature entitycreature = (EntityCreature)iterator.next();
|
||||
|
||||
if (this.taskOwner != entitycreature && entitycreature.getAttackTarget() == null && !entitycreature.isOnSameTeam(this.taskOwner.getAITarget()))
|
||||
{
|
||||
entitycreature.setAttackTarget(this.taskOwner.getAITarget());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
super.startExecuting();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue