Package kr.toxicity.model.api.tracker
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
Entity tracker
-
Nested Class Summary
Nested classes/interfaces inherited from class kr.toxicity.model.api.tracker.Tracker
Tracker.BundlerSet, Tracker.CloseReason, Tracker.ScheduledPacketHandler -
Field Summary
Fields inherited from class kr.toxicity.model.api.tracker.Tracker
MINECRAFT_TICK_MULTIPLIER, modifier, pipeline, rotator, scaler, TRACKER_TICK_INTERVAL -
Constructor Summary
ConstructorsConstructorDescriptionEntityTracker(@NotNull EntityTrackerRegistry registry, @NotNull RenderPipeline pipeline, @NotNull TrackerModifier modifier, @NotNull Consumer<EntityTracker> preUpdateConsumer) Creates entity tracker -
Method Summary
Modifier and TypeMethodDescription@NotNull TrackerData@NotNull EntityBodyRotatorGets body rotatorbooleancanBeSpawnedAt(@NotNull org.bukkit.OfflinePlayer player) Checks this model can be spawned at given playervoidCancels damage tint taskbooleancreateHitBox(@NotNull BonePredicate predicate, @Nullable HitBoxListener listener) Creates hit-boxvoidApplies damage tintintGets damage tint valuevoiddamageTintValue(int tint) Sets damage tint valuevoiddespawn()Despawns this tracker to all players@NotNull EntityHideOptionvoidhideOption(@NotNull EntityHideOption hideOption) @NotNull org.bukkit.Locationlocation()Gets location of a model.booleanmarkPlayerForSpawn(@NotNull Set<UUID> uuids) Marks specific player for spawningbooleanmarkPlayerForSpawn(@NotNull org.bukkit.OfflinePlayer player) Marks specific player for spawningvoidmoveDuration(int duration) Sets move duration of this model.voidrefresh()Refresh this tracker@NotNull EntityTrackerRegistryregistry()Gets registry.@NotNull ModelRotationrotation()Gets model rotation.@NotNull org.bukkit.entity.EntityGets source entitybooleanunmarkPlayerForSpawn(@NotNull org.bukkit.OfflinePlayer player) Unmarks specific player for spawningvoidSyncs this tracker to base entity's data.Methods inherited from class kr.toxicity.model.api.tracker.Tracker
animate, animate, animate, animate, animate, animate, animate, bone, bone, bone, bones, close, close, createHitBox, createNametag, displays, equals, forceUpdate, forRemoval, forRemoval, frame, handleCloseEvent, hashCode, height, hide, isClosed, isHide, isScheduled, isSpawned, isSpawned, modifier, name, pause, perPlayerTick, playerCount, remove, renderer, replace, replace, replace, rotation, rotator, scaler, scaler, schedule, show, spawn, stopAnimation, stopAnimation, stopAnimation, task, tick, tick, tint, tint, tryUpdate, update, update, update, update, updateDisplay, updateDisplay, viewedPlayer
-
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- registrypipeline- render instancemodifier- modifierpreUpdateConsumer- task on pre-update
-
-
Method Details
-
rotation
Description copied from class:TrackerGets model rotation. -
updateBaseEntity
public void updateBaseEntity()Syncs this tracker to base entity's data. -
registry
Gets registry.- Returns:
- registry
-
createHitBox
public boolean createHitBox(@NotNull @NotNull BonePredicate predicate, @Nullable @Nullable HitBoxListener listener) Creates hit-box- Parameters:
predicate- predicatelistener- 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:TrackerDespawns this tracker to all players -
location
@NotNull public @NotNull org.bukkit.Location location()Description copied from class:TrackerGets location of a model. -
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
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
-
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
-
hideOption
-