summaryrefslogtreecommitdiffstats
path: root/src/main/java/net/minecraft/server/EntityPig.java
diff options
context:
space:
mode:
authorNate Mortensen <nate.richard.mortensen@gmail.com>2013-07-01 06:03:00 -0500
committerWesley Wolfe <weswolf@aol.com>2013-07-01 12:10:06 -0500
commit6c09066e224ac85b8a6464eaf8f53edfeb4beda4 (patch)
tree573e05f4b148cb1891a1d3839175e501e6257442 /src/main/java/net/minecraft/server/EntityPig.java
parentf887b76a259e12468b28d82d1eced93f0b73bd6d (diff)
downloadcraftbukkit-6c09066e224ac85b8a6464eaf8f53edfeb4beda4.tar
craftbukkit-6c09066e224ac85b8a6464eaf8f53edfeb4beda4.tar.gz
craftbukkit-6c09066e224ac85b8a6464eaf8f53edfeb4beda4.tar.lz
craftbukkit-6c09066e224ac85b8a6464eaf8f53edfeb4beda4.tar.xz
craftbukkit-6c09066e224ac85b8a6464eaf8f53edfeb4beda4.zip
Update CraftBukkit to 1.6.1
Diffstat (limited to 'src/main/java/net/minecraft/server/EntityPig.java')
-rw-r--r--src/main/java/net/minecraft/server/EntityPig.java53
1 files changed, 26 insertions, 27 deletions
diff --git a/src/main/java/net/minecraft/server/EntityPig.java b/src/main/java/net/minecraft/server/EntityPig.java
index e9fe7cff..b77751e5 100644
--- a/src/main/java/net/minecraft/server/EntityPig.java
+++ b/src/main/java/net/minecraft/server/EntityPig.java
@@ -4,41 +4,40 @@ import org.bukkit.craftbukkit.event.CraftEventFactory; // CraftBukkit
public class EntityPig extends EntityAnimal {
- private final PathfinderGoalPassengerCarrotStick d;
+ private final PathfinderGoalPassengerCarrotStick bp;
public EntityPig(World world) {
super(world);
- this.texture = "/mob/pig.png";
this.a(0.9F, 0.9F);
this.getNavigation().a(true);
- float f = 0.25F;
-
this.goalSelector.a(0, new PathfinderGoalFloat(this));
- this.goalSelector.a(1, new PathfinderGoalPanic(this, 0.38F));
- this.goalSelector.a(2, this.d = new PathfinderGoalPassengerCarrotStick(this, 0.34F));
- this.goalSelector.a(3, new PathfinderGoalBreed(this, f));
- this.goalSelector.a(4, new PathfinderGoalTempt(this, 0.3F, Item.CARROT_STICK.id, false));
- this.goalSelector.a(4, new PathfinderGoalTempt(this, 0.3F, Item.CARROT.id, false));
- this.goalSelector.a(5, new PathfinderGoalFollowParent(this, 0.28F));
- this.goalSelector.a(6, new PathfinderGoalRandomStroll(this, f));
+ this.goalSelector.a(1, new PathfinderGoalPanic(this, 1.25D));
+ this.goalSelector.a(2, this.bp = new PathfinderGoalPassengerCarrotStick(this, 0.3F));
+ this.goalSelector.a(3, new PathfinderGoalBreed(this, 1.0D));
+ this.goalSelector.a(4, new PathfinderGoalTempt(this, 1.2D, Item.CARROT_STICK.id, false));
+ this.goalSelector.a(4, new PathfinderGoalTempt(this, 1.2D, Item.CARROT.id, false));
+ this.goalSelector.a(5, new PathfinderGoalFollowParent(this, 1.1D));
+ this.goalSelector.a(6, new PathfinderGoalRandomStroll(this, 1.0D));
this.goalSelector.a(7, new PathfinderGoalLookAtPlayer(this, EntityHuman.class, 6.0F));
this.goalSelector.a(8, new PathfinderGoalRandomLookaround(this));
}
- public boolean bh() {
+ public boolean bb() {
return true;
}
- public int getMaxHealth() {
- return 10;
+ protected void ax() {
+ super.ax();
+ this.a(GenericAttributes.a).a(10.0D);
+ this.a(GenericAttributes.d).a(0.25D);
}
- protected void bo() {
- super.bo();
+ protected void be() {
+ super.be();
}
- public boolean bL() {
- ItemStack itemstack = ((EntityHuman) this.passenger).bG();
+ public boolean bu() {
+ ItemStack itemstack = ((EntityHuman) this.passenger).aV();
return itemstack != null && itemstack.id == Item.CARROT_STICK.id;
}
@@ -58,15 +57,15 @@ public class EntityPig extends EntityAnimal {
this.setSaddle(nbttagcompound.getBoolean("Saddle"));
}
- protected String bb() {
+ protected String r() {
return "mob.pig.say";
}
- protected String bc() {
+ protected String aK() {
return "mob.pig.say";
}
- protected String bd() {
+ protected String aL() {
return "mob.pig.death";
}
@@ -74,8 +73,8 @@ public class EntityPig extends EntityAnimal {
this.makeSound("mob.pig.step", 0.15F, 1.0F);
}
- public boolean a_(EntityHuman entityhuman) {
- if (super.a_(entityhuman)) {
+ public boolean a(EntityHuman entityhuman) {
+ if (super.a(entityhuman)) {
return true;
} else if (this.hasSaddle() && !this.world.isStatic && (this.passenger == null || this.passenger == entityhuman)) {
entityhuman.mount(this);
@@ -139,8 +138,8 @@ 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);
}
@@ -154,8 +153,8 @@ public class EntityPig extends EntityAnimal {
return itemstack != null && itemstack.id == Item.CARROT.id;
}
- public PathfinderGoalPassengerCarrotStick n() {
- return this.d;
+ public PathfinderGoalPassengerCarrotStick bQ() {
+ return this.bp;
}
public EntityAgeable createChild(EntityAgeable entityageable) {