LegacySpawnBeaconEntity

public class LegacySpawnBeaconEntity extends Entity

Class LegacySpawnBeaconEntity. Provides legacyspawnbeaconentity functionality for the Hytale server.

java.lang.Object > Entity > LegacySpawnBeaconEntity

Field Summary

spawnController

private BeaconSpawnController spawnController

Field spawnController.

objectiveUUID

protected UUID objectiveUUID

Field objectiveUUID.

spawnWrapper

private BeaconSpawnWrapper spawnWrapper

Field spawnWrapper.

spawnConfigId

private String spawnConfigId

Field spawnConfigId.

nextSpawnAfter

private Instant nextSpawnAfter

Field nextSpawnAfter.

nextSpawnAfterRealtime

private boolean nextSpawnAfterRealtime

Field nextSpawnAfterRealtime.

despawnSelfAfter

private Instant despawnSelfAfter

Field despawnSelfAfter.

spawnAttempts

private int spawnAttempts

Field spawnAttempts.

lastPlayerCount

private int lastPlayerCount

Field lastPlayerCount.

targetPlayerComponent

final Player targetPlayerComponent

Field targetPlayerComponent.

floodFillPositionSelectorComponent

final FloodFillPositionSelector floodFillPositionSelectorComponent

Field floodFillPositionSelectorComponent.

flockMembershipComponent

final FlockMembership flockMembershipComponent

Field flockMembershipComponent.

flockReference

final Ref flockReference

Field flockReference.

entityGroup

final EntityGroup entityGroup

Field entityGroup.

legacySpawnBeaconComponent

final LegacySpawnBeaconEntity legacySpawnBeaconComponent

Field legacySpawnBeaconComponent.

beaconSpawn

final BeaconNPCSpawn beaconSpawn

Field beaconSpawn.

realtime

final boolean realtime

Field realtime.

spawnAfterRange

final Duration[] spawnAfterRange

Field spawnAfterRange.

nextValue

final Duration nextValue

Field nextValue.

worldTimeResource

final WorldTimeResource worldTimeResource

Field worldTimeResource.

spawnAfterRange2

final Duration[] spawnAfterRange2

Field spawnAfterRange2.

nextValue2

final Duration nextValue2

Field nextValue2.

transformComponent

final TransformComponent transformComponent

Field transformComponent.

spawnBeaconReference

final SpawnBeaconReference spawnBeaconReference

Field spawnBeaconReference.

npcComponent

final NPCEntity npcComponent

Field npcComponent.

role

final Role role

Field role.

spawn

final BeaconNPCSpawn spawn

Field spawn.

spawnState

final String spawnState

Field spawnState.

holder

final Holder holder

Field holder.

ref

final Ref ref

Field ref.

entity

final LegacySpawnBeaconEntity entity

Field entity.

modelName

final String modelName

Field modelName.

displayNameComponent

final DisplayNameComponent displayNameComponent

Field displayNameComponent.

initialSpawnDelay

final double[] initialSpawnDelay

Field initialSpawnDelay.

delay

final InitialBeaconDelay delay

Field delay.

suppression

final String suppression

Field suppression.

Method Detail

getComponentType

public LegacySpawnBeaconEntity> getComponentType ()

Method getComponentType.

LegacySpawnBeaconEntity

public public LegacySpawnBeaconEntity (@Nullable final World world)

Method LegacySpawnBeaconEntity.

Parameters:
@Nullable final World world

getSpawnConfigId

public String getSpawnConfigId ()

Method getSpawnConfigId.

getSpawnController

public BeaconSpawnController getSpawnController ()

Method getSpawnController.

setSpawnController

public void setSpawnController (@Nonnull final BeaconSpawnController spawnController)

Method setSpawnController.

Parameters:
@Nonnull final BeaconSpawnController spawnController

getNextSpawnAfter

public Instant getNextSpawnAfter ()

Method getNextSpawnAfter.

isNextSpawnAfterRealtime

public boolean isNextSpawnAfterRealtime ()

Method isNextSpawnAfterRealtime.

getDespawnSelfAfter

public Instant getDespawnSelfAfter ()

Method getDespawnSelfAfter.

setSpawnAttempts

public void setSpawnAttempts (final int spawnAttempts)

Method setSpawnAttempts.

Parameters:
final int spawnAttempts

getSpawnWrapper

public BeaconSpawnWrapper getSpawnWrapper ()

Method getSpawnWrapper.

setSpawnWrapper

public void setSpawnWrapper (final BeaconSpawnWrapper spawnWrapper)

Method setSpawnWrapper.

Parameters:
final BeaconSpawnWrapper spawnWrapper

getSpawnAttempts

public int getSpawnAttempts ()

Method getSpawnAttempts.

getLastPlayerCount

public int getLastPlayerCount ()

Method getLastPlayerCount.

setLastPlayerCount

public void setLastPlayerCount (final int lastPlayerCount)

Method setLastPlayerCount.

Parameters:
final int lastPlayerCount

setSpawnConfiguration

private void setSpawnConfiguration (final BeaconSpawnWrapper spawn)

Method setSpawnConfiguration.

Parameters:
final BeaconSpawnWrapper spawn

setSpawnConfigId

private void setSpawnConfigId (final String spawnConfigId)

Method setSpawnConfigId.

Parameters:
final String spawnConfigId

getObjectiveUUID

public UUID getObjectiveUUID ()

Method getObjectiveUUID.

setObjectiveUUID

public void setObjectiveUUID (@Nullable final UUID objectiveUUID)

Method setObjectiveUUID.

Parameters:
@Nullable final UUID objectiveUUID

isHiddenFromLivingEntity

public boolean isHiddenFromLivingEntity (@Nonnull final Ref ref, @Nonnull final Ref targetRef, @Nonnull final ComponentAccessor componentAccessor)

Method isHiddenFromLivingEntity.

Parameters:
@Nonnull final Ref ref
@Nonnull final Ref targetRef
@Nonnull final ComponentAccessor componentAccessor

isCollidable

public boolean isCollidable ()

Method isCollidable.

moveTo

public void moveTo (@Nonnull final Ref ref, final double locX, final double locY, final double locZ, @Nonnull final ComponentAccessor componentAccessor)

Method moveTo.

Parameters:
@Nonnull final Ref ref
final double locX
final double locY
final double locZ
@Nonnull final ComponentAccessor componentAccessor

notifyFailedSpawn

public void notifyFailedSpawn ()

Method notifyFailedSpawn.

notifySpawn

public void notifySpawn (@Nonnull final Player target, @Nonnull final Ref spawnedEntity, @Nonnull final Store store)

Method notifySpawn.

Parameters:
@Nonnull final Player target
@Nonnull final Ref spawnedEntity
@Nonnull final Store store

prepareNextSpawnTimer

static void prepareNextSpawnTimer (@Nonnull final Ref ref, @Nonnull final ComponentAccessor componentAccessor)

Method prepareNextSpawnTimer.

Parameters:
@Nonnull final Ref ref
@Nonnull final ComponentAccessor componentAccessor

clearDespawnTimer

static void clearDespawnTimer (@Nonnull final Ref ref, @Nonnull final ComponentAccessor componentAccessor)

Method clearDespawnTimer.

Parameters:
@Nonnull final Ref ref
@Nonnull final ComponentAccessor componentAccessor

setToDespawnAfter

static void setToDespawnAfter (@Nonnull final Ref ref, @Nullable final Duration duration, @Nonnull final ComponentAccessor componentAccessor)

Method setToDespawnAfter.

Parameters:
@Nonnull final Ref ref
@Nullable final Duration duration
@Nonnull final ComponentAccessor componentAccessor

markNPCUnspawnable

public void markNPCUnspawnable (final int roleIndex)

Method markNPCUnspawnable.

Parameters:
final int roleIndex

prepareSpawnContext

public boolean prepareSpawnContext (@Nonnull final Vector3d playerPosition, final int spawnsThisRound, final int roleIndex, @Nonnull final SpawningContext spawningContext, @Nonnull final CommandBuffer commandBuffer)

Method prepareSpawnContext.

Parameters:
@Nonnull final Vector3d playerPosition
final int spawnsThisRound
final int roleIndex
@Nonnull final SpawningContext spawningContext
@Nonnull final CommandBuffer commandBuffer

processSpawn

private void processSpawn (@Nonnull final Ref ref, @Nonnull final Player target, @Nonnull final Store store)

Method processSpawn.

Parameters:
@Nonnull final Ref ref
@Nonnull final Player target
@Nonnull final Store store

create

public LegacySpawnBeaconEntity> create (@Nonnull final BeaconSpawnWrapper spawnWrapper, @Nonnull final Vector3d position, @Nonnull final Vector3f rotation, @Nonnull final ComponentAccessor componentAccessor)

Method create.

Parameters:
@Nonnull final BeaconSpawnWrapper spawnWrapper
@Nonnull final Vector3d position
@Nonnull final Vector3f rotation
@Nonnull final ComponentAccessor componentAccessor

createHolder

static Holder createHolder (@Nonnull final BeaconSpawnWrapper spawnWrapper, @Nonnull final Vector3d position, @Nonnull final Vector3f rotation)

Method createHolder.

Parameters:
@Nonnull final BeaconSpawnWrapper spawnWrapper
@Nonnull final Vector3d position
@Nonnull final Vector3f rotation

TransformComponent

public new TransformComponent (position, rotation)

Method TransformComponent.

Parameters:
position position
rotation rotation

ModelComponent

public new ModelComponent (model)

Method ModelComponent.

Parameters:
model model

PersistentModel

public new PersistentModel (model.toReference()

Method PersistentModel.

Parameters:
model.toReference( model.toReference(

DisplayNameComponent

public new DisplayNameComponent (Message.raw(spawnConfigId)

Method DisplayNameComponent.

Parameters:
Message.raw(spawnConfigId Message.raw(spawnConfigId

Nameplate

public new Nameplate (spawnConfigId)

Method Nameplate.

Parameters:
spawnConfigId spawnConfigId

SpawnSuppressionComponent

public new SpawnSuppressionComponent (suppression)

Method SpawnSuppressionComponent.

Parameters:
suppression suppression

toString

public String toString ()

Method toString.