From 6c09066e224ac85b8a6464eaf8f53edfeb4beda4 Mon Sep 17 00:00:00 2001 From: Nate Mortensen Date: Mon, 1 Jul 2013 06:03:00 -0500 Subject: Update CraftBukkit to 1.6.1 --- src/main/java/net/minecraft/server/EntityCow.java | 33 ++++++++++++----------- 1 file changed, 17 insertions(+), 16 deletions(-) (limited to 'src/main/java/net/minecraft/server/EntityCow.java') diff --git a/src/main/java/net/minecraft/server/EntityCow.java b/src/main/java/net/minecraft/server/EntityCow.java index 748f7abf..9173a0a1 100644 --- a/src/main/java/net/minecraft/server/EntityCow.java +++ b/src/main/java/net/minecraft/server/EntityCow.java @@ -9,36 +9,37 @@ public class EntityCow extends EntityAnimal { public EntityCow(World world) { super(world); - this.texture = "/mob/cow.png"; this.a(0.9F, 1.3F); this.getNavigation().a(true); this.goalSelector.a(0, new PathfinderGoalFloat(this)); - this.goalSelector.a(1, new PathfinderGoalPanic(this, 0.38F)); - this.goalSelector.a(2, new PathfinderGoalBreed(this, 0.2F)); - this.goalSelector.a(3, new PathfinderGoalTempt(this, 0.25F, Item.WHEAT.id, false)); - this.goalSelector.a(4, new PathfinderGoalFollowParent(this, 0.25F)); - this.goalSelector.a(5, new PathfinderGoalRandomStroll(this, 0.2F)); + this.goalSelector.a(1, new PathfinderGoalPanic(this, 2.0D)); + this.goalSelector.a(2, new PathfinderGoalBreed(this, 1.0D)); + this.goalSelector.a(3, new PathfinderGoalTempt(this, 1.25D, Item.WHEAT.id, false)); + this.goalSelector.a(4, new PathfinderGoalFollowParent(this, 1.25D)); + this.goalSelector.a(5, new PathfinderGoalRandomStroll(this, 1.0D)); this.goalSelector.a(6, new PathfinderGoalLookAtPlayer(this, EntityHuman.class, 6.0F)); this.goalSelector.a(7, 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.20000000298023224D); } - protected String bb() { + protected String r() { return "mob.cow.say"; } - protected String bc() { + protected String aK() { return "mob.cow.hurt"; } - protected String bd() { + protected String aL() { return "mob.cow.hurt"; } @@ -46,7 +47,7 @@ public class EntityCow extends EntityAnimal { this.makeSound("mob.cow.step", 0.15F, 1.0F); } - protected float ba() { + protected float aW() { return 0.4F; } @@ -75,10 +76,10 @@ public class EntityCow extends EntityAnimal { // CraftBukkit end } - public boolean a_(EntityHuman entityhuman) { + public boolean a(EntityHuman entityhuman) { ItemStack itemstack = entityhuman.inventory.getItemInHand(); - if (itemstack != null && itemstack.id == Item.BUCKET.id) { + if (itemstack != null && itemstack.id == Item.BUCKET.id && !entityhuman.abilities.canInstantlyBuild) { // CraftBukkit start - Got milk? org.bukkit.Location loc = this.getBukkitEntity().getLocation(); org.bukkit.event.player.PlayerBucketFillEvent event = CraftEventFactory.callPlayerBucketFillEvent(entityhuman, loc.getBlockX(), loc.getBlockY(), loc.getBlockZ(), -1, itemstack, Item.MILK_BUCKET); @@ -96,7 +97,7 @@ public class EntityCow extends EntityAnimal { return true; } else { - return super.a_(entityhuman); + return super.a(entityhuman); } } -- cgit v1.2.3