Interface Creature

All Superinterfaces:
CommandSender, Damageable, Entity, LivingEntity, Metadatable, Permissible, ProjectileSource, ServerOperator
All Known Subinterfaces:
Ageable, Animals, Blaze, CaveSpider, Chicken, Cow, Creeper, Enderman, Endermite, Giant, Golem, Guardian, Horse, IronGolem, Monster, MushroomCow, NPC, Ocelot, Pig, PigZombie, Rabbit, Sheep, Silverfish, Skeleton, Snowman, Spider, Villager, Witch, Wither, Wolf, Zombie

public interface Creature
extends LivingEntity
Represents a Creature. Creatures are non-intelligent monsters or animals which have very simple abilities.
  • Method Details

    • setTarget

      void setTarget​(LivingEntity target)
      Instructs this Creature to set the specified LivingEntity as its target.

      Hostile creatures may attack their target, and friendly creatures may follow their target.

      Parameters:
      target - New LivingEntity to target, or null to clear the target
    • getTarget

      LivingEntity getTarget()
      Gets the current target of this Creature
      Returns:
      Current target of this creature, or null if none exists