Package org.spongepowered.api.entity
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 inEntityType
are the "same category" grouping. Examples can be for monsters to includeZombie
,Creeper
, while a creature may includeChicken
.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description 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.boolean
friendly()
Whether this category of entities is considered "friendly".-
Methods inherited from interface org.spongepowered.api.registry.DefaultedRegistryValue
asDefaultedReference, findKey, key
-
-
-
-
Method Detail
-
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
-
-