Package kr.toxicity.model.api.entity
Interface BaseEntity
- All Superinterfaces:
Identifiable
- All Known Subinterfaces:
BasePlayer
An adapter of entity
-
Method Summary
Modifier and TypeMethodDescriptionfloatbodyYaw()Gets entity's body yaw (y-rot)@Nullable net.kyori.adventure.text.ComponentGets custom name of this entityfloatGets entity's damage tickbooleandead()Checks source entity is deadbooleanfly()Check source entity is on the flybooleanglow()Check source entity is on a glowbooleanground()Checks source entity is on the ground@NotNull Objecthandle()Gets vanilla entitydefault booleanChecks this entity has controlling passengerdefault booleanChecks this entity has model datafloatheadYaw()Gets entity's head yaw (y-rot)intid()Gets entity idbooleanChecks source entity is invisibledefault @NotNull PlatformLocationlocation()Gets the current location of the entity.@NotNull TransformedItemStackmainHand()Gets main hand item@Nullable StringGets this entity's model datavoidSets this entity's model datastatic @NotNull BaseEntityof(@NotNull PlatformEntity entity) Gets base entity@NotNull TransformedItemStackoffHand()Gets offhand itembooleanonWalk()Check source entity is on a walk@NotNull org.joml.Vector3fpassengerPosition(@NotNull org.joml.Vector3f dest) Gets entity's passenger pointfloatpitch()Gets entity's pitch (x-rot)@NotNull PlatformEntityplatform()Gets the platform-specific entity object.default @NotNull Optional<EntityTrackerRegistry> registry()Gets tracker registry of this adapterdoublescale()Gets entity's scale@NotNull Stream<PlatformPlayer> Gets tracked player setfloatGets entity's walk speedfloatyaw()Gets entity's yaw (y-rot)Methods inherited from interface kr.toxicity.model.api.nms.Identifiable
uuid
-
Method Details
-
of
Gets base entity- Parameters:
entity- platform entity- Returns:
- base entity
-
platform
Gets the platform-specific entity object.- Returns:
- The platform entity.
- Since:
- 2.0.0
-
location
Gets the current location of the entity.- Returns:
- The entity's location.
- Since:
- 2.0.0
-
customName
@Nullable @Nullable net.kyori.adventure.text.Component customName()Gets custom name of this entity- Returns:
- custom name
-
handle
Gets vanilla entity- Returns:
- vanilla entity
-
id
int id()Gets entity id- Specified by:
idin interfaceIdentifiable- Returns:
- entity id
-
dead
boolean dead()Checks source entity is dead- Returns:
- dead
-
ground
boolean ground()Checks source entity is on the ground- Returns:
- on the ground
-
invisible
boolean invisible()Checks source entity is invisible- Returns:
- invisible
-
glow
boolean glow()Check source entity is on a glow- Returns:
- glow
-
onWalk
boolean onWalk()Check source entity is on a walk- Returns:
- walk
-
fly
boolean fly()Check source entity is on the fly- Returns:
- fly
-
scale
double scale()Gets entity's scale- Returns:
- scale
-
pitch
float pitch()Gets entity's pitch (x-rot)- Returns:
- pitch
-
bodyYaw
float bodyYaw()Gets entity's body yaw (y-rot)- Returns:
- body yaw
-
yaw
float yaw()Gets entity's yaw (y-rot)- Returns:
- yaw
-
headYaw
float headYaw()Gets entity's head yaw (y-rot)- Returns:
- head yaw
-
damageTick
float damageTick()Gets entity's damage tick- Returns:
- damage tick
-
walkSpeed
float walkSpeed()Gets entity's walk speed- Returns:
- walk speed
-
passengerPosition
@NotNull @NotNull org.joml.Vector3f passengerPosition(@NotNull @NotNull org.joml.Vector3f dest) Gets entity's passenger point- Parameters:
dest- destination vector- Returns:
- passenger point
-
trackedBy
Gets tracked player set- Returns:
- tracked player set
-
mainHand
Gets main hand item- Returns:
- main hand
-
offHand
Gets offhand item- Returns:
- offhand
-
registry
Gets tracker registry of this adapter- Returns:
- optional tracker registry
-
hasControllingPassenger
default boolean hasControllingPassenger()Checks this entity has controlling passenger- Returns:
- has controlling passenger
-
hasModelData
default boolean hasModelData()Checks this entity has model data- Returns:
- has model data
-
modelData
Gets this entity's model data- Returns:
- model data
-
modelData
Sets this entity's model data- Parameters:
modelData- model data
-