public interface EntityType
Modifier and Type | Method and Description |
---|---|
int |
getId()
Returns the entity id.
|
@Nullable EntityType |
getParent()
Returns the parent entity type if present.
|
java.lang.String |
identifier()
Returns the entity's Vanilla identifier.
|
default boolean |
is(EntityType... types)
Deprecated.
|
default boolean |
is(EntityType type) |
boolean |
isAbstractType()
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.
|
java.lang.String |
name()
Returns the entity type name, not necessarily matching the Vanilla type name.
|
int getId()
java.lang.IllegalStateException
- if ids have not been loaded yet@Nullable EntityType getParent()
java.lang.String name()
java.lang.String identifier()
java.lang.IllegalArgumentException
- if isAbstractType()
returns trueboolean isAbstractType()
@Deprecated default boolean is(EntityType... types)
default boolean is(EntityType type)
default boolean isOrHasParent(EntityType type)
type
- entity type to check against