コード例 #1
0
ファイル: Path.java プロジェクト: JenkinsT/Minecraft-DeNovo
  private void func_75846_b(int p_75846_1_) {
    PathPoint var2 = this.field_75852_a[p_75846_1_];
    float var3 = var2.field_75834_g;

    while (true) {
      int var4 = 1 + (p_75846_1_ << 1);
      int var5 = var4 + 1;
      if (var4 >= this.field_75851_b) {
        break;
      }

      PathPoint var6 = this.field_75852_a[var4];
      float var7 = var6.field_75834_g;
      PathPoint var8;
      float var9;
      if (var5 >= this.field_75851_b) {
        var8 = null;
        var9 = Float.POSITIVE_INFINITY;
      } else {
        var8 = this.field_75852_a[var5];
        var9 = var8.field_75834_g;
      }

      if (var7 < var9) {
        if (var7 >= var3) {
          break;
        }

        this.field_75852_a[p_75846_1_] = var6;
        var6.field_75835_d = p_75846_1_;
        p_75846_1_ = var4;
      } else {
        if (var9 >= var3) {
          break;
        }

        this.field_75852_a[p_75846_1_] = var8;
        var8.field_75835_d = p_75846_1_;
        p_75846_1_ = var5;
      }
    }

    this.field_75852_a[p_75846_1_] = var2;
    var2.field_75835_d = p_75846_1_;
  }
コード例 #2
0
ファイル: Path.java プロジェクト: JenkinsT/Minecraft-DeNovo
  private void func_75847_a(int p_75847_1_) {
    PathPoint var2 = this.field_75852_a[p_75847_1_];

    int var4;
    for (float var3 = var2.field_75834_g; p_75847_1_ > 0; p_75847_1_ = var4) {
      var4 = p_75847_1_ - 1 >> 1;
      PathPoint var5 = this.field_75852_a[var4];
      if (var3 >= var5.field_75834_g) {
        break;
      }

      this.field_75852_a[p_75847_1_] = var5;
      var5.field_75835_d = p_75847_1_;
    }

    this.field_75852_a[p_75847_1_] = var2;
    var2.field_75835_d = p_75847_1_;
  }
コード例 #3
0
ファイル: Path.java プロジェクト: JenkinsT/Minecraft-DeNovo
  public PathPoint func_75844_c() {
    PathPoint var1 = this.field_75852_a[0];
    this.field_75852_a[0] = this.field_75852_a[--this.field_75851_b];
    this.field_75852_a[this.field_75851_b] = null;
    if (this.field_75851_b > 0) {
      this.func_75846_b(0);
    }

    var1.field_75835_d = -1;
    return var1;
  }
コード例 #4
0
ファイル: Path.java プロジェクト: JenkinsT/Minecraft-DeNovo
  public PathPoint func_75849_a(PathPoint p_75849_1_) {
    if (p_75849_1_.field_75835_d >= 0) {
      throw new IllegalStateException("OW KNOWS!");
    } else {
      if (this.field_75851_b == this.field_75852_a.length) {
        PathPoint[] var2 = new PathPoint[this.field_75851_b << 1];
        System.arraycopy(this.field_75852_a, 0, var2, 0, this.field_75851_b);
        this.field_75852_a = var2;
      }

      this.field_75852_a[this.field_75851_b] = p_75849_1_;
      p_75849_1_.field_75835_d = this.field_75851_b;
      this.func_75847_a(this.field_75851_b++);
      return p_75849_1_;
    }
  }