From 2726696652179a5ead7dc07dd39edf7dfda687f7 Mon Sep 17 00:00:00 2001 From: mbax Date: Mon, 4 Nov 2013 07:07:38 -0600 Subject: Update CraftBukkit to Minecraft 1.7.2 --- src/main/java/net/minecraft/server/EntityMushroomCow.java | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'src/main/java/net/minecraft/server/EntityMushroomCow.java') diff --git a/src/main/java/net/minecraft/server/EntityMushroomCow.java b/src/main/java/net/minecraft/server/EntityMushroomCow.java index abf7d270..a5f84c91 100644 --- a/src/main/java/net/minecraft/server/EntityMushroomCow.java +++ b/src/main/java/net/minecraft/server/EntityMushroomCow.java @@ -12,19 +12,19 @@ public class EntityMushroomCow extends EntityCow { public boolean a(EntityHuman entityhuman) { ItemStack itemstack = entityhuman.inventory.getItemInHand(); - if (itemstack != null && itemstack.id == Item.BOWL.id && this.getAge() >= 0) { + if (itemstack != null && itemstack.getItem() == Items.BOWL && this.getAge() >= 0) { if (itemstack.count == 1) { - entityhuman.inventory.setItem(entityhuman.inventory.itemInHandIndex, new ItemStack(Item.MUSHROOM_SOUP)); + entityhuman.inventory.setItem(entityhuman.inventory.itemInHandIndex, new ItemStack(Items.MUSHROOM_SOUP)); return true; } - if (entityhuman.inventory.pickup(new ItemStack(Item.MUSHROOM_SOUP)) && !entityhuman.abilities.canInstantlyBuild) { + if (entityhuman.inventory.pickup(new ItemStack(Items.MUSHROOM_SOUP)) && !entityhuman.abilities.canInstantlyBuild) { entityhuman.inventory.splitStack(entityhuman.inventory.itemInHandIndex, 1); return true; } } - if (itemstack != null && itemstack.id == Item.SHEARS.id && this.getAge() >= 0) { + if (itemstack != null && itemstack.getItem() == Items.SHEARS && this.getAge() >= 0) { // CraftBukkit start PlayerShearEntityEvent event = new PlayerShearEntityEvent((org.bukkit.entity.Player) entityhuman.getBukkitEntity(), this.getBukkitEntity()); this.world.getServer().getPluginManager().callEvent(event); @@ -45,8 +45,11 @@ public class EntityMushroomCow extends EntityCow { this.world.addEntity(entitycow); for (int i = 0; i < 5; ++i) { - this.world.addEntity(new EntityItem(this.world, this.locX, this.locY + (double) this.length, this.locZ, new ItemStack(Block.RED_MUSHROOM))); + this.world.addEntity(new EntityItem(this.world, this.locX, this.locY + (double) this.length, this.locZ, new ItemStack(Blocks.RED_MUSHROOM))); } + + itemstack.damage(1, entityhuman); + this.makeSound("mob.sheep.shear", 1.0F, 1.0F); } return true; -- cgit v1.2.3