diff options
author | GJ <gjmcferrin@gmail.com> | 2014-03-27 08:27:59 -0400 |
---|---|---|
committer | Travis Watkins <amaranth@ubuntu.com> | 2014-04-18 09:01:11 -0500 |
commit | d4fe10394a2105f22e5bd2b519fb596fcaacd801 (patch) | |
tree | 5adc7d3298dab7714a3777afc37a82f032ef3aa2 /src/main/java/net/minecraft/server/EntityHorse.java | |
parent | 286c71329d25b6646e4da932ca6723a056b152cf (diff) | |
download | craftbukkit-d4fe10394a2105f22e5bd2b519fb596fcaacd801.tar craftbukkit-d4fe10394a2105f22e5bd2b519fb596fcaacd801.tar.gz craftbukkit-d4fe10394a2105f22e5bd2b519fb596fcaacd801.tar.lz craftbukkit-d4fe10394a2105f22e5bd2b519fb596fcaacd801.tar.xz craftbukkit-d4fe10394a2105f22e5bd2b519fb596fcaacd801.zip |
[Bleeding] Add many missing event calls.
Diffstat (limited to 'src/main/java/net/minecraft/server/EntityHorse.java')
-rw-r--r-- | src/main/java/net/minecraft/server/EntityHorse.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main/java/net/minecraft/server/EntityHorse.java b/src/main/java/net/minecraft/server/EntityHorse.java index 5978ea38..7d67210e 100644 --- a/src/main/java/net/minecraft/server/EntityHorse.java +++ b/src/main/java/net/minecraft/server/EntityHorse.java @@ -6,6 +6,7 @@ import java.util.List; // CraftBukkit start import org.bukkit.craftbukkit.event.CraftEventFactory; import org.bukkit.event.entity.EntityDamageEvent; +import org.bukkit.event.entity.EntityRegainHealthEvent.RegainReason; // CraftBukkit end public class EntityHorse extends EntityAnimal implements IInventoryListener { @@ -601,7 +602,7 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener { } if (this.getHealth() < this.getMaxHealth() && f > 0.0F) { - this.heal(f); + this.heal(f, RegainReason.EATING); // CraftBukkit flag = true; } @@ -720,7 +721,7 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener { super.e(); if (!this.world.isStatic) { if (this.random.nextInt(900) == 0 && this.deathTicks == 0) { - this.heal(1.0F); + this.heal(1.0F, RegainReason.REGEN); // CraftBukkit } if (!this.cm() && this.passenger == null && this.random.nextInt(300) == 0 && this.world.getType(MathHelper.floor(this.locX), MathHelper.floor(this.locY) - 1, MathHelper.floor(this.locZ)) == Blocks.GRASS) { |