Class LegacySpawnBeaconEntity

java.lang.Object
com.hypixel.hytale.server.core.entity.Entity
com.hypixel.hytale.server.spawning.beacons.LegacySpawnBeaconEntity
All Implemented Interfaces:
Component<EntityStore>, Cloneable

public class LegacySpawnBeaconEntity extends Entity
  • Field Details

  • Constructor Details

    • LegacySpawnBeaconEntity

      public LegacySpawnBeaconEntity(@Nullable World world)
  • Method Details

    • getComponentType

      @Nullable public static ComponentType<EntityStore, LegacySpawnBeaconEntity> getComponentType()
      Returns:
      the component type for the LegacySpawnBeaconEntity component.
    • getSpawnConfigId

      public String getSpawnConfigId()
    • getSpawnController

      public BeaconSpawnController getSpawnController()
    • setSpawnController

      public void setSpawnController(@Nonnull BeaconSpawnController spawnController)
    • getNextSpawnAfter

      public Instant getNextSpawnAfter()
    • isNextSpawnAfterRealtime

      public boolean isNextSpawnAfterRealtime()
    • getDespawnSelfAfter

      @Nullable public Instant getDespawnSelfAfter()
    • setSpawnAttempts

      public void setSpawnAttempts(int spawnAttempts)
    • getSpawnWrapper

      public BeaconSpawnWrapper getSpawnWrapper()
    • setSpawnWrapper

      public void setSpawnWrapper(BeaconSpawnWrapper spawnWrapper)
    • getSpawnAttempts

      public int getSpawnAttempts()
    • getLastPlayerCount

      public int getLastPlayerCount()
    • setLastPlayerCount

      public void setLastPlayerCount(int lastPlayerCount)
    • getEnvironmentIndex

      public int getEnvironmentIndex()
    • setEnvironmentIndex

      public void setEnvironmentIndex(int environmentIndex)
    • getObjectiveUUID

      @Nullable public UUID getObjectiveUUID()
      Returns:
      the objective UUID of this spawn beacon.
    • setObjectiveUUID

      public void setObjectiveUUID(@Nullable UUID objectiveUUID)
      Called to set the objective UUID of this spawn beacon.
      Parameters:
      objectiveUUID - The objective UUID to set.
    • isHiddenFromLivingEntity

      public boolean isHiddenFromLivingEntity(@Nonnull Ref<EntityStore> ref, @Nonnull Ref<EntityStore> targetRef, @Nonnull ComponentAccessor<EntityStore> componentAccessor)
      Description copied from class: Entity
      Determines whether this entity is hidden from the given target entity
      Overrides:
      isHiddenFromLivingEntity in class Entity
      Parameters:
      ref - The entity reference of this entity
      targetRef - The entity reference of the target entity
      componentAccessor - The ComponentAccessor for component access
      Returns:
      true if they are hidden from the target entity, false otherwise
    • isCollidable

      public boolean isCollidable()
      Overrides:
      isCollidable in class Entity
      Returns:
      true if this entity is collidable, false otherwise.
    • moveTo

      public void moveTo(@Nonnull Ref<EntityStore> ref, double locX, double locY, double locZ, @Nonnull ComponentAccessor<EntityStore> componentAccessor)
      Overrides:
      moveTo in class Entity
      Parameters:
      ref - The entity reference of this entity.
      locX - The X coordinate to move to.
      locY - The Y coordinate to move to.
      locZ - The Z coordinate to move to.
      componentAccessor - The ComponentAccessor<EntityStore> for component access.
    • notifyFailedSpawn

      public void notifyFailedSpawn()
    • notifySpawn

      public void notifySpawn(@Nonnull Ref<EntityStore> targetRef, @Nonnull Ref<EntityStore> spawnedEntity, @Nonnull Store<EntityStore> store)
    • prepareNextSpawnTimer

      public static void prepareNextSpawnTimer(@Nonnull Ref<EntityStore> ref, @Nonnull ComponentAccessor<EntityStore> componentAccessor)
    • clearDespawnTimer

      public static void clearDespawnTimer(@Nonnull Ref<EntityStore> ref, @Nonnull ComponentAccessor<EntityStore> componentAccessor)
    • setToDespawnAfter

      public static void setToDespawnAfter(@Nonnull Ref<EntityStore> ref, @Nullable Duration duration, @Nonnull ComponentAccessor<EntityStore> componentAccessor)
    • markNPCUnspawnable

      public void markNPCUnspawnable(int roleIndex)
    • prepareSpawnContext

      public boolean prepareSpawnContext(@Nonnull org.joml.Vector3d playerPosition, int spawnsThisRound, int roleIndex, @Nonnull SpawningContext spawningContext, @Nonnull CommandBuffer<EntityStore> commandBuffer)
    • create

      @Nonnull public static it.unimi.dsi.fastutil.Pair<Ref<EntityStore>, LegacySpawnBeaconEntity> create(@Nonnull BeaconSpawnWrapper spawnWrapper, @Nonnull org.joml.Vector3dc position, @Nonnull Rotation3fc rotation, @Nonnull ComponentAccessor<EntityStore> componentAccessor)
    • createHolder

      public static Holder<EntityStore> createHolder(@Nonnull BeaconSpawnWrapper spawnWrapper, @Nonnull org.joml.Vector3dc position, @Nonnull Rotation3fc rotation)
    • toString

      @Nonnull public String toString()
      Overrides:
      toString in class Entity