Interface EntityCategory

All Superinterfaces:
DefaultedRegistryValue

@CatalogedBy(EntityCategories.class) public interface EntityCategory extends DefaultedRegistryValue
A category of entities that conveys a variety of meanings to consider a group of entities that may differ in EntityType are the "same category" grouping. Examples can be for monsters to include Zombie, Creeper, while a creature may include Chicken.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Gets the distance in blocks in which an entity of this category may be considered to be despawned/removed from a World if too far from a Player.
    boolean
    Whether this category of entities is considered "friendly".

    Methods inherited from interface org.spongepowered.api.registry.DefaultedRegistryValue

    asDefaultedReference, findKey, key
  • Method Details

    • friendly

      boolean friendly()
      Whether this category of entities is considered "friendly".
      Returns:
      True if this category of entities is friendly
    • despawnDistance

      int despawnDistance()
      Gets the distance in blocks in which an entity of this category may be considered to be despawned/removed from a World if too far from a Player.

      Obvious exceptions include when the Entity logic considers itself not to be despawnable or owned/permanent by a player, function, or plugin thereof.

      Returns:
      The distance at which entities of this category may be considered to be removed if too far from a player