Updated version to 1.2.5-R0.1-SNAPSHOT
This commit is contained in:
@@ -12,9 +12,18 @@ public class EntityMushroomCow extends EntityCow {
|
||||
ItemStack itemstack = entityhuman.inventory.getItemInHand();
|
||||
|
||||
if (itemstack != null && itemstack.id == Item.BOWL.id && this.getAge() >= 0) {
|
||||
entityhuman.inventory.setItem(entityhuman.inventory.itemInHandIndex, new ItemStack(Item.MUSHROOM_SOUP));
|
||||
return true;
|
||||
} else if (itemstack != null && itemstack.id == Item.SHEARS.id && this.getAge() >= 0) {
|
||||
if (itemstack.count == 1) {
|
||||
entityhuman.inventory.setItem(entityhuman.inventory.itemInHandIndex, new ItemStack(Item.MUSHROOM_SOUP));
|
||||
return true;
|
||||
}
|
||||
|
||||
if (entityhuman.inventory.pickup(new ItemStack(Item.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) {
|
||||
// CraftBukkit start
|
||||
org.bukkit.event.player.PlayerShearEntityEvent event = new org.bukkit.event.player.PlayerShearEntityEvent((org.bukkit.entity.Player) entityhuman.getBukkitEntity(), this.getBukkitEntity());
|
||||
this.world.getServer().getPluginManager().callEvent(event);
|
||||
|
||||
Reference in New Issue
Block a user