diff options
author | Thinkofdeath <thinkofdeath@spigotmc.org> | 2014-11-26 08:32:16 +1100 |
---|---|---|
committer | md_5 <git@md-5.net> | 2014-11-28 17:16:30 +1100 |
commit | 24557bc2b37deb6a0edf497d547471832457b1dd (patch) | |
tree | c560572889a3b0b34964a0cddb35dc87fda3c914 /src/main/java/net/minecraft/server/PathfinderGoalTame.java | |
parent | a4805dbd77da057cc1ea0bf344379bc6e53ca1f6 (diff) | |
download | craftbukkit-24557bc2b37deb6a0edf497d547471832457b1dd.tar craftbukkit-24557bc2b37deb6a0edf497d547471832457b1dd.tar.gz craftbukkit-24557bc2b37deb6a0edf497d547471832457b1dd.tar.lz craftbukkit-24557bc2b37deb6a0edf497d547471832457b1dd.tar.xz craftbukkit-24557bc2b37deb6a0edf497d547471832457b1dd.zip |
Update to Minecraft 1.8
For more information please see http://www.spigotmc.org/
Diffstat (limited to 'src/main/java/net/minecraft/server/PathfinderGoalTame.java')
-rw-r--r-- | src/main/java/net/minecraft/server/PathfinderGoalTame.java | 72 |
1 files changed, 0 insertions, 72 deletions
diff --git a/src/main/java/net/minecraft/server/PathfinderGoalTame.java b/src/main/java/net/minecraft/server/PathfinderGoalTame.java deleted file mode 100644 index a13c6382..00000000 --- a/src/main/java/net/minecraft/server/PathfinderGoalTame.java +++ /dev/null @@ -1,72 +0,0 @@ -package net.minecraft.server; - -public class PathfinderGoalTame extends PathfinderGoal { - - private EntityHorse entity; - private double b; - private double c; - private double d; - private double e; - - public PathfinderGoalTame(EntityHorse entityhorse, double d0) { - this.entity = entityhorse; - this.b = d0; - this.a(1); - } - - public boolean a() { - if (!this.entity.isTame() && this.entity.passenger != null) { - Vec3D vec3d = RandomPositionGenerator.a(this.entity, 5, 4); - - if (vec3d == null) { - return false; - } else { - this.c = vec3d.a; - this.d = vec3d.b; - this.e = vec3d.c; - return true; - } - } else { - return false; - } - } - - public void c() { - this.entity.getNavigation().a(this.c, this.d, this.e, this.b); - } - - public boolean b() { - return !this.entity.getNavigation().g() && this.entity.passenger != null; - } - - public void e() { - if (this.entity.aI().nextInt(50) == 0) { - if (this.entity.passenger instanceof EntityHuman) { - int i = this.entity.getTemper(); - int j = this.entity.getMaxDomestication(); - - // CraftBukkit - fire EntityTameEvent - if (j > 0 && this.entity.aI().nextInt(j) < i && !org.bukkit.craftbukkit.event.CraftEventFactory.callEntityTameEvent(this.entity, (EntityHuman) this.entity.passenger).isCancelled() && this.entity.passenger instanceof EntityHuman) { - this.entity.h((EntityHuman) this.entity.passenger); - this.entity.world.broadcastEntityEffect(this.entity, (byte) 7); - return; - } - - this.entity.v(5); - } - - // CraftBukkit start - Handle dismounting to account for VehicleExitEvent being fired. - if (this.entity.passenger != null) { - this.entity.passenger.mount((Entity) null); - // If the entity still has a passenger, then a plugin cancelled the event. - if (this.entity.passenger != null) { - return; - } - } - // this.entity.passenger = null; - // CraftBukkit end - this.entity.cJ(); - this.entity.world.broadcastEntityEffect(this.entity, (byte) 6); - } - } -} |