Interface EntityType
- All Known Implementing Classes:
EntityTypes1_10.EntityType
,EntityTypes1_11.EntityType
,EntityTypes1_12.EntityType
,EntityTypes1_13.EntityType
,EntityTypes1_14
,EntityTypes1_15
,EntityTypes1_16
,EntityTypes1_16_2
,EntityTypes1_17
,EntityTypes1_19
,EntityTypes1_19_3
,EntityTypes1_19_4
,EntityTypes1_20_3
,EntityTypes1_20_5
,EntityTypes1_8.EntityType
,EntityTypes1_9.EntityType
public interface EntityType
-
Method Summary
Modifier and TypeMethodDescriptionint
getId()
Returns the entity id.@Nullable EntityType
Returns the parent entity type if present.Returns the entity's Vanilla identifier.default boolean
is
(EntityType type) boolean
Returns whether the type does not represent an actual entity, e.g.default boolean
isOrHasParent
(EntityType type) Returns whether the current type is equal to the given type, or has it as a parent type.name()
Returns the entity type name, not necessarily matching the Vanilla type name.
-
Method Details
-
getId
int getId()Returns the entity id.- Returns:
- entity id
- Throws:
IllegalStateException
- if ids have not been loaded yet
-
getParent
@Nullable EntityType getParent()Returns the parent entity type if present.- Returns:
- parent entity type if present
-
name
String name()Returns the entity type name, not necessarily matching the Vanilla type name.- Returns:
- entity type name
-
identifier
String identifier()Returns the entity's Vanilla identifier.- Returns:
- entity identifier
- Throws:
IllegalArgumentException
- ifisAbstractType()
returns true
-
isAbstractType
boolean isAbstractType()Returns whether the type does not represent an actual entity, e.g. animal or monster.- Returns:
- whether the type does not represent an actual entity
-
is
-
isOrHasParent
Returns whether the current type is equal to the given type, or has it as a parent type.- Parameters:
type
- entity type to check against- Returns:
- true if the current type is equal to the given type, or has it as a parent type
-