Java 类net.minecraft.entity.ai.RandomPositionGenerator 实例源码

项目:Overlord    文件:EntityAIWanderBase.java   
@Override
public boolean shouldExecute() {
    if (this.mayNotUpdate && this.entity.getRNG().nextInt(this.executionChance) != 0)
        return false;

    Vec3d vec3d = RandomPositionGenerator.findRandomTarget(this.entity, 10, 7);
    int wanderTargetAttempts = 0;
    while (wanderTargetAttempts < 10 && (vec3d == null || !entity.isWithinHomeDistanceFromPosition(new BlockPos(vec3d)))) {
        vec3d = RandomPositionGenerator.findRandomTarget(this.entity, 12, 8);
        wanderTargetAttempts++;
    }

    if (vec3d == null || wanderTargetAttempts >= 10)
        return false;
    else {
        this.xPosition = vec3d.x;
        this.yPosition = vec3d.y;
        this.zPosition = vec3d.z;
        this.mayNotUpdate = true;
        return true;
    }
}
项目:ToroQuest    文件:EntityAIMoveIntoArea.java   
public boolean shouldExecute() {

        if (!enabled) {
            return false;
        }

        if (inCorrectPosition()) {
            return false;
        }

        Vec3d vec3d = RandomPositionGenerator.findRandomTargetBlockTowards(this.entity, 16, 7, new Vec3d((double) centerX, (double) entity.posY, (double) centerZ));

        if (vec3d == null) {
            return false;
        } else {
            this.movePosX = vec3d.x;
            this.movePosY = vec3d.y;
            this.movePosZ = vec3d.z;
            return true;
        }

    }
项目:TAIGA    文件:EntityAIPermanentPanic.java   
/**
 * Returns whether the EntityAIBase should begin execution.
 */
public boolean shouldExecute() {

    Vec3d vec3d = RandomPositionGenerator.findRandomTarget(this.theEntityCreature, 5, 4);

    if (vec3d == null) {
        return false;
    } else {
        this.randPosX = vec3d.x;
        this.randPosY = vec3d.y;
        this.randPosZ = vec3d.z;

        if (this.theEntityCreature.isBurning()) {
            BlockPos blockpos = this.getRandPos(this.theEntityCreature.world, this.theEntityCreature, 5, 4);

            if (blockpos != null) {
                this.randPosX = (double) blockpos.getX();
                this.randPosY = (double) blockpos.getY();
                this.randPosZ = (double) blockpos.getZ();
            }
        }

        return true;
    }

}
项目:FiveNightsAtFreddysUniverseMod    文件:EntityBonnieAIMoveTowardsRestriction.java   
public boolean shouldExecute()
{
    if (this.theEntity.isWithinHomeDistanceCurrentPosition())
    {
        return false;
    }
    else
    {
        ChunkCoordinates chunkcoordinates = this.theEntity.getHomePosition();
        Vec3 vec3 = RandomPositionGenerator.findRandomTargetBlockTowards(this.theEntity, 16, 7, Vec3.createVectorHelper((double)chunkcoordinates.posX, (double)chunkcoordinates.posY, (double)chunkcoordinates.posZ));

        if (vec3 == null)
        {
            return false;
        }
        else
        {
            this.movePosX = vec3.xCoord;
            this.movePosY = vec3.yCoord;
            this.movePosZ = vec3.zCoord;
            return true;
        }
    }
}
项目:FiveNightsAtFreddysUniverseMod    文件:EntityCandyAIMoveTowardsRestriction.java   
public boolean shouldExecute()
{
    if (this.theEntity.isWithinHomeDistanceCurrentPosition())
    {
        return false;
    }
    else
    {
        ChunkCoordinates chunkcoordinates = this.theEntity.getHomePosition();
        Vec3 vec3 = RandomPositionGenerator.findRandomTargetBlockTowards(this.theEntity, 16, 7, Vec3.createVectorHelper((double)chunkcoordinates.posX, (double)chunkcoordinates.posY, (double)chunkcoordinates.posZ));

        if (vec3 == null)
        {
            return false;
        }
        else
        {
            this.movePosX = vec3.xCoord;
            this.movePosY = vec3.yCoord;
            this.movePosZ = vec3.zCoord;
            return true;
        }
    }
}
项目:FiveNightsAtFreddysUniverseMod    文件:EntityChicaAIMoveTowardsRestriction.java   
public boolean shouldExecute()
{
    if (this.theEntity.isWithinHomeDistanceCurrentPosition())
    {
        return false;
    }
    else
    {
        ChunkCoordinates chunkcoordinates = this.theEntity.getHomePosition();
        Vec3 vec3 = RandomPositionGenerator.findRandomTargetBlockTowards(this.theEntity, 16, 7, Vec3.createVectorHelper((double)chunkcoordinates.posX, (double)chunkcoordinates.posY, (double)chunkcoordinates.posZ));

        if (vec3 == null)
        {
            return false;
        }
        else
        {
            this.movePosX = vec3.xCoord;
            this.movePosY = vec3.yCoord;
            this.movePosZ = vec3.zCoord;
            return true;
        }
    }
}
项目:FiveNightsAtFreddysUniverseMod    文件:EntityFredbearAIMoveTowardsRestriction.java   
public boolean shouldExecute()
{
    if (this.theEntity.isWithinHomeDistanceCurrentPosition())
    {
        return false;
    }
    else
    {
        ChunkCoordinates chunkcoordinates = this.theEntity.getHomePosition();
        Vec3 vec3 = RandomPositionGenerator.findRandomTargetBlockTowards(this.theEntity, 16, 7, Vec3.createVectorHelper((double)chunkcoordinates.posX, (double)chunkcoordinates.posY, (double)chunkcoordinates.posZ));

        if (vec3 == null)
        {
            return false;
        }
        else
        {
            this.movePosX = vec3.xCoord;
            this.movePosY = vec3.yCoord;
            this.movePosZ = vec3.zCoord;
            return true;
        }
    }
}
项目:FiveNightsAtFreddysUniverseMod    文件:EntitySpringbonnieAIMoveTowardsRestriction.java   
public boolean shouldExecute()
{
    if (this.theEntity.isWithinHomeDistanceCurrentPosition())
    {
        return false;
    }
    else
    {
        ChunkCoordinates chunkcoordinates = this.theEntity.getHomePosition();
        Vec3 vec3 = RandomPositionGenerator.findRandomTargetBlockTowards(this.theEntity, 16, 7, Vec3.createVectorHelper((double)chunkcoordinates.posX, (double)chunkcoordinates.posY, (double)chunkcoordinates.posZ));

        if (vec3 == null)
        {
            return false;
        }
        else
        {
            this.movePosX = vec3.xCoord;
            this.movePosY = vec3.yCoord;
            this.movePosZ = vec3.zCoord;
            return true;
        }
    }
}
项目:FiveNightsAtFreddysUniverseMod    文件:EntityTBonnieAIMoveTowardsRestriction.java   
public boolean shouldExecute()
{
    if (this.theEntity.isWithinHomeDistanceCurrentPosition())
    {
        return false;
    }
    else
    {
        ChunkCoordinates chunkcoordinates = this.theEntity.getHomePosition();
        Vec3 vec3 = RandomPositionGenerator.findRandomTargetBlockTowards(this.theEntity, 16, 7, Vec3.createVectorHelper((double)chunkcoordinates.posX, (double)chunkcoordinates.posY, (double)chunkcoordinates.posZ));

        if (vec3 == null)
        {
            return false;
        }
        else
        {
            this.movePosX = vec3.xCoord;
            this.movePosY = vec3.yCoord;
            this.movePosZ = vec3.zCoord;
            return true;
        }
    }
}
项目:FiveNightsAtFreddysUniverseMod    文件:EntityWBonnieAIMoveTowardsRestriction.java   
public boolean shouldExecute()
{
    if (this.theEntity.isWithinHomeDistanceCurrentPosition())
    {
        return false;
    }
    else
    {
        ChunkCoordinates chunkcoordinates = this.theEntity.getHomePosition();
        Vec3 vec3 = RandomPositionGenerator.findRandomTargetBlockTowards(this.theEntity, 16, 7, Vec3.createVectorHelper((double)chunkcoordinates.posX, (double)chunkcoordinates.posY, (double)chunkcoordinates.posZ));

        if (vec3 == null)
        {
            return false;
        }
        else
        {
            this.movePosX = vec3.xCoord;
            this.movePosY = vec3.yCoord;
            this.movePosZ = vec3.zCoord;
            return true;
        }
    }
}
项目:FiveNightsAtFreddysUniverseMod    文件:EntityPuppetAIMoveTowardsRestriction.java   
public boolean shouldExecute()
{
    if (this.theEntity.isWithinHomeDistanceCurrentPosition())
    {
        return false;
    }
    else
    {
        ChunkCoordinates chunkcoordinates = this.theEntity.getHomePosition();
        Vec3 vec3 = RandomPositionGenerator.findRandomTargetBlockTowards(this.theEntity, 16, 7, Vec3.createVectorHelper((double)chunkcoordinates.posX, (double)chunkcoordinates.posY, (double)chunkcoordinates.posZ));

        if (vec3 == null)
        {
            return false;
        }
        else
        {
            this.movePosX = vec3.xCoord;
            this.movePosY = vec3.yCoord;
            this.movePosZ = vec3.zCoord;
            return true;
        }
    }
}
项目:FiveNightsAtFreddysUniverseMod    文件:EntitySpringtrapAIMoveTowardsRestriction.java   
public boolean shouldExecute()
{
    if (this.theEntity.isWithinHomeDistanceCurrentPosition())
    {
        return false;
    }
    else
    {
        ChunkCoordinates chunkcoordinates = this.theEntity.getHomePosition();
        Vec3 vec3 = RandomPositionGenerator.findRandomTargetBlockTowards(this.theEntity, 16, 7, Vec3.createVectorHelper((double)chunkcoordinates.posX, (double)chunkcoordinates.posY, (double)chunkcoordinates.posZ));

        if (vec3 == null)
        {
            return false;
        }
        else
        {
            this.movePosX = vec3.xCoord;
            this.movePosY = vec3.yCoord;
            this.movePosZ = vec3.zCoord;
            return true;
        }
    }
}
项目:FiveNightsAtFreddysUniverseMod    文件:EntityFoxyAIMoveTowardsRestriction.java   
public boolean shouldExecute()
{
    if (this.theEntity.isWithinHomeDistanceCurrentPosition())
    {
        return false;
    }
    else
    {
        ChunkCoordinates chunkcoordinates = this.theEntity.getHomePosition();
        Vec3 vec3 = RandomPositionGenerator.findRandomTargetBlockTowards(this.theEntity, 16, 7, Vec3.createVectorHelper((double)chunkcoordinates.posX, (double)chunkcoordinates.posY, (double)chunkcoordinates.posZ));

        if (vec3 == null)
        {
            return false;
        }
        else
        {
            this.movePosX = vec3.xCoord;
            this.movePosY = vec3.yCoord;
            this.movePosZ = vec3.zCoord;
            return true;
        }
    }
}
项目:FiveNightsAtFreddysUniverseMod    文件:EntityTFreddyAIMoveTowardsRestriction.java   
public boolean shouldExecute()
{
    if (this.theEntity.isWithinHomeDistanceCurrentPosition())
    {
        return false;
    }
    else
    {
        ChunkCoordinates chunkcoordinates = this.theEntity.getHomePosition();
        Vec3 vec3 = RandomPositionGenerator.findRandomTargetBlockTowards(this.theEntity, 16, 7, Vec3.createVectorHelper((double)chunkcoordinates.posX, (double)chunkcoordinates.posY, (double)chunkcoordinates.posZ));

        if (vec3 == null)
        {
            return false;
        }
        else
        {
            this.movePosX = vec3.xCoord;
            this.movePosY = vec3.yCoord;
            this.movePosZ = vec3.zCoord;
            return true;
        }
    }
}
项目:FiveNightsAtFreddysUniverseMod    文件:EntityMinirinaAIMoveTowardsRestriction.java   
public boolean shouldExecute()
{
    if (this.theEntity.isWithinHomeDistanceCurrentPosition())
    {
        return false;
    }
    else
    {
        ChunkCoordinates chunkcoordinates = this.theEntity.getHomePosition();
        Vec3 vec3 = RandomPositionGenerator.findRandomTargetBlockTowards(this.theEntity, 16, 7, Vec3.createVectorHelper((double)chunkcoordinates.posX, (double)chunkcoordinates.posY, (double)chunkcoordinates.posZ));

        if (vec3 == null)
        {
            return false;
        }
        else
        {
            this.movePosX = vec3.xCoord;
            this.movePosY = vec3.yCoord;
            this.movePosZ = vec3.zCoord;
            return true;
        }
    }
}
项目:FiveNightsAtFreddysUniverseMod    文件:EntityFuntimeFreddyAIMoveTowardsRestriction.java   
public boolean shouldExecute()
{
    if (this.theEntity.isWithinHomeDistanceCurrentPosition())
    {
        return false;
    }
    else
    {
        ChunkCoordinates chunkcoordinates = this.theEntity.getHomePosition();
        Vec3 vec3 = RandomPositionGenerator.findRandomTargetBlockTowards(this.theEntity, 16, 7, Vec3.createVectorHelper((double)chunkcoordinates.posX, (double)chunkcoordinates.posY, (double)chunkcoordinates.posZ));

        if (vec3 == null)
        {
            return false;
        }
        else
        {
            this.movePosX = vec3.xCoord;
            this.movePosY = vec3.yCoord;
            this.movePosZ = vec3.zCoord;
            return true;
        }
    }
}
项目:FiveNightsAtFreddysUniverseMod    文件:EntityPre_MangleAIMoveTowardsRestriction.java   
public boolean shouldExecute()
{
    if (this.theEntity.isWithinHomeDistanceCurrentPosition())
    {
        return false;
    }
    else
    {
        ChunkCoordinates chunkcoordinates = this.theEntity.getHomePosition();
        Vec3 vec3 = RandomPositionGenerator.findRandomTargetBlockTowards(this.theEntity, 16, 7, Vec3.createVectorHelper((double)chunkcoordinates.posX, (double)chunkcoordinates.posY, (double)chunkcoordinates.posZ));

        if (vec3 == null)
        {
            return false;
        }
        else
        {
            this.movePosX = vec3.xCoord;
            this.movePosY = vec3.yCoord;
            this.movePosZ = vec3.zCoord;
            return true;
        }
    }
}
项目:FiveNightsAtFreddysUniverseMod    文件:EntityWFreddyAIMoveTowardsRestriction.java   
public boolean shouldExecute()
{
    if (this.theEntity.isWithinHomeDistanceCurrentPosition())
    {
        return false;
    }
    else
    {
        ChunkCoordinates chunkcoordinates = this.theEntity.getHomePosition();
        Vec3 vec3 = RandomPositionGenerator.findRandomTargetBlockTowards(this.theEntity, 16, 7, Vec3.createVectorHelper((double)chunkcoordinates.posX, (double)chunkcoordinates.posY, (double)chunkcoordinates.posZ));

        if (vec3 == null)
        {
            return false;
        }
        else
        {
            this.movePosX = vec3.xCoord;
            this.movePosY = vec3.yCoord;
            this.movePosZ = vec3.zCoord;
            return true;
        }
    }
}
项目:FiveNightsAtFreddysUniverseMod    文件:EntityFreddyAIMoveTowardsRestriction.java   
public boolean shouldExecute()
{
    if (this.theEntity.isWithinHomeDistanceCurrentPosition())
    {
        return false;
    }
    else
    {
        ChunkCoordinates chunkcoordinates = this.theEntity.getHomePosition();
        Vec3 vec3 = RandomPositionGenerator.findRandomTargetBlockTowards(this.theEntity, 16, 7, Vec3.createVectorHelper((double)chunkcoordinates.posX, (double)chunkcoordinates.posY, (double)chunkcoordinates.posZ));

        if (vec3 == null)
        {
            return false;
        }
        else
        {
            this.movePosX = vec3.xCoord;
            this.movePosY = vec3.yCoord;
            this.movePosZ = vec3.zCoord;
            return true;
        }
    }
}
项目:FiveNightsAtFreddysUniverseMod    文件:EntityGoldenFreddyAIMoveTowardsRestriction.java   
public boolean shouldExecute()
{
    if (this.theEntity.isWithinHomeDistanceCurrentPosition())
    {
        return false;
    }
    else
    {
        ChunkCoordinates chunkcoordinates = this.theEntity.getHomePosition();
        Vec3 vec3 = RandomPositionGenerator.findRandomTargetBlockTowards(this.theEntity, 16, 7, Vec3.createVectorHelper((double)chunkcoordinates.posX, (double)chunkcoordinates.posY, (double)chunkcoordinates.posZ));

        if (vec3 == null)
        {
            return false;
        }
        else
        {
            this.movePosX = vec3.xCoord;
            this.movePosY = vec3.yCoord;
            this.movePosZ = vec3.zCoord;
            return true;
        }
    }
}
项目:Herdcraft    文件:EntityAIHerdPanic.java   
/**
 * Returns whether the EntityAIBase should begin execution.
 */
public boolean shouldExecute()
{
    Herd myHerd = HerdCraft.herdCollectionObj.handleNearestHerdOrMakeNew(entity, entityEffectiveClass, minBreed, maxBreed, baseBreed, varBreed); 
    if (this.entity.getAITarget() != null)
    {
        myHerd.setEnemy(entity.getAITarget());
    }
    if (myHerd.getEnemy() == null)
    {
        return false;
    }

    Vec3 pathTo = RandomPositionGenerator.findRandomTarget(this.entity, 5, 4);
    if (pathTo == null)
    {
        return false;
    }
    else
    {
        this.randPosX = pathTo.xCoord;
        this.randPosY = pathTo.yCoord;
        this.randPosZ = pathTo.zCoord;
        return this.entity.getNavigator().tryMoveToXYZ(this.randPosX, this.randPosY, this.randPosZ, this.speed);
    }
}
项目:Herdcraft    文件:EntityAIHerdStampede.java   
/**
 * Returns whether the EntityAIBase should begin execution.
 */
public boolean shouldExecute()
{
    Herd myHerd = HerdCraft.herdCollectionObj.handleNearestHerdOrMakeNew(entity, entityEffectiveClass, minBreed, maxBreed, baseBreed, varBreed); 
    if (this.entity.getAITarget() != null)
    {
        myHerd.setEnemy(entity.getAITarget());
    }
    if (myHerd.getEnemy() == null)
    {
        return false;
    }

    Vec3 var1 = RandomPositionGenerator.findRandomTargetBlockTowards(this.entity, 15, 4, Vec3.createVectorHelper(entity.posX + myHerd.fleeIn.xCoord * 30.0d, entity.posY, entity.posZ + myHerd.fleeIn.zCoord * 30.0d));
    if (var1 == null)
    {
        return false;
    }
    fleeX = var1.xCoord;
    fleeY = var1.yCoord;
    fleeZ = var1.zCoord;
    return true;
}
项目:Imperium    文件:EntityAIFlockMentality.java   
/**
 * Returns whether the EntityAIBase should begin execution.
 */
public boolean shouldExecute() {
    if (this.entity.getAge() >= 100)
        return false;
    else if (this.entity.getRNG().nextInt(120) != 0)
        return false;
    else {
        Vec3 vec3 = RandomPositionGenerator.findRandomTarget(this.entity, 10, 7);
        if (vec3 == null)
            return false;
        else {
            this.xPos = vec3.xCoord;
            this.yPos = vec3.yCoord;
            this.zPos = vec3.zCoord;
            return true;
        }
    }
}
项目:Sophisticated-wolves    文件:EntityAIAvoidFire.java   
/**
 * Returns whether the EntityAIBase should begin execution.
 */
@Override
public boolean shouldExecute() {
    if (!this.entity.onGround) {
        return false;
    }

    Vec3d vec3d = RandomPositionGenerator.findRandomTarget(entity, 10, 7);

    if (vec3d == null) {
        return false;
    } else {
        this.xPath = vec3d.x;
        this.yPath = vec3d.y;
        this.zPath = vec3d.z;
        return this.theWorld.isFlammableWithin(this.entity.getEntityBoundingBox().contract(0.001, 0.001, 0.001));
    }
}
项目:Blockbender    文件:EntityAIWanderInTown.java   
@Override
public boolean shouldExecute() {

    if ((Math.abs(this.entity.posX - this.entity.xOrigin) <= entity.radiusOfTown) && (Math.abs(this.entity.posY - this.entity.yOrigin) <= entity.radiusOfTown) && (Math.abs(this.entity.posZ - this.entity.zOrigin) <= entity.radiusOfTown)) {
        Vec3 var1 = RandomPositionGenerator.findRandomTarget(this.entity, 10, 7);
        if (var1 == null) {
            return false;
        }
        else {
            if ((Math.abs(var1.xCoord - entity.xOrigin) <= entity.radiusOfTown) && (Math.abs(var1.yCoord - entity.yOrigin) <= entity.radiusOfTown) && (Math.abs(var1.zCoord - entity.zOrigin) <= entity.radiusOfTown)) {
                this.xPosition = var1.xCoord;
                this.yPosition = var1.yCoord;
                this.zPosition = var1.zCoord;
            }
            return true;
        }
    }
    else {
        this.xPosition = this.entity.xOrigin;
        this.yPosition = this.entity.yOrigin;
        this.zPosition = this.entity.zOrigin;
        return true;
    }

}
项目:Rubedo    文件:EntityAITweakedWandering.java   
/**
 * Returns whether the EntityAIBase should begin execution.
 */
@Override
public boolean shouldExecute() {
    if (this.entity.getRNG().nextInt(120) != 0) {
        return false;
    } else {
        Vec3 var1 = RandomPositionGenerator.findRandomTarget(this.entity,
                10, 7);

        if (var1 == null) {
            return false;
        } else {
            this.xPosition = var1.xCoord;
            this.yPosition = var1.yCoord;
            this.zPosition = var1.zCoord;
            return true;
        }
    }
}
项目:RuneCraftery    文件:EntityAIPlay.java   
public void func_75246_d() {
   --this.field_75259_d;
   if(this.field_75260_b != null) {
      if(this.field_75262_a.func_70068_e(this.field_75260_b) > 4.0D) {
         this.field_75262_a.func_70661_as().func_75497_a(this.field_75260_b, this.field_75261_c);
      }
   } else if(this.field_75262_a.func_70661_as().func_75500_f()) {
      Vec3 var1 = RandomPositionGenerator.func_75463_a(this.field_75262_a, 16, 3);
      if(var1 == null) {
         return;
      }

      this.field_75262_a.func_70661_as().func_75492_a(var1.field_72450_a, var1.field_72448_b, var1.field_72449_c, this.field_75261_c);
   }

}
项目:RuneCraftery    文件:EntityAIMoveTowardsRestriction.java   
public boolean func_75250_a() {
   if(this.field_75436_a.func_110173_bK()) {
      return false;
   } else {
      ChunkCoordinates var1 = this.field_75436_a.func_110172_bL();
      Vec3 var2 = RandomPositionGenerator.func_75464_a(this.field_75436_a, 16, 7, this.field_75436_a.field_70170_p.func_82732_R().func_72345_a((double)var1.field_71574_a, (double)var1.field_71572_b, (double)var1.field_71573_c));
      if(var2 == null) {
         return false;
      } else {
         this.field_75434_b = var2.field_72450_a;
         this.field_75435_c = var2.field_72448_b;
         this.field_75432_d = var2.field_72449_c;
         return true;
      }
   }
}
项目:RuneCraftery    文件:EntityAIWander.java   
public boolean func_75250_a() {
   if(this.field_75457_a.func_70654_ax() >= 100) {
      return false;
   } else if(this.field_75457_a.func_70681_au().nextInt(120) != 0) {
      return false;
   } else {
      Vec3 var1 = RandomPositionGenerator.func_75463_a(this.field_75457_a, 10, 7);
      if(var1 == null) {
         return false;
      } else {
         this.field_75455_b = var1.field_72450_a;
         this.field_75456_c = var1.field_72448_b;
         this.field_75453_d = var1.field_72449_c;
         return true;
      }
   }
}
项目:RuneCraftery    文件:EntityAIMoveTowardsTarget.java   
public boolean func_75250_a() {
   this.field_75429_b = this.field_75431_a.func_70638_az();
   if(this.field_75429_b == null) {
      return false;
   } else if(this.field_75429_b.func_70068_e(this.field_75431_a) > (double)(this.field_75426_g * this.field_75426_g)) {
      return false;
   } else {
      Vec3 var1 = RandomPositionGenerator.func_75464_a(this.field_75431_a, 16, 7, this.field_75431_a.field_70170_p.func_82732_R().func_72345_a(this.field_75429_b.field_70165_t, this.field_75429_b.field_70163_u, this.field_75429_b.field_70161_v));
      if(var1 == null) {
         return false;
      } else {
         this.field_75430_c = var1.field_72450_a;
         this.field_75427_d = var1.field_72448_b;
         this.field_75428_e = var1.field_72449_c;
         return true;
      }
   }
}
项目:EnderZoo    文件:EntityAIFlyingPanic.java   
@Override
public boolean shouldExecute() {
  if (theEntityCreature.getRevengeTarget() == null && !theEntityCreature.isBurning()) {
    return false;
  }
  Vec3d vec3 = RandomPositionGenerator.findRandomTarget(theEntityCreature, 5, 4);
  if (vec3 == null) {
    return false;
  }
  double yOffset = 1 + theEntityCreature.getEntityWorld().rand.nextInt(3);
  //double yOffset = 0;
  randPosX = vec3.x;
  randPosY = vec3.y + yOffset;
  randPosZ = vec3.z;
  return true;
}
项目:EnderZoo    文件:EntityAIFlyingShortWander.java   
@Override
public boolean shouldExecute() {
  int chance = executionChance;
  if (isOnLeaves()) {
    chance *= 2;
  }
  if (entity.getRNG().nextInt(chance) != 0) {
    return false;
  }

  Vec3d vec3 = RandomPositionGenerator.findRandomTarget(entity, 4, 2);    
  if (vec3 == null || entity.posY - vec3.y < -2) {
    return false;
  }    
  randPosX = vec3.x;
  randPosY = vec3.y;
  randPosZ = vec3.z;
  return true;
}
项目:WuppyMods    文件:EntityAIFleeOnHurt.java   
/**
 * Returns whether the EntityAIBase should begin execution.
 */
@Override
public boolean shouldExecute()
{
    if (this.theEntityCreature.getHealth() > 4F)
    {
        return false;
    }
    else
    {
        Vec3 vec3 = RandomPositionGenerator.findRandomTarget(this.theEntityCreature, 5, 4);

        if (vec3 == null)
        {
            return false;
        }
        else
        {
            this.randPosX = vec3.xCoord;
            this.randPosY = vec3.yCoord;
            this.randPosZ = vec3.zCoord;
            return true;
        }
    }
}
项目:Necromancy    文件:EntityAIScareEntities.java   
@Override
public void updateTask() {
    if ((target = getClosestEntity()) != null) {
        pathFinderTarget = target.getNavigator();
        pathFinderSelf.tryMoveToEntityLiving(target, entity.getAIMoveSpeed());
        if (entity.getDistanceToEntity(target) < scaringRange) {
            Vec3 var2 = RandomPositionGenerator.findRandomTargetBlockAwayFrom((EntityCreature) target, 16, 7, entity.worldObj.getWorldVec3Pool().getVecFromPool(entity.posX, entity.posY, entity.posZ));
            if (var2 != null && entity.getDistanceSq(var2.xCoord, var2.yCoord, var2.zCoord) >= entity.getDistanceSqToEntity(target)) {
                pathEntity = pathFinderTarget.getPathToXYZ(var2.xCoord, var2.yCoord, var2.zCoord);
                if (pathEntity != null) {
                    pathFinderTarget.setPath(pathEntity, 0.4F);
                }
            }
        }
    }
}
项目:harshencastle    文件:AIEntityWanderNoWater.java   
@Nullable
protected Vec3d getPosition()
{
    if (this.entity.isInWater())
    {
        Vec3d vec3d = RandomPositionGenerator.getLandPos(this.entity, 15, 7);
        return vec3d == null ? super.getPosition() : vec3d;
    }
    else
    {
        return this.entity.getRNG().nextFloat() >= this.probability ? RandomPositionGenerator.getLandPos(this.entity, 10, 7) : super.getPosition();
    }
}
项目:FiveNightsAtFreddysUniverseMod    文件:EntityBonnieAIWander.java   
/**
 * Returns whether the EntityAIBase should begin execution.
 */
public boolean shouldExecute()
{
    if (((EntityBonnie)entity).isAgressive())
    {
        if (this.entity.getAge() >= 100)
        {
            return false;
        }
        else if (this.entity.getRNG().nextInt(120) != 0)
        {
            return false;
        }
        else
        {
            Vec3 vec3 = RandomPositionGenerator.findRandomTarget(this.entity, 10, 7);

            if (vec3 == null)
            {
                return false;
            }
            else
            {
                this.xPosition = vec3.xCoord;
                this.yPosition = vec3.yCoord;
                this.zPosition = vec3.zCoord;
                return true;
            }
        }
    }
    return false;
}
项目:FiveNightsAtFreddysUniverseMod    文件:EntityCandyAIWander.java   
/**
 * Returns whether the EntityAIBase should begin execution.
 */
public boolean shouldExecute()
{
    if (((EntityCandy)entity).isAgressive())
    {
        if (this.entity.getAge() >= 100)
        {
            return false;
        }
        else if (this.entity.getRNG().nextInt(120) != 0)
        {
            return false;
        }
        else
        {
            Vec3 vec3 = RandomPositionGenerator.findRandomTarget(this.entity, 10, 7);

            if (vec3 == null)
            {
                return false;
            }
            else
            {
                this.xPosition = vec3.xCoord;
                this.yPosition = vec3.yCoord;
                this.zPosition = vec3.zCoord;
                return true;
            }
        }
    }
    return false;
}
项目:FiveNightsAtFreddysUniverseMod    文件:EntityChicaAIWander.java   
/**
 * Returns whether the EntityAIBase should begin execution.
 */
public boolean shouldExecute()
{
    if (((EntityChica)entity).isAgressive())
    {
        if (this.entity.getAge() >= 100)
        {
            return false;
        }
        else if (this.entity.getRNG().nextInt(120) != 0)
        {
            return false;
        }
        else
        {
            Vec3 vec3 = RandomPositionGenerator.findRandomTarget(this.entity, 10, 7);

            if (vec3 == null)
            {
                return false;
            }
            else
            {
                this.xPosition = vec3.xCoord;
                this.yPosition = vec3.yCoord;
                this.zPosition = vec3.zCoord;
                return true;
            }
        }
    }
    return false;
}
项目:FiveNightsAtFreddysUniverseMod    文件:EntityFredbearAIWander.java   
/**
 * Returns whether the EntityAIBase should begin execution.
 */
public boolean shouldExecute()
{
    if (((EntityFredbear)entity).isAgressive())
    {
        if (this.entity.getAge() >= 100)
        {
            return false;
        }
        else if (this.entity.getRNG().nextInt(120) != 0)
        {
            return false;
        }
        else
        {
            Vec3 vec3 = RandomPositionGenerator.findRandomTarget(this.entity, 10, 7);

            if (vec3 == null)
            {
                return false;
            }
            else
            {
                this.xPosition = vec3.xCoord;
                this.yPosition = vec3.yCoord;
                this.zPosition = vec3.zCoord;
                return true;
            }
        }
    }
    return false;
}
项目:FiveNightsAtFreddysUniverseMod    文件:EntitySpringbonnieAIWander.java   
/**
 * Returns whether the EntityAIBase should begin execution.
 */
public boolean shouldExecute()
{
    if (((EntitySpringbonnie)entity).isAgressive())
    {
        if (this.entity.getAge() >= 100)
        {
            return false;
        }
        else if (this.entity.getRNG().nextInt(120) != 0)
        {
            return false;
        }
        else
        {
            Vec3 vec3 = RandomPositionGenerator.findRandomTarget(this.entity, 10, 7);

            if (vec3 == null)
            {
                return false;
            }
            else
            {
                this.xPosition = vec3.xCoord;
                this.yPosition = vec3.yCoord;
                this.zPosition = vec3.zCoord;
                return true;
            }
        }
    }
    return false;
}