diff options
author | Thinkofdeath <thinkofdeath@spigotmc.org> | 2014-11-26 08:32:16 +1100 |
---|---|---|
committer | md_5 <git@md-5.net> | 2014-11-28 17:16:30 +1100 |
commit | 24557bc2b37deb6a0edf497d547471832457b1dd (patch) | |
tree | c560572889a3b0b34964a0cddb35dc87fda3c914 /src/main/java/net/minecraft/server/EntityMushroomCow.java | |
parent | a4805dbd77da057cc1ea0bf344379bc6e53ca1f6 (diff) | |
download | craftbukkit-24557bc2b37deb6a0edf497d547471832457b1dd.tar craftbukkit-24557bc2b37deb6a0edf497d547471832457b1dd.tar.gz craftbukkit-24557bc2b37deb6a0edf497d547471832457b1dd.tar.lz craftbukkit-24557bc2b37deb6a0edf497d547471832457b1dd.tar.xz craftbukkit-24557bc2b37deb6a0edf497d547471832457b1dd.zip |
Update to Minecraft 1.8
For more information please see http://www.spigotmc.org/
Diffstat (limited to 'src/main/java/net/minecraft/server/EntityMushroomCow.java')
-rw-r--r-- | src/main/java/net/minecraft/server/EntityMushroomCow.java | 72 |
1 files changed, 0 insertions, 72 deletions
diff --git a/src/main/java/net/minecraft/server/EntityMushroomCow.java b/src/main/java/net/minecraft/server/EntityMushroomCow.java deleted file mode 100644 index b4e43061..00000000 --- a/src/main/java/net/minecraft/server/EntityMushroomCow.java +++ /dev/null @@ -1,72 +0,0 @@ -package net.minecraft.server; - -import org.bukkit.event.player.PlayerShearEntityEvent; // CraftBukkit - -public class EntityMushroomCow extends EntityCow { - - public EntityMushroomCow(World world) { - super(world); - this.a(0.9F, 1.3F); - } - - public boolean a(EntityHuman entityhuman) { - ItemStack itemstack = entityhuman.inventory.getItemInHand(); - - if (itemstack != null && itemstack.getItem() == Items.BOWL && this.getAge() >= 0) { - if (itemstack.count == 1) { - entityhuman.inventory.setItem(entityhuman.inventory.itemInHandIndex, new ItemStack(Items.MUSHROOM_SOUP)); - return true; - } - - 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.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); - - if (event.isCancelled()) { - return false; - } - // CraftBukkit end - - this.die(); - this.world.addParticle("largeexplode", this.locX, this.locY + (double) (this.length / 2.0F), this.locZ, 0.0D, 0.0D, 0.0D); - if (!this.world.isStatic) { - EntityCow entitycow = new EntityCow(this.world); - - entitycow.setPositionRotation(this.locX, this.locY, this.locZ, this.yaw, this.pitch); - entitycow.setHealth(this.getHealth()); - entitycow.aM = this.aM; - 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(Blocks.RED_MUSHROOM))); - } - - itemstack.damage(1, entityhuman); - this.makeSound("mob.sheep.shear", 1.0F, 1.0F); - } - - return true; - } else { - return super.a(entityhuman); - } - } - - public EntityMushroomCow c(EntityAgeable entityageable) { - return new EntityMushroomCow(this.world); - } - - public EntityCow b(EntityAgeable entityageable) { - return this.c(entityageable); - } - - public EntityAgeable createChild(EntityAgeable entityageable) { - return this.c(entityageable); - } -} |