Update CraftBukkit to Minecraft 1.4(.2).

This commit is contained in:
Travis Watkins
2012-10-24 22:53:23 -05:00
committed by EvilSeph
parent b9a72531b6
commit 60819c6693
237 changed files with 10104 additions and 4863 deletions

View File

@@ -4,6 +4,8 @@ import org.bukkit.craftbukkit.event.CraftEventFactory; // CraftBukkit
public class EntityPig extends EntityAnimal {
private final PathfinderGoalPassengerCarrotStick d;
public EntityPig(World world) {
super(world);
this.texture = "/mob/pig.png";
@@ -13,15 +15,17 @@ public class EntityPig extends EntityAnimal {
this.goalSelector.a(0, new PathfinderGoalFloat(this));
this.goalSelector.a(1, new PathfinderGoalPanic(this, 0.38F));
this.goalSelector.a(2, new PathfinderGoalBreed(this, f));
this.goalSelector.a(3, new PathfinderGoalTempt(this, 0.25F, Item.WHEAT.id, false));
this.goalSelector.a(4, new PathfinderGoalFollowParent(this, 0.28F));
this.goalSelector.a(5, new PathfinderGoalRandomStroll(this, f));
this.goalSelector.a(6, new PathfinderGoalLookAtPlayer(this, EntityHuman.class, 6.0F));
this.goalSelector.a(7, new PathfinderGoalRandomLookaround(this));
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(7, new PathfinderGoalLookAtPlayer(this, EntityHuman.class, 6.0F));
this.goalSelector.a(8, new PathfinderGoalRandomLookaround(this));
}
public boolean aV() {
public boolean bb() {
return true;
}
@@ -29,6 +33,16 @@ public class EntityPig extends EntityAnimal {
return 10;
}
protected void bi() {
super.bi();
}
public boolean bF() {
ItemStack itemstack = ((EntityHuman) this.passenger).bA();
return itemstack != null && itemstack.id == Item.CARROT_STICK.id;
}
protected void a() {
super.a();
this.datawatcher.a(16, Byte.valueOf((byte) 0));
@@ -44,16 +58,20 @@ public class EntityPig extends EntityAnimal {
this.setSaddle(nbttagcompound.getBoolean("Saddle"));
}
protected String aQ() {
return "mob.pig";
protected String aW() {
return "mob.pig.say";
}
protected String aR() {
return "mob.pig";
protected String aX() {
return "mob.pig.say";
}
protected String aS() {
return "mob.pigdeath";
protected String aY() {
return "mob.pig.death";
}
protected void a(int i, int j, int k, int l) {
this.world.makeSound(this, "mob.pig.step", 0.15F, 1.0F);
}
public boolean c(EntityHuman entityhuman) {
@@ -84,6 +102,10 @@ public class EntityPig extends EntityAnimal {
}
}
if (this.hasSaddle()) {
loot.add(new org.bukkit.inventory.ItemStack(Item.SADDLE.id, 1));
}
CraftEventFactory.callEntityDeathEvent(this, loot);
// CraftBukkit end
}
@@ -127,4 +149,12 @@ public class EntityPig extends EntityAnimal {
public EntityAnimal createChild(EntityAnimal entityanimal) {
return new EntityPig(this.world);
}
public boolean c(ItemStack itemstack) {
return itemstack != null && itemstack.id == Item.CARROT.id;
}
public PathfinderGoalPassengerCarrotStick n() {
return this.d;
}
}