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
Field spawnMarkerModel.
localSpawnControllerJoinDelay
Field localSpawnControllerJoinDelay.
tickColumnBudget
Field tickColumnBudget.
entityModule
Field entityModule.
config
Field config.
spawnMarkerModelId
Field spawnMarkerModelId.
manager
Field manager.
wrapper
Field wrapper.
environment
Field environment.
worldSpawnData
Field worldSpawnData.
environmentSpawnData
Field environmentSpawnData.
npcSpawnData
Field npcSpawnData.
world
Field world.
npCs
Field npCs.
npcs
Field npcs.
npc
Field npc.
spawnMarkerEntity
Field spawnMarkerEntity.
holder
Field holder.
errors
Field errors.
removedAssets
Field removedAssets.
index
Field index.
changeSet
Field changeSet.
store
Field store.
legacySpawnBeaconComponent
Field legacySpawnBeaconComponent.
spawnBeaconRef
Field spawnBeaconRef.
legacySpawnBeaconComponent2
Field legacySpawnBeaconComponent2.
spawnBeaconRef2
Field spawnBeaconRef2.
holder2
Field holder2.
spawnBeaconComponent
Field spawnBeaconComponent.
spawnBeaconComponent2
Field spawnBeaconComponent2.
loadedNPCs
Field loadedNPCs.
key
Field key.
value
Field value.
value2
Field value2.
key2
Field key2.
index2
Field index2.
spawn
Field spawn.
modelAsset
Field modelAsset.
start
Field start.
spawnSuppressor
Field spawnSuppressor.
archetype
Field archetype.
modelReference
Field modelReference.
spawnBudgetFactor
Field spawnBudgetFactor.
maxActiveJobs
Field maxActiveJobs.
defaultMarkerModel
Field defaultMarkerModel.
Method Detail
setup
void
setup
()
Method setup.
SpawnCommand
new
SpawnCommand
()
Method SpawnCommand.
DefaultAssetMap
new
DefaultAssetMap
()
Method DefaultAssetMap.
IndexedLookupTableAssetMap
new
IndexedLookupTableAssetMap
(WorldNPCSpawn[]::new)
Method IndexedLookupTableAssetMap.
- Parameters:
WorldNPCSpawn[]::newWorldNPCSpawn[]::new
IndexedAssetMap
new
IndexedAssetMap
()
Method IndexedAssetMap.
KDTree
new
KDTree
(Ref::isValid)
Method KDTree.
- Parameters:
Ref::isValidRef::isValid
LegacyBeaconSpatialSystem
new
LegacyBeaconSpatialSystem
(this.legacyBeaconSpatialResource)
Method LegacyBeaconSpatialSystem.
- Parameters:
this.legacyBeaconSpatialResourcethis.legacyBeaconSpatialResource
SpawnMarkerSpatialSystem
new
SpawnMarkerSpatialSystem
(this.spawnMarkerSpatialResource)
Method SpawnMarkerSpatialSystem.
- Parameters:
this.spawnMarkerSpatialResourcethis.spawnMarkerSpatialResource
BeaconSpatialSystem
new
BeaconSpatialSystem
(this.manualSpawnBeaconSpatialResource)
Method BeaconSpatialSystem.
- Parameters:
this.manualSpawnBeaconSpatialResourcethis.manualSpawnBeaconSpatialResource
SpawnMarkerSuppressionSystem
new
SpawnMarkerSuppressionSystem
(this.spawnMarkerComponentType, this.spawnSuppressionControllerResourceType)
Method SpawnMarkerSuppressionSystem.
- Parameters:
this.spawnMarkerComponentTypethis.spawnMarkerComponentTypethis.spawnSuppressionControllerResourceTypethis.spawnSuppressionControllerResourceType
LocalSpawnSetupSystem
new
LocalSpawnSetupSystem
(playerComponentType)
Method LocalSpawnSetupSystem.
- Parameters:
playerComponentTypeplayerComponentType
LocalSpawnControllerSystem
new
LocalSpawnControllerSystem
(this.localSpawnControllerComponentType, transformComponentType, WeatherTracker.getComponentType()
Method LocalSpawnControllerSystem.
- Parameters:
this.localSpawnControllerComponentTypethis.localSpawnControllerComponentTypetransformComponentTypetransformComponentTypeWeatherTracker.getComponentType(WeatherTracker.getComponentType(
LocalSpawnBeaconSystem
new
LocalSpawnBeaconSystem
(this.localSpawnBeaconComponentType, this.localSpawnStateResourceType)
Method LocalSpawnBeaconSystem.
- Parameters:
this.localSpawnBeaconComponentTypethis.localSpawnBeaconComponentTypethis.localSpawnStateResourceTypethis.localSpawnStateResourceType
LocalSpawnForceTriggerSystem
new
LocalSpawnForceTriggerSystem
(this.localSpawnControllerComponentType, this.localSpawnStateResourceType)
Method LocalSpawnForceTriggerSystem.
- Parameters:
this.localSpawnControllerComponentTypethis.localSpawnControllerComponentTypethis.localSpawnStateResourceTypethis.localSpawnStateResourceType
WorldSpawnTrackingSystem
new
WorldSpawnTrackingSystem
(this.worldSpawnDataResourceType, this.chunkSpawnDataComponentType, this.chunkSpawnedNPCDataComponentType)
Method WorldSpawnTrackingSystem.
- Parameters:
this.worldSpawnDataResourceTypethis.worldSpawnDataResourceTypethis.chunkSpawnDataComponentTypethis.chunkSpawnDataComponentTypethis.chunkSpawnedNPCDataComponentTypethis.chunkSpawnedNPCDataComponentType
MoonPhaseChangeEventSystem
new
MoonPhaseChangeEventSystem
()
Method MoonPhaseChangeEventSystem.
WorldSpawningSystem
new
WorldSpawningSystem
(this.worldSpawnDataResourceType, this.chunkSpawnDataComponentType, this.chunkSpawnedNPCDataComponentType, this.spawnJobDataComponentType)
Method WorldSpawningSystem.
- Parameters:
this.worldSpawnDataResourceTypethis.worldSpawnDataResourceTypethis.chunkSpawnDataComponentTypethis.chunkSpawnDataComponentTypethis.chunkSpawnedNPCDataComponentTypethis.chunkSpawnedNPCDataComponentTypethis.spawnJobDataComponentTypethis.spawnJobDataComponentType
LegacySpawnSuppressorEntityMigration
new
LegacySpawnSuppressorEntityMigration
()
Method LegacySpawnSuppressorEntityMigration.
start
void
start
()
Method start.
IllegalStateException
new
IllegalStateException
(String.format("Default spawn marker '%s' not found", "NPC_Spawn_Marker")
Method IllegalStateException.
- Parameters:
String.format("Default spawn marker '%s' notfound""NPC_Spawn_Marker""NPC_Spawn_Marker"
shutdown
void
shutdown
()
Method shutdown.
getSpawnMarkerSpatialResource
EntityStore>>
getSpawnMarkerSpatialResource
()
Method getSpawnMarkerSpatialResource.
getManualSpawnBeaconSpatialResource
EntityStore>>
getManualSpawnBeaconSpatialResource
()
Method getManualSpawnBeaconSpatialResource.
getSpawnMarkerComponentType
SpawnMarkerEntity>
getSpawnMarkerComponentType
()
Method getSpawnMarkerComponentType.
getLocalSpawnControllerComponentType
LocalSpawnController>
getLocalSpawnControllerComponentType
()
Method getLocalSpawnControllerComponentType.
getWorldSpawnDataResourceType
WorldSpawnData>
getWorldSpawnDataResourceType
()
Method getWorldSpawnDataResourceType.
getSpawnSuppressorComponentType
SpawnSuppressionComponent>
getSpawnSuppressorComponentType
()
Method getSpawnSuppressorComponentType.
getSpawnSuppressionControllerResourceType
SpawnSuppressionController>
getSpawnSuppressionControllerResourceType
()
Method getSpawnSuppressionControllerResourceType.
getLocalSpawnBeaconComponentType
LocalSpawnBeacon>
getLocalSpawnBeaconComponentType
()
Method getLocalSpawnBeaconComponentType.
getLocalSpawnStateResourceType
LocalSpawnState>
getLocalSpawnStateResourceType
()
Method getLocalSpawnStateResourceType.
getInitialBeaconDelayComponentType
InitialBeaconDelay>
getInitialBeaconDelayComponentType
()
Method getInitialBeaconDelayComponentType.
getSpawnJobDataComponentType
SpawnJobData>
getSpawnJobDataComponentType
()
Method getSpawnJobDataComponentType.
getChunkSpawnDataComponentType
ChunkSpawnData>
getChunkSpawnDataComponentType
()
Method getChunkSpawnDataComponentType.
getChunkSpawnedNPCDataComponentType
ChunkSpawnedNPCData>
getChunkSpawnedNPCDataComponentType
()
Method getChunkSpawnedNPCDataComponentType.
getChunkSuppressionQueueResourceType
ChunkSuppressionQueue>
getChunkSuppressionQueueResourceType
()
Method getChunkSuppressionQueueResourceType.
getFloodFillEntryPoolProviderSimpleResourceType
FloodFillEntryPoolProviderSimple>
getFloodFillEntryPoolProviderSimpleResourceType
()
Method getFloodFillEntryPoolProviderSimpleResourceType.
getChunkSuppressionEntryComponentType
ChunkSuppressionEntry>
getChunkSuppressionEntryComponentType
()
Method getChunkSuppressionEntryComponentType.
getBeaconSpawnWrapper
Method getBeaconSpawnWrapper.
- Parameters:
final intconfigId
getSpawnMarkerReferenceComponentType
SpawnMarkerReference>
getSpawnMarkerReferenceComponentType
()
Method getSpawnMarkerReferenceComponentType.
getSpawnBeaconReferenceComponentType
SpawnBeaconReference>
getSpawnBeaconReferenceComponentType
()
Method getSpawnBeaconReferenceComponentType.
getFloodFillPositionSelectorComponentType
FloodFillPositionSelector>
getFloodFillPositionSelectorComponentType
()
Method getFloodFillPositionSelectorComponentType.
getSpawnMarkerBlockReferenceComponentType
SpawnMarkerBlockReference>
getSpawnMarkerBlockReferenceComponentType
()
Method getSpawnMarkerBlockReferenceComponentType.
shouldNPCDespawn
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 Storestore@Nonnull final NPCEntitynpcComponent@Nonnull final WorldTimeResourcetimeManagerfinal intconfigurationfinal booleanbeaconSpawn
overpopulation
to
overpopulation
(expected: %f, actual: %d)
Method overpopulation.
- Parameters:
expected:%factual:%d
getWorldEnvironmentSpawnParameters
Method getWorldEnvironmentSpawnParameters.
- Parameters:
final intenvironmentIndex
getBeaconSpawnsForEnvironment
List
getBeaconSpawnsForEnvironment
(final int environmentIndex)
Method getBeaconSpawnsForEnvironment.
- Parameters:
final intenvironmentIndex
getRolesForEnvironment
IntSet
getRolesForEnvironment
(final int environment)
Method getRolesForEnvironment.
- Parameters:
final intenvironment
getTickColumnBudget
int
getTickColumnBudget
()
Method getTickColumnBudget.
getMaxActiveJobs
int
getMaxActiveJobs
()
Method getMaxActiveJobs.
getLocalSpawnControllerJoinDelay
double
getLocalSpawnControllerJoinDelay
()
Method getLocalSpawnControllerJoinDelay.
validateSpawnsConfigurations
void
validateSpawnsConfigurations
(final String type, @Nonnull final Map spawns, @Nonnull final List errors)
Method validateSpawnsConfigurations.
- Parameters:
final Stringtype@Nonnull final Mapspawns@Nonnull final Listerrors
validateSpawnMarkers
void
validateSpawnMarkers
(@Nonnull final Map markers, @Nonnull final List errors)
Method validateSpawnMarkers.
- Parameters:
@Nonnull final Mapmarkers@Nonnull final Listerrors
getEnvironmentDensity
double
getEnvironmentDensity
(final int environmentIndex)
Method getEnvironmentDensity.
- Parameters:
final intenvironmentIndex
onSpawnMarkersChange
Method onSpawnMarkersChange.
- Parameters:
@Nonnull final LoadedAssetsEventevent>
onSpawnMarkersRemove
Method onSpawnMarkersRemove.
- Parameters:
@Nonnull final RemovedAssetsEventevent>
onWorldNPCSpawnsLoaded
Method onWorldNPCSpawnsLoaded.
- Parameters:
@Nonnull final LoadedAssetsEventevent>
onBeaconNPCSpawnsLoaded
Method onBeaconNPCSpawnsLoaded.
- Parameters:
@Nonnull final LoadedAssetsEventevent>
onWorldNPCSpawnsRemoved
Method onWorldNPCSpawnsRemoved.
- Parameters:
@Nonnull final RemovedAssetsEventevent>
onBeaconNPCSpawnsRemoved
Method onBeaconNPCSpawnsRemoved.
- Parameters:
@Nonnull final RemovedAssetsEventevent>
onLoadedNPCEvent
Method onLoadedNPCEvent.
- Parameters:
@Nonnull final AllNPCsLoadedEventloadedNPCEvent
setUpWithAllRoles
void
setUpWithAllRoles
()
Method setUpWithAllRoles.
WorldSpawnWrapper
new
WorldSpawnWrapper
(value)
Method WorldSpawnWrapper.
- Parameters:
valuevalue
BeaconSpawnWrapper
new
BeaconSpawnWrapper
(value2)
Method BeaconSpawnWrapper.
- Parameters:
value2value2
rebuildBeaconSpawnConfigurations
void
rebuildBeaconSpawnConfigurations
(@Nullable final IntSet changeSet)
Method rebuildBeaconSpawnConfigurations.
- Parameters:
@Nullable final IntSetchangeSet
onEntityAdd
void
onEntityAdd
(@Nonnull final Holder holder, @Nonnull final AddReason reason, @Nonnull final Store store)
Method onEntityAdd.
- Parameters:
@Nonnull final Holderholder@Nonnull final AddReasonreason@Nonnull final Storestore
PersistentModel
new
PersistentModel
(modelReference)
Method PersistentModel.
- Parameters:
modelReferencemodelReference
Nameplate
new
Nameplate
(Entity.DISPLAY_NAME.get(spawnSuppressor)
Method Nameplate.
- Parameters:
Entity.DISPLAY_NAME.get(spawnSuppressorEntity.DISPLAY_NAME.get(spawnSuppressor
UUIDComponent
new
UUIDComponent
(Entity.UUID.get(spawnSuppressor)
Method UUIDComponent.
- Parameters:
Entity.UUID.get(spawnSuppressorEntity.UUID.get(spawnSuppressor
onEntityRemoved
void
onEntityRemoved
(@Nonnull final Holder holder, @Nonnull final RemoveReason reason, @Nonnull final Store store)
Method onEntityRemoved.
- Parameters:
@Nonnull final Holderholder@Nonnull final RemoveReasonreason@Nonnull final Storestore
getDependencies
Set>
getDependencies
()
Method getDependencies.
NPCSpawningConfig
public
NPCSpawningConfig
()
Method NPCSpawningConfig.