Ejemplo n.º 1
0
  public void aq() {
    if (this.portalCooldown > 0) {
      this.portalCooldown = this.ar();
    } else {
      double d0 = this.lastX - this.locX;
      double d1 = this.lastZ - this.locZ;

      if (!this.world.isStatic && !this.ak) {
        int i;

        if (MathHelper.e((float) d0) > MathHelper.e((float) d1)) {
          i = d0 > 0.0D ? EnumDirection.WEST.b() : EnumDirection.EAST.b();
        } else {
          i = d1 > 0.0D ? EnumDirection.NORTH.b() : EnumDirection.SOUTH.b();
        }

        this.an = i;
      }

      this.ak = true;
    }
  }