Package net.minecraft.entity.passive

Examples of net.minecraft.entity.passive.EntityChicken.attackEntityFrom()


    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

TOP
Copyright © 2018 www.massapi.com. 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.