Class EntityTracker

java.lang.Object
kr.toxicity.model.api.tracker.Tracker
kr.toxicity.model.api.tracker.EntityTracker
All Implemented Interfaces:
AutoCloseable
Direct Known Subclasses:
PlayerTracker

public class EntityTracker extends Tracker
Entity tracker
  • Constructor Details

    • EntityTracker

      @Internal public EntityTracker(@NotNull @NotNull EntityTrackerRegistry registry, @NotNull @NotNull RenderPipeline pipeline, @NotNull @NotNull TrackerModifier modifier, @NotNull @NotNull Consumer<EntityTracker> preUpdateConsumer)
      Creates entity tracker
      Parameters:
      registry - registry
      pipeline - render instance
      modifier - modifier
      preUpdateConsumer - task on pre-update
  • Method Details

    • rotation

      @NotNull public @NotNull ModelRotation rotation()
      Description copied from class: Tracker
      Gets model rotation.
      Overrides:
      rotation in class Tracker
      Returns:
      rotation
    • updateBaseEntity

      public void updateBaseEntity()
      Syncs this tracker to base entity's data.
    • registry

      @NotNull public @NotNull EntityTrackerRegistry registry()
      Gets registry.
      Returns:
      registry
    • createHitBox

      public boolean createHitBox(@NotNull @NotNull BonePredicate predicate, @Nullable @Nullable HitBoxListener listener)
      Creates hit-box
      Parameters:
      predicate - predicate
      listener - listener
    • damageTintValue

      public int damageTintValue()
      Gets damage tint value
      Returns:
      value
    • damageTintValue

      public void damageTintValue(int tint)
      Sets damage tint value
      Parameters:
      tint - hex color
    • damageTint

      public void damageTint()
      Applies damage tint
    • despawn

      public void despawn()
      Description copied from class: Tracker
      Despawns this tracker to all players
      Overrides:
      despawn in class Tracker
    • location

      @NotNull public @NotNull org.bukkit.Location location()
      Description copied from class: Tracker
      Gets location of a model.
      Specified by:
      location in class Tracker
      Returns:
      location
    • sourceEntity

      @NotNull public @NotNull org.bukkit.entity.Entity sourceEntity()
      Gets source entity
      Returns:
      source
    • moveDuration

      public void moveDuration(int duration)
      Sets move duration of this model.
      Parameters:
      duration - duration
    • cancelDamageTint

      public void cancelDamageTint()
      Cancels damage tint task
    • refresh

      @Internal public void refresh()
      Refresh this tracker
    • markPlayerForSpawn

      public boolean markPlayerForSpawn(@NotNull @NotNull org.bukkit.OfflinePlayer player)
      Marks specific player for spawning
      Parameters:
      player - player
      Returns:
      success
    • markPlayerForSpawn

      public boolean markPlayerForSpawn(@NotNull @NotNull Set<UUID> uuids)
      Marks specific player for spawning
      Parameters:
      uuids - uuids
      Returns:
      success
    • unmarkPlayerForSpawn

      public boolean unmarkPlayerForSpawn(@NotNull @NotNull org.bukkit.OfflinePlayer player)
      Unmarks specific player for spawning
      Parameters:
      player - player
      Returns:
      success
    • asTrackerData

      @NotNull public @NotNull TrackerData asTrackerData()
    • bodyRotator

      @NotNull public @NotNull EntityBodyRotator bodyRotator()
      Gets body rotator
      Returns:
      body rotator
    • canBeSpawnedAt

      public boolean canBeSpawnedAt(@NotNull @NotNull org.bukkit.OfflinePlayer player)
      Checks this model can be spawned at given player
      Parameters:
      player - target player
      Returns:
      can be spawned
    • hideOption

      @NotNull public @NotNull EntityHideOption hideOption()
    • hideOption

      public void hideOption(@NotNull @NotNull EntityHideOption hideOption)