SpawningPlugin

public class SpawningPlugin extends JavaPlugin

The main plugin class for Spawning. This plugin provides gameplay features for the Hytale server. Extend this class to create a plugin.

java.lang.Object > JavaPlugin > SpawningPlugin

Field Summary

spawnMarkerModel

private Model spawnMarkerModel

Field spawnMarkerModel.

localSpawnControllerJoinDelay

private double localSpawnControllerJoinDelay

Field localSpawnControllerJoinDelay.

tickColumnBudget

private int tickColumnBudget

Field tickColumnBudget.

entityModule

final EntityModule entityModule

Field entityModule.

config

final NPCSpawningConfig config

Field config.

spawnMarkerModelId

final String spawnMarkerModelId

Field spawnMarkerModelId.

manager

final SpawnManager manager

Field manager.

wrapper

final SpawnWrapper wrapper

Field wrapper.

environment

final int environment

Field environment.

worldSpawnData

final WorldSpawnData worldSpawnData

Field worldSpawnData.

environmentSpawnData

final WorldEnvironmentSpawnData environmentSpawnData

Field environmentSpawnData.

npcSpawnData

final WorldNPCSpawnStat npcSpawnData

Field npcSpawnData.

world

final World world

Field world.

npCs

final RoleSpawnParameters[] npCs

Field npCs.

npcs

final RoleSpawnParameters[] npcs

Field npcs.

npc

final RoleSpawnParameters npc

Field npc.

spawnMarkerEntity

final SpawnMarkerEntity spawnMarkerEntity

Field spawnMarkerEntity.

holder

final Holder holder

Field holder.

errors

final ObjectArrayList errors

Field errors.

removedAssets

final Set removedAssets

Field removedAssets.

index

final int index

Field index.

changeSet

final IntOpenHashSet changeSet

Field changeSet.

store

final Store store

Field store.

legacySpawnBeaconComponent

final LegacySpawnBeaconEntity legacySpawnBeaconComponent

Field legacySpawnBeaconComponent.

spawnBeaconRef

final Ref spawnBeaconRef

Field spawnBeaconRef.

legacySpawnBeaconComponent2

final SpawnBeacon legacySpawnBeaconComponent2

Field legacySpawnBeaconComponent2.

spawnBeaconRef2

final Ref spawnBeaconRef2

Field spawnBeaconRef2.

holder2

final Holder holder2

Field holder2.

spawnBeaconComponent

final LegacySpawnBeaconEntity spawnBeaconComponent

Field spawnBeaconComponent.

spawnBeaconComponent2

final SpawnBeacon spawnBeaconComponent2

Field spawnBeaconComponent2.

loadedNPCs

final Int2ObjectMap loadedNPCs

Field loadedNPCs.

key

final String key

Field key.

value

final WorldNPCSpawn value

Field value.

value2

final BeaconNPCSpawn value2

Field value2.

key2

final String key2

Field key2.

index2

final int index2

Field index2.

spawn

final BeaconNPCSpawn spawn

Field spawn.

modelAsset

final ModelAsset modelAsset

Field modelAsset.

start

final long start

Field start.

spawnSuppressor

final BsonDocument spawnSuppressor

Field spawnSuppressor.

archetype

final Archetype archetype

Field archetype.

modelReference

final Model.ModelReference modelReference

Field modelReference.

spawnBudgetFactor

private double spawnBudgetFactor

Field spawnBudgetFactor.

maxActiveJobs

private int maxActiveJobs

Field maxActiveJobs.

defaultMarkerModel

private String defaultMarkerModel

Field defaultMarkerModel.

Method Detail

get

static SpawningPlugin get ()

Method get.

SpawningPlugin

public public SpawningPlugin (@Nonnull final JavaPluginInit init)

Method SpawningPlugin.

Parameters:
@Nonnull final JavaPluginInit init

setup

public void setup ()

Method setup.

SpawnCommand

public new SpawnCommand ()

Method SpawnCommand.

DefaultAssetMap

public new DefaultAssetMap ()

Method DefaultAssetMap.

IndexedLookupTableAssetMap

public new IndexedLookupTableAssetMap (WorldNPCSpawn[]::new)

Method IndexedLookupTableAssetMap.

Parameters:
WorldNPCSpawn[]::new WorldNPCSpawn[]::new

IndexedAssetMap

public new IndexedAssetMap ()

Method IndexedAssetMap.

KDTree

public new KDTree (Ref::isValid)

Method KDTree.

Parameters:
Ref::isValid Ref::isValid

LegacyBeaconSpatialSystem

public new LegacyBeaconSpatialSystem (this.legacyBeaconSpatialResource)

Method LegacyBeaconSpatialSystem.

Parameters:
this.legacyBeaconSpatialResource this.legacyBeaconSpatialResource

SpawnMarkerSpatialSystem

public new SpawnMarkerSpatialSystem (this.spawnMarkerSpatialResource)

Method SpawnMarkerSpatialSystem.

Parameters:
this.spawnMarkerSpatialResource this.spawnMarkerSpatialResource

BeaconSpatialSystem

public new BeaconSpatialSystem (this.manualSpawnBeaconSpatialResource)

Method BeaconSpatialSystem.

Parameters:
this.manualSpawnBeaconSpatialResource this.manualSpawnBeaconSpatialResource

SpawnMarkerSuppressionSystem

public new SpawnMarkerSuppressionSystem (this.spawnMarkerComponentType, this.spawnSuppressionControllerResourceType)

Method SpawnMarkerSuppressionSystem.

Parameters:
this.spawnMarkerComponentType this.spawnMarkerComponentType
this.spawnSuppressionControllerResourceType this.spawnSuppressionControllerResourceType

LocalSpawnSetupSystem

public new LocalSpawnSetupSystem (playerComponentType)

Method LocalSpawnSetupSystem.

Parameters:
playerComponentType playerComponentType

LocalSpawnControllerSystem

public new LocalSpawnControllerSystem (this.localSpawnControllerComponentType, transformComponentType, WeatherTracker.getComponentType()

Method LocalSpawnControllerSystem.

Parameters:
this.localSpawnControllerComponentType this.localSpawnControllerComponentType
transformComponentType transformComponentType
WeatherTracker.getComponentType( WeatherTracker.getComponentType(

LocalSpawnBeaconSystem

public new LocalSpawnBeaconSystem (this.localSpawnBeaconComponentType, this.localSpawnStateResourceType)

Method LocalSpawnBeaconSystem.

Parameters:
this.localSpawnBeaconComponentType this.localSpawnBeaconComponentType
this.localSpawnStateResourceType this.localSpawnStateResourceType

LocalSpawnForceTriggerSystem

public new LocalSpawnForceTriggerSystem (this.localSpawnControllerComponentType, this.localSpawnStateResourceType)

Method LocalSpawnForceTriggerSystem.

Parameters:
this.localSpawnControllerComponentType this.localSpawnControllerComponentType
this.localSpawnStateResourceType this.localSpawnStateResourceType

WorldSpawnTrackingSystem

public new WorldSpawnTrackingSystem (this.worldSpawnDataResourceType, this.chunkSpawnDataComponentType, this.chunkSpawnedNPCDataComponentType)

Method WorldSpawnTrackingSystem.

Parameters:
this.worldSpawnDataResourceType this.worldSpawnDataResourceType
this.chunkSpawnDataComponentType this.chunkSpawnDataComponentType
this.chunkSpawnedNPCDataComponentType this.chunkSpawnedNPCDataComponentType

MoonPhaseChangeEventSystem

public new MoonPhaseChangeEventSystem ()

Method MoonPhaseChangeEventSystem.

WorldSpawningSystem

public new WorldSpawningSystem (this.worldSpawnDataResourceType, this.chunkSpawnDataComponentType, this.chunkSpawnedNPCDataComponentType, this.spawnJobDataComponentType)

Method WorldSpawningSystem.

Parameters:
this.worldSpawnDataResourceType this.worldSpawnDataResourceType
this.chunkSpawnDataComponentType this.chunkSpawnDataComponentType
this.chunkSpawnedNPCDataComponentType this.chunkSpawnedNPCDataComponentType
this.spawnJobDataComponentType this.spawnJobDataComponentType

LegacySpawnSuppressorEntityMigration

public new LegacySpawnSuppressorEntityMigration ()

Method LegacySpawnSuppressorEntityMigration.

start

public void start ()

Method start.

IllegalStateException

public new IllegalStateException (String.format("Default spawn marker '%s' not found", "NPC_Spawn_Marker")

Method IllegalStateException.

Parameters:
String.format("Default spawn marker '%s' not found"
"NPC_Spawn_Marker" "NPC_Spawn_Marker"

shutdown

public void shutdown ()

Method shutdown.

getSpawnMarkerSpatialResource

public EntityStore>> getSpawnMarkerSpatialResource ()

Method getSpawnMarkerSpatialResource.

getManualSpawnBeaconSpatialResource

public EntityStore>> getManualSpawnBeaconSpatialResource ()

Method getManualSpawnBeaconSpatialResource.

getSpawnMarkerComponentType

public SpawnMarkerEntity> getSpawnMarkerComponentType ()

Method getSpawnMarkerComponentType.

getLocalSpawnControllerComponentType

public LocalSpawnController> getLocalSpawnControllerComponentType ()

Method getLocalSpawnControllerComponentType.

getWorldSpawnDataResourceType

public WorldSpawnData> getWorldSpawnDataResourceType ()

Method getWorldSpawnDataResourceType.

getSpawnSuppressorComponentType

public SpawnSuppressionComponent> getSpawnSuppressorComponentType ()

Method getSpawnSuppressorComponentType.

getSpawnSuppressionControllerResourceType

public SpawnSuppressionController> getSpawnSuppressionControllerResourceType ()

Method getSpawnSuppressionControllerResourceType.

getLocalSpawnBeaconComponentType

public LocalSpawnBeacon> getLocalSpawnBeaconComponentType ()

Method getLocalSpawnBeaconComponentType.

getLocalSpawnStateResourceType

public LocalSpawnState> getLocalSpawnStateResourceType ()

Method getLocalSpawnStateResourceType.

getInitialBeaconDelayComponentType

public InitialBeaconDelay> getInitialBeaconDelayComponentType ()

Method getInitialBeaconDelayComponentType.

getSpawnJobDataComponentType

public SpawnJobData> getSpawnJobDataComponentType ()

Method getSpawnJobDataComponentType.

getChunkSpawnDataComponentType

public ChunkSpawnData> getChunkSpawnDataComponentType ()

Method getChunkSpawnDataComponentType.

getChunkSpawnedNPCDataComponentType

public ChunkSpawnedNPCData> getChunkSpawnedNPCDataComponentType ()

Method getChunkSpawnedNPCDataComponentType.

getChunkSuppressionQueueResourceType

public ChunkSuppressionQueue> getChunkSuppressionQueueResourceType ()

Method getChunkSuppressionQueueResourceType.

getFloodFillEntryPoolProviderSimpleResourceType

public FloodFillEntryPoolProviderSimple> getFloodFillEntryPoolProviderSimpleResourceType ()

Method getFloodFillEntryPoolProviderSimpleResourceType.

getChunkSuppressionEntryComponentType

public ChunkSuppressionEntry> getChunkSuppressionEntryComponentType ()

Method getChunkSuppressionEntryComponentType.

getBeaconSpawnWrapper

public BeaconSpawnWrapper getBeaconSpawnWrapper (final int configId)

Method getBeaconSpawnWrapper.

Parameters:
final int configId

getSpawnMarkerReferenceComponentType

public SpawnMarkerReference> getSpawnMarkerReferenceComponentType ()

Method getSpawnMarkerReferenceComponentType.

getSpawnBeaconReferenceComponentType

public SpawnBeaconReference> getSpawnBeaconReferenceComponentType ()

Method getSpawnBeaconReferenceComponentType.

getFloodFillPositionSelectorComponentType

public FloodFillPositionSelector> getFloodFillPositionSelectorComponentType ()

Method getFloodFillPositionSelectorComponentType.

getSpawnMarkerBlockReferenceComponentType

public SpawnMarkerBlockReference> getSpawnMarkerBlockReferenceComponentType ()

Method getSpawnMarkerBlockReferenceComponentType.

shouldNPCDespawn

public boolean shouldNPCDespawn (@Nonnull final Store store, @Nonnull final NPCEntity npcComponent, @Nonnull final WorldTimeResource timeManager, final int configuration, final boolean beaconSpawn)

Method shouldNPCDespawn.

Parameters:
@Nonnull final Store store
@Nonnull final NPCEntity npcComponent
@Nonnull final WorldTimeResource timeManager
final int configuration
final boolean beaconSpawn

overpopulation

public to overpopulation (expected: %f, actual: %d)

Method overpopulation.

Parameters:
expected: %f
actual: %d

getSpawnMarkerModel

public Model getSpawnMarkerModel ()

Method getSpawnMarkerModel.

getWorldEnvironmentSpawnParameters

public EnvironmentSpawnParameters getWorldEnvironmentSpawnParameters (final int environmentIndex)

Method getWorldEnvironmentSpawnParameters.

Parameters:
final int environmentIndex

getBeaconSpawnsForEnvironment

public List getBeaconSpawnsForEnvironment (final int environmentIndex)

Method getBeaconSpawnsForEnvironment.

Parameters:
final int environmentIndex

getRolesForEnvironment

public IntSet getRolesForEnvironment (final int environment)

Method getRolesForEnvironment.

Parameters:
final int environment

getTickColumnBudget

public int getTickColumnBudget ()

Method getTickColumnBudget.

getMaxActiveJobs

public int getMaxActiveJobs ()

Method getMaxActiveJobs.

getLocalSpawnControllerJoinDelay

public double getLocalSpawnControllerJoinDelay ()

Method getLocalSpawnControllerJoinDelay.

validateSpawnsConfigurations

static void validateSpawnsConfigurations (final String type, @Nonnull final Map spawns, @Nonnull final List errors)

Method validateSpawnsConfigurations.

Parameters:
final String type
@Nonnull final Map spawns
@Nonnull final List errors

validateSpawnMarkers

static void validateSpawnMarkers (@Nonnull final Map markers, @Nonnull final List errors)

Method validateSpawnMarkers.

Parameters:
@Nonnull final Map markers
@Nonnull final List errors

getEnvironmentDensity

public double getEnvironmentDensity (final int environmentIndex)

Method getEnvironmentDensity.

Parameters:
final int environmentIndex

onSpawnMarkersChange

protected void onSpawnMarkersChange (@Nonnull final LoadedAssetsEvent> event)

Method onSpawnMarkersChange.

Parameters:
@Nonnull final LoadedAssetsEvent> event

onSpawnMarkersRemove

static void onSpawnMarkersRemove (@Nonnull final RemovedAssetsEvent> event)

Method onSpawnMarkersRemove.

Parameters:
@Nonnull final RemovedAssetsEvent> event

onEnvironmentChange

private void onEnvironmentChange (@Nonnull final LoadedAssetsEvent> event)

Method onEnvironmentChange.

Parameters:
@Nonnull final LoadedAssetsEvent> event

onWorldNPCSpawnsLoaded

private void onWorldNPCSpawnsLoaded (@Nonnull final LoadedAssetsEvent> event)

Method onWorldNPCSpawnsLoaded.

Parameters:
@Nonnull final LoadedAssetsEvent> event

onBeaconNPCSpawnsLoaded

private void onBeaconNPCSpawnsLoaded (@Nonnull final LoadedAssetsEvent> event)

Method onBeaconNPCSpawnsLoaded.

Parameters:
@Nonnull final LoadedAssetsEvent> event

onWorldNPCSpawnsRemoved

private void onWorldNPCSpawnsRemoved (@Nonnull final RemovedAssetsEvent> event)

Method onWorldNPCSpawnsRemoved.

Parameters:
@Nonnull final RemovedAssetsEvent> event

onBeaconNPCSpawnsRemoved

private void onBeaconNPCSpawnsRemoved (@Nonnull final RemovedAssetsEvent> event)

Method onBeaconNPCSpawnsRemoved.

Parameters:
@Nonnull final RemovedAssetsEvent> event

onLoadedNPCEvent

private void onLoadedNPCEvent (@Nonnull final AllNPCsLoadedEvent loadedNPCEvent)

Method onLoadedNPCEvent.

Parameters:
@Nonnull final AllNPCsLoadedEvent loadedNPCEvent

setUpWithAllRoles

private void setUpWithAllRoles ()

Method setUpWithAllRoles.

WorldSpawnWrapper

public new WorldSpawnWrapper (value)

Method WorldSpawnWrapper.

Parameters:
value value

BeaconSpawnWrapper

public new BeaconSpawnWrapper (value2)

Method BeaconSpawnWrapper.

Parameters:
value2 value2

rebuildBeaconSpawnConfigurations

private void rebuildBeaconSpawnConfigurations (@Nullable final IntSet changeSet)

Method rebuildBeaconSpawnConfigurations.

Parameters:
@Nullable final IntSet changeSet

onModelAssetChange

private void onModelAssetChange (@Nonnull final LoadedAssetsEvent> event)

Method onModelAssetChange.

Parameters:
@Nonnull final LoadedAssetsEvent> event

onLoadAsset

private void onLoadAsset (@Nonnull final LoadAssetEvent event)

Method onLoadAsset.

Parameters:
@Nonnull final LoadAssetEvent event

onEntityAdd

public void onEntityAdd (@Nonnull final Holder holder, @Nonnull final AddReason reason, @Nonnull final Store store)

Method onEntityAdd.

Parameters:
@Nonnull final Holder holder
@Nonnull final AddReason reason
@Nonnull final Store store

PersistentModel

public new PersistentModel (modelReference)

Method PersistentModel.

Parameters:
modelReference modelReference

Nameplate

public new Nameplate (Entity.DISPLAY_NAME.get(spawnSuppressor)

Method Nameplate.

Parameters:
Entity.DISPLAY_NAME.get(spawnSuppressor Entity.DISPLAY_NAME.get(spawnSuppressor

UUIDComponent

public new UUIDComponent (Entity.UUID.get(spawnSuppressor)

Method UUIDComponent.

Parameters:
Entity.UUID.get(spawnSuppressor Entity.UUID.get(spawnSuppressor

onEntityRemoved

public void onEntityRemoved (@Nonnull final Holder holder, @Nonnull final RemoveReason reason, @Nonnull final Store store)

Method onEntityRemoved.

Parameters:
@Nonnull final Holder holder
@Nonnull final RemoveReason reason
@Nonnull final Store store

getQuery

public Query getQuery ()

Method getQuery.

getDependencies

public Set> getDependencies ()

Method getDependencies.

NPCSpawningConfig

public public NPCSpawningConfig ()

Method NPCSpawningConfig.