summaryrefslogtreecommitdiffstats
path: root/src/main/java/net/minecraft/server/EntityCow.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/net/minecraft/server/EntityCow.java')
-rw-r--r--src/main/java/net/minecraft/server/EntityCow.java110
1 files changed, 0 insertions, 110 deletions
diff --git a/src/main/java/net/minecraft/server/EntityCow.java b/src/main/java/net/minecraft/server/EntityCow.java
deleted file mode 100644
index df21fde2..00000000
--- a/src/main/java/net/minecraft/server/EntityCow.java
+++ /dev/null
@@ -1,110 +0,0 @@
-package net.minecraft.server;
-
-// CraftBukkit start
-import org.bukkit.craftbukkit.event.CraftEventFactory;
-import org.bukkit.craftbukkit.inventory.CraftItemStack;
-// CraftBukkit end
-
-public class EntityCow extends EntityAnimal {
-
- public EntityCow(World world) {
- super(world);
- this.a(0.9F, 1.3F);
- this.getNavigation().a(true);
- this.goalSelector.a(0, new PathfinderGoalFloat(this));
- 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, Items.WHEAT, 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 bk() {
- return true;
- }
-
- protected void aD() {
- super.aD();
- this.getAttributeInstance(GenericAttributes.maxHealth).setValue(10.0D);
- this.getAttributeInstance(GenericAttributes.d).setValue(0.20000000298023224D);
- }
-
- protected String t() {
- return "mob.cow.say";
- }
-
- protected String aT() {
- return "mob.cow.hurt";
- }
-
- protected String aU() {
- return "mob.cow.hurt";
- }
-
- protected void a(int i, int j, int k, Block block) {
- this.makeSound("mob.cow.step", 0.15F, 1.0F);
- }
-
- protected float bf() {
- return 0.4F;
- }
-
- protected Item getLoot() {
- return Items.LEATHER;
- }
-
- protected void dropDeathLoot(boolean flag, int i) {
- int j = this.random.nextInt(3) + this.random.nextInt(1 + i);
-
- int k;
-
- for (k = 0; k < j; ++k) {
- this.a(Items.LEATHER, 1);
- }
-
- j = this.random.nextInt(3) + 1 + this.random.nextInt(1 + i);
-
- for (k = 0; k < j; ++k) {
- if (this.isBurning()) {
- this.a(Items.COOKED_BEEF, 1);
- } else {
- this.a(Items.RAW_BEEF, 1);
- }
- }
- }
-
- public boolean a(EntityHuman entityhuman) {
- ItemStack itemstack = entityhuman.inventory.getItemInHand();
-
- if (itemstack != null && itemstack.getItem() == Items.BUCKET && !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, Items.MILK_BUCKET);
-
- if (event.isCancelled()) {
- return false;
- }
-
- if (--itemstack.count <= 0) {
- entityhuman.inventory.setItem(entityhuman.inventory.itemInHandIndex, CraftItemStack.asNMSCopy(event.getItemStack()));
- } else if (!entityhuman.inventory.pickup(new ItemStack(Items.MILK_BUCKET))) {
- entityhuman.drop(CraftItemStack.asNMSCopy(event.getItemStack()), false);
- }
- // CraftBukkit end
-
- return true;
- } else {
- return super.a(entityhuman);
- }
- }
-
- public EntityCow b(EntityAgeable entityageable) {
- return new EntityCow(this.world);
- }
-
- public EntityAgeable createChild(EntityAgeable entityageable) {
- return this.b(entityageable);
- }
-}