Class SpawnMarkerEntity

java.lang.Object
com.hypixel.hytale.server.spawning.spawnmarkers.SpawnMarkerEntity
All Implemented Interfaces:
Component<EntityStore>, Cloneable

public class SpawnMarkerEntity extends Object implements Component<EntityStore>
  • Field Details

    • SPAWN_LOST_TIMEOUT

      private static final double SPAWN_LOST_TIMEOUT
      See Also:
    • NPC_REFERENCES_CODEC

      public static final ArrayCodec<InvalidatablePersistentRef> NPC_REFERENCES_CODEC
    • CODEC

      public static final BuilderCodec<SpawnMarkerEntity> CODEC
    • MAX_FAILED_SPAWNS

      private static final int MAX_FAILED_SPAWNS
      See Also:
    • spawnMarkerId

      private String spawnMarkerId
    • cachedMarker

      private SpawnMarker cachedMarker
    • respawnCounter

      private double respawnCounter
    • gameTimeRespawn

      @Nullable private Duration gameTimeRespawn
    • spawnAfter

      @Nullable private Instant spawnAfter
    • spawnCount

      private int spawnCount
    • suppressedBy

      @Nullable private Set<UUID> suppressedBy
    • failedSpawns

      private int failedSpawns
    • context

      @Nonnull private final SpawningContext context
    • spawnPosition

      private final Vector3d spawnPosition
    • npcReferences

      private InvalidatablePersistentRef[] npcReferences
    • storedFlock

      @Nullable private StoredFlock storedFlock
    • tempStorageList

      @Nullable private List<it.unimi.dsi.fastutil.Pair<Ref<EntityStore>,NPCEntity>> tempStorageList
    • timeToDeactivation

      private double timeToDeactivation
    • despawnStarted

      private boolean despawnStarted
    • spawnLostTimeoutCounter

      private double spawnLostTimeoutCounter
  • Constructor Details

    • SpawnMarkerEntity

      public SpawnMarkerEntity()
  • Method Details

    • getComponentType

      public static ComponentType<EntityStore,SpawnMarkerEntity> getComponentType()
    • getCachedMarker

      public SpawnMarker getCachedMarker()
    • setCachedMarker

      public void setCachedMarker(SpawnMarker marker)
    • getSpawnCount

      public int getSpawnCount()
    • setSpawnCount

      public void setSpawnCount(int spawnCount)
    • setRespawnCounter

      public void setRespawnCounter(double respawnCounter)
    • setSpawnAfter

      public void setSpawnAfter(Instant spawnAfter)
    • getSpawnAfter

      @Nullable public Instant getSpawnAfter()
    • setGameTimeRespawn

      public void setGameTimeRespawn(Duration gameTimeRespawn)
    • pollGameTimeRespawn

      @Nullable public Duration pollGameTimeRespawn()
    • tickRespawnTimer

      public boolean tickRespawnTimer(float dt)
    • getSuppressedBy

      @Nullable public Set<UUID> getSuppressedBy()
    • setStoredFlock

      public void setStoredFlock(StoredFlock storedFlock)
    • getStoredFlock

      @Nullable public StoredFlock getStoredFlock()
    • getTimeToDeactivation

      public double getTimeToDeactivation()
    • setTimeToDeactivation

      public void setTimeToDeactivation(double timeToDeactivation)
    • tickTimeToDeactivation

      public boolean tickTimeToDeactivation(float dt)
    • tickSpawnLostTimeout

      public boolean tickSpawnLostTimeout(float dt)
    • getSpawnPosition

      @Nonnull public Vector3d getSpawnPosition()
    • getNpcReferences

      public InvalidatablePersistentRef[] getNpcReferences()
    • setNpcReferences

      public void setNpcReferences(InvalidatablePersistentRef[] npcReferences)
    • getTempStorageList

      @Nullable public List<it.unimi.dsi.fastutil.Pair<Ref<EntityStore>,NPCEntity>> getTempStorageList()
    • setTempStorageList

      public void setTempStorageList(List<it.unimi.dsi.fastutil.Pair<Ref<EntityStore>,NPCEntity>> tempStorageList)
    • isDespawnStarted

      public boolean isDespawnStarted()
    • setDespawnStarted

      public void setDespawnStarted(boolean despawnStarted)
    • refreshTimeout

      public void refreshTimeout()
    • spawnNPC

      public boolean spawnNPC(@Nonnull Ref<EntityStore> ref, @Nonnull SpawnMarker marker, @Nonnull Store<EntityStore> store)
    • fail

      private void fail(@Nonnull Ref<EntityStore> self, UUID uuid, String npc, Vector3d position, @Nonnull Store<EntityStore> store, SpawnMarkerEntity.FailReason reason)
    • setSpawnMarker

      public void setSpawnMarker(@Nonnull SpawnMarker marker)
    • decrementAndGetSpawnCount

      public int decrementAndGetSpawnCount()
    • getSpawnMarkerId

      public String getSpawnMarkerId()
    • isManualTrigger

      public boolean isManualTrigger()
    • trigger

      public boolean trigger(@Nonnull Ref<EntityStore> markerRef, @Nonnull Store<EntityStore> store)
    • suppress

      public void suppress(UUID suppressor)
    • releaseSuppression

      public void releaseSuppression(UUID suppressor)
    • clearAllSuppressions

      public void clearAllSuppressions()
    • clone

      @Nonnull public Component<EntityStore> clone()
      Specified by:
      clone in interface Component<EntityStore>
      Overrides:
      clone in class Object
    • toString

      @Nonnull public String toString()
      Overrides:
      toString in class Object
    • getModel

      public static Model getModel(@Nonnull SpawnMarker marker)