Interface BaseEntity

All Superinterfaces:
Identifiable, org.bukkit.persistence.PersistentDataHolder, io.papermc.paper.persistence.PersistentDataViewHolder
All Known Subinterfaces:
BaseBukkitEntity, BaseBukkitPlayer, BasePlayer

public interface BaseEntity extends Identifiable, org.bukkit.persistence.PersistentDataHolder
An adapter of entity
  • Method Summary

    Modifier and Type
    Method
    Description
    float
    Gets entity's body yaw (y-rot)
    @Nullable net.kyori.adventure.text.Component
    Gets custom name of this entity
    float
    Gets entity's damage tick
    boolean
    Checks source entity is dead
    boolean
    fly()
    Check source entity is on the fly
    boolean
    Check source entity is on a glow
    boolean
    Checks source entity is on the ground
    @NotNull Object
    Gets vanilla entity
    default boolean
    Checks this entity has controlling passenger
    default boolean
    Checks this entity has model data
    float
    Gets entity's yaw (y-rot)
    int
    id()
    Gets entity id
    boolean
    Checks source entity is invisible
    @NotNull org.bukkit.Location
    Gets location
    Gets main hand item
    default @Nullable String
    Gets this entity's model data
    default void
    modelData(@Nullable String modelData)
    Sets this entity's model data
    static @NotNull BaseBukkitEntity
    of(@NotNull org.bukkit.entity.Entity entity)
    Gets base entity
    Gets offhand item
    boolean
    Check source entity is on a walk
    @NotNull org.joml.Vector3f
    passengerPosition(@NotNull org.joml.Vector3f dest)
    Gets entity's passenger point
    float
    Gets entity's pitch (x-rot)
    Gets tracker registry of this adapter
    double
    Gets entity's scale
    @NotNull Stream<org.bukkit.entity.Player>
    Gets tracked player set
    float
    Gets entity's walk speed

    Methods inherited from interface kr.toxicity.model.api.nms.Identifiable

    uuid

    Methods inherited from interface org.bukkit.persistence.PersistentDataHolder

    getPersistentDataContainer
  • Method Details

    • of

      @NotNull static @NotNull BaseBukkitEntity of(@NotNull @NotNull org.bukkit.entity.Entity entity)
      Gets base entity
      Parameters:
      entity - bukkit entity
      Returns:
      base entity
    • customName

      @Nullable @Nullable net.kyori.adventure.text.Component customName()
      Gets custom name of this entity
      Returns:
      custom name
    • handle

      @NotNull @NotNull Object handle()
      Gets vanilla entity
      Returns:
      vanilla entity
    • id

      int id()
      Gets entity id
      Specified by:
      id in interface Identifiable
      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
    • headYaw

      float headYaw()
      Gets entity's yaw (y-rot)
      Returns:
      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

      @NotNull @NotNull Stream<org.bukkit.entity.Player> trackedBy()
      Gets tracked player set
      Returns:
      tracked player set
    • location

      @NotNull @NotNull org.bukkit.Location location()
      Gets location
      Returns:
      location
    • mainHand

      @NotNull @NotNull TransformedItemStack mainHand()
      Gets main hand item
      Returns:
      main hand
    • offHand

      @NotNull @NotNull TransformedItemStack offHand()
      Gets offhand item
      Returns:
      offhand
    • registry

      @NotNull default @NotNull Optional<EntityTrackerRegistry> 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

      @Nullable default @Nullable String modelData()
      Gets this entity's model data
      Returns:
      model data
    • modelData

      default void modelData(@Nullable @Nullable String modelData)
      Sets this entity's model data
      Parameters:
      modelData - model data