Class Entities
java.lang.Object
com.welcome234.pluginsystem.entity.Entities
This class is used for managing entities
-
Method Summary
Modifier and TypeMethodDescriptiongetAliveEntities(boolean endDimension)Gets all loaded entities are that alive in the specified dimensionstatic EntitygetEntity(int entityID)Gets an entity with the entity identifier specifiedstatic intgetEntityCount(boolean endDimension)Gets the number of loaded entities are that alive in the specified dimensionstatic intDeprecated.Entity limits were removed in 1.13.3, this now returns the maximum integer valuestatic booleanisEntityLimitReached(boolean endDimension)Deprecated.Entity limits were removed in 1.13.3, this now always returns true (not reached)static EntityspawnEntity(double x, double y, boolean endDimension, EntityTypes entity)Spawns a new entity with the specified position and type
-
Method Details
-
getAliveEntities
Gets all loaded entities are that alive in the specified dimension- Parameters:
endDimension- Dimension (false = Overworld, true = End)- Returns:
- Array list of loaded entities
-
getEntityCount
public static int getEntityCount(boolean endDimension)Gets the number of loaded entities are that alive in the specified dimension- Parameters:
endDimension- Dimension (false = Overworld, true = End)- Returns:
- Number of loaded entities
-
getEntityLimit
Deprecated.Entity limits were removed in 1.13.3, this now returns the maximum integer valueGets the maximum number of entities that can exist in each dimensionBoth dimensions have the same entity limit
- Returns:
- Entity limit
-
isEntityLimitReached
Deprecated.Entity limits were removed in 1.13.3, this now always returns true (not reached)Gets whether the entity limit is not reached in the specified dimension- Parameters:
endDimension- Dimension (false = Overworld, true = End)- Returns:
- Whether not reached
-
getEntity
Gets an entity with the entity identifier specified- Parameters:
entityID- Unique entity ID- Returns:
- Entity instance
-
spawnEntity
Spawns a new entity with the specified position and typeIf the chunk containing the entity is not loaded, it will be automatically loaded when calling this.
- Parameters:
x- X-coordinate of this entityy- Y-coordinate of this entityendDimension- Dimension to spawn this entityentity- Type of entity to spawn- Returns:
- Entity instance of the spawned entity
- Throws:
IllegalArgumentException- if entity is null
-