Example #1
0
  @Override
  public void h() {
    super.h();
    this.C();

    npc.onTick();
    if (world
            .getType(MathHelper.floor(locX), MathHelper.floor(locY), MathHelper.floor(locZ))
            .getMaterial()
        == Material.FIRE) {
      setOnFire(15);
    }

    // Apply velocity etc.
    this.motY = onGround ? Math.max(0.0, motY) : motY;
    move(motX, motY, motZ);
    this.motX *= 0.800000011920929;
    this.motY *= 0.800000011920929;
    this.motZ *= 0.800000011920929;
    if (gravity && !this.onGround) {
      this.motY -= 0.1; // Most random value, don't judge.
    }
  }