Interface Enderman

All Superinterfaces:
Attributable, Audience, CommandSender, Creature, Damageable, Enemy, Entity, Frictional, HoverEventSource<HoverEvent.ShowEntity>, LivingEntity, Lootable, Metadatable, Mob, Monster, Nameable, Permissible, PersistentDataHolder, Pointered, ProjectileSource, ServerOperator, Sound.Emitter

public interface Enderman extends Monster
Represents an Enderman.
  • Method Details

    • teleportRandomly

      boolean teleportRandomly()
      Try to teleport the enderman to a random nearby location. May conditionally fail if the random location was not valid
      Returns:
      If the enderman teleported successfully or not
    • getCarriedMaterial

      Deprecated.
      Gets the id and data of the block that the Enderman is carrying.
      Returns:
      MaterialData containing the id and data of the block
    • setCarriedMaterial

      @Deprecated void setCarriedMaterial(@NotNull @NotNull MaterialData material)
      Sets the id and data of the block that the Enderman is carrying.
      Parameters:
      material - data to set the carried block to
    • getCarriedBlock

      @Nullable @Nullable BlockData getCarriedBlock()
      Gets the data of the block that the Enderman is carrying.
      Returns:
      BlockData containing the carried block, or null if none
    • setCarriedBlock

      void setCarriedBlock(@Nullable @Nullable BlockData blockData)
      Sets the data of the block that the Enderman is carrying.
      Parameters:
      blockData - data to set the carried block to, or null to remove
    • teleport

      @Experimental boolean teleport()
      Randomly teleports the Enderman in a 64x64x64 block cuboid region.

      If the randomly selected point is in the ground, the point is moved 1 block down until air is found or until it goes under WorldInfo.getMinHeight().

      This method will return false if this Enderman is not alive, or if the teleport location was obstructed, or if the teleport location is in water.

      Returns:
      true if the teleport succeeded.
    • teleportTowards

      @Experimental boolean teleportTowards(@NotNull @NotNull Entity entity)
      Randomly teleports the Enderman towards the given entity.

      The point is selected by drawing a vector between this enderman and the given entity. That vector's length is set to 16 blocks. That point is then moved within a 8x8x8 cuboid region. If the randomly selected point is in the ground, the point is moved 1 block down until air is found or until it goes under WorldInfo.getMinHeight().

      This method will return false if this Enderman is not alive, or if the teleport location was obstructed, or if the teleport location is in water.

      Parameters:
      entity - The entity to teleport towards.
      Returns:
      true if the teleport succeeded.
    • isScreaming

      boolean isScreaming()
      Returns whether the enderman is screaming/angry.
      Returns:
      whether the enderman is screaming
    • setScreaming

      void setScreaming(boolean screaming)
      Sets whether the enderman is screaming/angry.
      Parameters:
      screaming - whether the enderman is screaming
    • hasBeenStaredAt

      boolean hasBeenStaredAt()
      Returns whether the enderman has been stared at. If set to true, players will hear an ambient sound.
      Returns:
      whether the enderman has been stared at
    • setHasBeenStaredAt

      void setHasBeenStaredAt(boolean hasBeenStaredAt)
      Sets whether the enderman has been stared at. If set to true, players will hear an ambient sound.
      Parameters:
      hasBeenStaredAt - whether the enderman has been stared at