Package net.minecraft.entity.passive

Examples of net.minecraft.entity.passive.EntityChicken


 
  @Override
  public List<ItemStack> ranch(World world, EntityLiving entity, IInventory rancher)
  {
    List<ItemStack> drops = new LinkedList<ItemStack>();
    EntityChicken chicken = ((EntityChicken)entity);
    if (chicken.timeUntilNextEgg < 300)
    {
      chicken.playSound("mob.chicken.plop", 1.0F, (chicken.rand.nextFloat() - chicken.rand.nextFloat()) * 0.2F + 1.0F);
      chicken.attackEntityFrom(DamageSource.generic, 0);
      chicken.setRevengeTarget(chicken); // panic
      chicken.timeUntilNextEgg = chicken.rand.nextInt(6000) + 6200;
      if (rand.nextInt(4) != 0)
      {
        drops.add(new ItemStack(Item.egg));
      }
View Full Code Here


    ItemStack holding = player.getCurrentEquippedItem();
   
    if ((target.getClass() == EntityChicken.class) &&
        (holding != null) && (holding.getItem() == Items.name_tag)) {
     
      EntityChicken chicken = (EntityChicken)target;
      if (!chicken.isDead && !chicken.isChild() &&
          "Cluckington".equals(holding.getDisplayName()))
        EntityCluckington.spawn(chicken);
     
    }
   
View Full Code Here

TOP

Related Classes of net.minecraft.entity.passive.EntityChicken

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.