Examples of EntityLiving


Examples of net.minecraft.server.v1_7_R1.EntityLiving

  @Override
  public boolean update()
  {
    this.m_lookTick--;
    EntityLiving entity = this.getEntityHandle();
    NMSUtil.getControllerLook(entity).a(entity.locX + this.m_xDiff, entity.locY + entity.getHeadHeight(), entity.locZ + this.m_zDiff, 10, NMSUtil.getMaxHeadRotation(entity));
    return true;
  }
View Full Code Here

Examples of net.minecraft.server.v1_7_R1.EntityLiving

  }

  @Override
  public boolean update()
  {
    EntityLiving entity = this.getEntityHandle();
    double xDiff = this.m_target.locX - entity.locX;
    double zDiff = this.m_target.locZ - entity.locZ;
    float dist = MathHelper.sqrt(xDiff * xDiff + zDiff * zDiff);

    entity.motX = xDiff / dist * 0.5D * 0.800000011920929D + entity.motX * 0.20000000298023224D;
 
View Full Code Here

Examples of net.minecraft.server.v1_7_R1.EntityLiving

    if(!this.isTamed())
      return false;
    else
    {
      EntityLiving owner = this.getTamer();
      if(owner == null)
        return false;
      else
      {
        this.m_ownerTarget = owner.aL();
        int lastAttackTick = owner.aM();
        return lastAttackTick != this.m_lastAttackTick && this.isSuitableTarget(this.m_ownerTarget, false);
      }
    }
  }
View Full Code Here

Examples of net.minecraft.server.v1_7_R4.EntityLiving

     *
     */
    @EventHandler
    public void NPCCompleteDestination (NavigationCompleteEvent event) {
        if (event.getNPC() == npc && pushed) {
            EntityLiving handle = ((CraftLivingEntity) npc.getBukkitEntity()).getHandle();
            handle.yaw = returnLocation.getYaw();
            handle.pitch = returnLocation.getPitch();
            // !--- START NMS OBFUSCATED
            handle.az = handle.yaw; // The head's yaw
            // !--- END NMS OBFUSCATED
View Full Code Here

Examples of net.minecraft.server.v1_7_R4.EntityLiving

            return;
        }

        // If the target is not null, cast it to an NMS EntityLiving
        // as well for one of the two methods below
        EntityLiving nmsTarget = target != null ? ((CraftLivingEntity) target).getHandle()
                : null;

        ((CraftCreature) entity).getHandle().
                setGoalTarget(nmsTarget);
View Full Code Here

Examples of net.minecraft.server.v1_7_R4.EntityLiving

    private static void look(Entity entity, float yaw, float pitch) {
        net.minecraft.server.v1_7_R4.Entity handle = !(entity instanceof CraftEntity)?null:((CraftEntity)entity).getHandle();
        if (handle != null) {
            handle.yaw = yaw;
            if(entity instanceof EntityLiving) {
                EntityLiving livingHandle = (EntityLiving) entity;
                while (yaw < -180.0F) {
                    yaw += 360.0F;
                }
                while(yaw >= 180.0F) {
                    yaw -= 360.0F;
View Full Code Here

Examples of net.minecraft.src.EntityLiving

        glDrawBuffers(dfbDrawBuffers);
    }

    public static void setCamera(float f) {
        EntityLiving viewEntity = mc.renderViewEntity;

        double x = viewEntity.lastTickPosX + (viewEntity.posX - viewEntity.lastTickPosX) * f;
        double y = viewEntity.lastTickPosY + (viewEntity.posY - viewEntity.lastTickPosY) * f;
        double z = viewEntity.lastTickPosZ + (viewEntity.posZ - viewEntity.lastTickPosZ) * f;

 
View Full Code Here

Examples of net.minecraft.src.EntityLiving

            GL11.glRotatef(45F, -1F, 0.0F, 0.0F);
    }
  
    protected void preRenderCallback(EntityLiving entityliving, float f)
    {
            EntityLiving entity = entityliving;
         
            if (entity.motionY < -.0001 && entity.isAirBorne)
            {
       //             rotateAnimal(entityliving);
View Full Code Here

Examples of net.minecraft.src.EntityLiving

  /**
   * Returns whether the EntityAIBase should begin execution.
   */
  public boolean shouldExecute() {
    EntityLiving entityliving = entityHost.getAttackTarget();

    if (entityliving == null) {
      return false;
    } else {
      attackTarget = entityliving;
View Full Code Here

Examples of net.minecraft.src.EntityLiving

  protected void attackEntity(Entity e, float f)
  {
    super.attackEntity(e, f);
    if (f < 2.0F)
      Shouts.knockBack(e, 2, -(e.posX - this.posX), -(e.posZ - this.posZ));
    EntityLiving el = (EntityLiving) e;
    /*
    if (el.getHealth() - attackStrength <= 0)
      Shouts.knockBack(el, Math.abs(el.getHealth() - attackStrength), -(e.posX - this.posX),
          -(e.posZ - this.posZ));
  */
 
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.