Beispiel #1
0
    public void e() {
      if (this.a.u() == null) {
        this.a.aG = this.a.y = -((float) Math.atan2(this.a.v, this.a.x)) * 180.0F / 3.1415927F;
      } else {
        EntityLivingBase entitylivingbase = this.a.u();
        double d0 = 64.0D;

        if (entitylivingbase.h(this.a) < d0 * d0) {
          double d1 = entitylivingbase.s - this.a.s;
          double d2 = entitylivingbase.u - this.a.u;

          this.a.aG = this.a.y = -((float) Math.atan2(d1, d2)) * 180.0F / 3.1415927F;
        }
      }
    }
Beispiel #2
0
    public void e() {
      EntityLivingBase entitylivingbase = this.b.u();
      double d0 = 64.0D;

      if (entitylivingbase.h(this.b) < d0 * d0 && this.b.t(entitylivingbase)) {
        World world = this.b.o;

        ++this.a;
        if (this.a == 10) {
          world.a((EntityPlayer) null, 1007, new BlockPos(this.b), 0);
        }

        if (this.a == 20) {
          double d1 = 4.0D;
          Vec3 vec3 = this.b.d(1.0F);
          double d2 = entitylivingbase.s - (this.b.s + vec3.a * d1);
          double d3 =
              entitylivingbase.aQ().b
                  + (double) (entitylivingbase.K / 2.0F)
                  - (0.5D + this.b.t + (double) (this.b.K / 2.0F));
          double d4 = entitylivingbase.u - (this.b.u + vec3.c * d1);

          world.a((EntityPlayer) null, 1008, new BlockPos(this.b), 0);
          EntityLargeFireball entitylargefireball =
              new EntityLargeFireball(world, this.b, d2, d3, d4);

          entitylargefireball.e = this.b.cd();
          entitylargefireball.s = this.b.s + vec3.a * d1;
          entitylargefireball.t = this.b.t + (double) (this.b.K / 2.0F) + 0.5D;
          entitylargefireball.u = this.b.u + vec3.c * d1;
          world.d((Entity) entitylargefireball);
          this.a = -40;
        }
      } else if (this.a > 0) {
        --this.a;
      }

      this.b.a(this.a > 10);
    }