Package net.minecraft.entity.monster

Examples of net.minecraft.entity.monster.EntityMob


    double x = (xCoord + 0.5D - ent.posX);
    double y = (yCoord + 1D - ent.posY);
    double z = (zCoord + 0.5D - ent.posZ);
    double distance = Math.sqrt(x * x + y * y + z * z);
    if(distance > 2) {
      EntityMob mod = (EntityMob) ent;
      mod.faceEntity(getTarget(), 180, 0);
      mod.moveEntityWithHeading(0, 1);
      if(mod.posY < yCoord) {
        mod.setJumping(true);
      } else {
        mod.setJumping(false);
      }
    }
  }
View Full Code Here


    AxisAlignedBB hurtBox = getBounding(genome, housing, 1.0f);
    @SuppressWarnings("rawtypes")
    List list = housing.getWorld().getEntitiesWithinAABB(EntityMob.class, hurtBox);

    for (Object obj : list) {
      EntityMob mob = (EntityMob) obj;

      for (Object objT : mob.tasks.taskEntries) {
        EntityAITaskEntry task = (EntityAITaskEntry) objT;
        if (task.action instanceof AIAvoidPlayers)
          return storedData;
View Full Code Here

    AxisAlignedBB hurtBox = getBounding(genome, housing, 1.0f);
    @SuppressWarnings("rawtypes")
    List list = housing.getWorld().getEntitiesWithinAABB(EntityMob.class, hurtBox);

    for (Object obj : list) {
      EntityMob mob = (EntityMob) obj;
      mob.attackEntityFrom(DamageSource.generic, 2);
    }

    return storedData;
  }
View Full Code Here

TOP

Related Classes of net.minecraft.entity.monster.EntityMob

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.