diff options
author | Erik Broes <erikbroes@grum.nl> | 2011-11-20 00:01:14 -0800 |
---|---|---|
committer | Erik Broes <erikbroes@ripe.net> | 2011-11-20 00:01:33 -0800 |
commit | 345ea36c7bb3383c6e4825355d0043a646194eaa (patch) | |
tree | df116b57d92315c0a13c2fdc87d792b031c7239a /src/main/java/net/minecraft/server/EntityPig.java | |
parent | 589f66bd1b766dc1fdd737ee885304196a2ed86a (diff) | |
download | craftbukkit-345ea36c7bb3383c6e4825355d0043a646194eaa.tar craftbukkit-345ea36c7bb3383c6e4825355d0043a646194eaa.tar.gz craftbukkit-345ea36c7bb3383c6e4825355d0043a646194eaa.tar.lz craftbukkit-345ea36c7bb3383c6e4825355d0043a646194eaa.tar.xz craftbukkit-345ea36c7bb3383c6e4825355d0043a646194eaa.zip |
Update for 1.0.0
Diffstat (limited to 'src/main/java/net/minecraft/server/EntityPig.java')
-rw-r--r-- | src/main/java/net/minecraft/server/EntityPig.java | 29 |
1 files changed, 20 insertions, 9 deletions
diff --git a/src/main/java/net/minecraft/server/EntityPig.java b/src/main/java/net/minecraft/server/EntityPig.java index c4c00194..8c6829f8 100644 --- a/src/main/java/net/minecraft/server/EntityPig.java +++ b/src/main/java/net/minecraft/server/EntityPig.java @@ -13,7 +13,12 @@ public class EntityPig extends EntityAnimal { this.b(0.9F, 0.9F); } + public int getMaxHealth() { + return 10; + } + protected void b() { + super.b(); this.datawatcher.a(16, Byte.valueOf((byte) 0)); } @@ -24,23 +29,25 @@ public class EntityPig extends EntityAnimal { public void a(NBTTagCompound nbttagcompound) { super.a(nbttagcompound); - this.setSaddle(nbttagcompound.m("Saddle")); + this.setSaddle(nbttagcompound.n("Saddle")); } - protected String h() { + protected String c_() { return "mob.pig"; } - protected String i() { + protected String m() { return "mob.pig"; } - protected String j() { + protected String n() { return "mob.pigdeath"; } public boolean b(EntityHuman entityhuman) { - if (this.hasSaddle() && !this.world.isStatic && (this.passenger == null || this.passenger == entityhuman)) { + if (super.b(entityhuman)) { + return true; + } else if (this.hasSaddle() && !this.world.isStatic && (this.passenger == null || this.passenger == entityhuman)) { entityhuman.mount(this); return true; } else { @@ -48,8 +55,8 @@ public class EntityPig extends EntityAnimal { } } - protected int k() { - return this.fireTicks > 0 ? Item.GRILLED_PORK.id : Item.PORK.id; + protected int e() { + return this.z() ? Item.GRILLED_PORK.id : Item.PORK.id; } public boolean hasSaddle() { @@ -84,10 +91,14 @@ public class EntityPig extends EntityAnimal { } } - protected void a(float f) { - super.a(f); + protected void b(float f) { + super.b(f); if (f > 5.0F && this.passenger instanceof EntityHuman) { ((EntityHuman) this.passenger).a((Statistic) AchievementList.u); } } + + protected EntityAnimal createChild(EntityAnimal entityanimal) { + return new EntityPig(this.world); + } } |