diff options
author | Travis Watkins <amaranth@ubuntu.com> | 2012-10-24 22:53:23 -0500 |
---|---|---|
committer | EvilSeph <evilseph@gmail.com> | 2012-10-27 22:19:03 -0400 |
commit | 60819c6693daf19dde68b04af38a4fee8c7da988 (patch) | |
tree | e7bd96a07f0e9d9f1f6b2721ddd1bb5dd71eaf48 /src/main/java/net/minecraft/server/PathfinderGoalBreed.java | |
parent | b9a72531b6e2ccc84bd021bca421255a957d96f7 (diff) | |
download | craftbukkit-60819c6693daf19dde68b04af38a4fee8c7da988.tar craftbukkit-60819c6693daf19dde68b04af38a4fee8c7da988.tar.gz craftbukkit-60819c6693daf19dde68b04af38a4fee8c7da988.tar.lz craftbukkit-60819c6693daf19dde68b04af38a4fee8c7da988.tar.xz craftbukkit-60819c6693daf19dde68b04af38a4fee8c7da988.zip |
Update CraftBukkit to Minecraft 1.4(.2).
Diffstat (limited to 'src/main/java/net/minecraft/server/PathfinderGoalBreed.java')
-rw-r--r-- | src/main/java/net/minecraft/server/PathfinderGoalBreed.java | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/src/main/java/net/minecraft/server/PathfinderGoalBreed.java b/src/main/java/net/minecraft/server/PathfinderGoalBreed.java index 50631387..3e96936c 100644 --- a/src/main/java/net/minecraft/server/PathfinderGoalBreed.java +++ b/src/main/java/net/minecraft/server/PathfinderGoalBreed.java @@ -20,7 +20,7 @@ public class PathfinderGoalBreed extends PathfinderGoal { } public boolean a() { - if (!this.d.s()) { + if (!this.d.r()) { return false; } else { this.e = this.f(); @@ -29,20 +29,20 @@ public class PathfinderGoalBreed extends PathfinderGoal { } public boolean b() { - return this.e.isAlive() && this.e.s() && this.b < 60; + return this.e.isAlive() && this.e.r() && this.b < 60; } - public void c() { + public void d() { this.e = null; this.b = 0; } - public void d() { - this.d.getControllerLook().a(this.e, 10.0F, (float) this.d.bf()); + public void e() { + this.d.getControllerLook().a(this.e, 10.0F, (float) this.d.bm()); this.d.getNavigation().a((EntityLiving) this.e, this.c); ++this.b; if (this.b == 60) { - this.i(); + this.g(); } } @@ -64,26 +64,28 @@ public class PathfinderGoalBreed extends PathfinderGoal { return entityanimal; } - private void i() { + private void g() { EntityAnimal entityanimal = this.d.createChild(this.e); if (entityanimal != null) { this.d.setAge(6000); this.e.setAge(6000); - this.d.t(); - this.e.t(); + this.d.s(); + this.e.s(); entityanimal.setAge(-24000); entityanimal.setPositionRotation(this.d.locX, this.d.locY, this.d.locZ, 0.0F, 0.0F); this.a.addEntity(entityanimal, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.BREEDING); // CraftBukkit - added SpawnReason - Random random = this.d.au(); + Random random = this.d.aA(); for (int i = 0; i < 7; ++i) { double d0 = random.nextGaussian() * 0.02D; double d1 = random.nextGaussian() * 0.02D; double d2 = random.nextGaussian() * 0.02D; - this.a.a("heart", this.d.locX + (double) (random.nextFloat() * this.d.width * 2.0F) - (double) this.d.width, this.d.locY + 0.5D + (double) (random.nextFloat() * this.d.length), this.d.locZ + (double) (random.nextFloat() * this.d.width * 2.0F) - (double) this.d.width, d0, d1, d2); + this.a.addParticle("heart", this.d.locX + (double) (random.nextFloat() * this.d.width * 2.0F) - (double) this.d.width, this.d.locY + 0.5D + (double) (random.nextFloat() * this.d.length), this.d.locZ + (double) (random.nextFloat() * this.d.width * 2.0F) - (double) this.d.width, d0, d1, d2); } + + this.a.addEntity(new EntityExperienceOrb(this.a, this.d.locX, this.d.locY, this.d.locZ, random.nextInt(4) + 1)); } } } |