WorldEnvironmentSpawnData

public class WorldEnvironmentSpawnData

Class WorldEnvironmentSpawnData. Provides worldenvironmentspawndata functionality for the Hytale server.

java.lang.Object > WorldEnvironmentSpawnData

Field Summary

expectedNPCs

private double expectedNPCs

Field expectedNPCs.

actualNPCs

private int actualNPCs

Field actualNPCs.

segmentCount

private int segmentCount

Field segmentCount.

density

private double density

Field density.

sumOfWeights

private double sumOfWeights

Field sumOfWeights.

unspawnable

private boolean unspawnable

Field unspawnable.

fullyPopulated

private boolean fullyPopulated

Field fullyPopulated.

npcStatMap

final Int2ObjectMap npcStatMap

Field npcStatMap.

npcs

final Int2ObjectMap npcs

Field npcs.

stat

final WorldNPCSpawnStat stat

Field stat.

worldTimeResource

final WorldTimeResource worldTimeResource

Field worldTimeResource.

segmentsPerWeightUnit

final double segmentsPerWeightUnit

Field segmentsPerWeightUnit.

Method Detail

WorldEnvironmentSpawnData

public public WorldEnvironmentSpawnData (final int environmentIndex, final double density)

Method WorldEnvironmentSpawnData.

Parameters:
final int environmentIndex
final double density

getEnvironmentIndex

public int getEnvironmentIndex ()

Method getEnvironmentIndex.

getSegmentCount

public int getSegmentCount ()

Method getSegmentCount.

isUnspawnable

public boolean isUnspawnable ()

Method isUnspawnable.

setUnspawnable

public void setUnspawnable (final boolean unspawnable)

Method setUnspawnable.

Parameters:
final boolean unspawnable

getExpectedNPCs

public double getExpectedNPCs ()

Method getExpectedNPCs.

getActualNPCs

public int getActualNPCs ()

Method getActualNPCs.

isEmpty

public boolean isEmpty ()

Method isEmpty.

hasNPCs

public boolean hasNPCs ()

Method hasNPCs.

getNpcStatMap

public Int2ObjectMap getNpcStatMap ()

Method getNpcStatMap.

isFullyPopulated

public boolean isFullyPopulated ()

Method isFullyPopulated.

setFullyPopulated

public void setFullyPopulated (final boolean fullyPopulated)

Method setFullyPopulated.

Parameters:
final boolean fullyPopulated

getChunkRefSet

public Set> getChunkRefSet ()

Method getChunkRefSet.

adjustSegmentCount

public void adjustSegmentCount (final int delta)

Method adjustSegmentCount.

Parameters:
final int delta

forEachNpcStat

public void forEachNpcStat (@Nonnull final IntObjectConsumer consumer)

Method forEachNpcStat.

Parameters:
@Nonnull final IntObjectConsumer consumer

setDensity

public void setDensity (final double density, @Nonnull final Store store)

Method setDensity.

Parameters:
final double density
@Nonnull final Store store

updateNPCs

public void updateNPCs (final WorldSpawnWrapper spawnWrapper, final World world)

Method updateNPCs.

Parameters:
final WorldSpawnWrapper spawnWrapper
final World world

WorldNPCSpawnStat

public new WorldNPCSpawnStat (entry.getIntKey()

Method WorldNPCSpawnStat.

Parameters:
entry.getIntKey( entry.getIntKey(

clearNPCs

public void clearNPCs ()

Method clearNPCs.

updateSpawnStats

public void updateSpawnStats (final int roleIndex, final int spansTried, final int spansSuccess, final int budgetUsed, @Nonnull final Object2IntMap rejections, final boolean success)

Method updateSpawnStats.

Parameters:
final int roleIndex
final int spansTried
final int spansSuccess
final int budgetUsed
@Nonnull final Object2IntMap rejections
final boolean success

removeNPC

public void removeNPC (final int roleIndex, @Nonnull final ComponentAccessor componentAccessor)

Method removeNPC.

Parameters:
final int roleIndex
@Nonnull final ComponentAccessor componentAccessor

addNPC

public void addNPC (final int roleIndex, @Nonnull final WorldSpawnWrapper spawnWrapper, @Nonnull final RoleSpawnParameters spawnParams, @Nonnull final World world, @Nonnull final ComponentAccessor componentAccessor)

Method addNPC.

Parameters:
final int roleIndex
@Nonnull final WorldSpawnWrapper spawnWrapper
@Nonnull final RoleSpawnParameters spawnParams
@Nonnull final World world
@Nonnull final ComponentAccessor componentAccessor

spawnWeight

public double spawnWeight ()

Method spawnWeight.

pickRandomSpawnNPCStat

public WorldNPCSpawnStat pickRandomSpawnNPCStat (@Nonnull final ComponentAccessor componentAccessor)

Method pickRandomSpawnNPCStat.

Parameters:
@Nonnull final ComponentAccessor componentAccessor

resetUnspawnable

public void resetUnspawnable ()

Method resetUnspawnable.

trackSpawn

public void trackSpawn (final int roleNameIndex, final int npcCount)

Method trackSpawn.

Parameters:
final int roleNameIndex
final int npcCount

trackDespawn

public void trackDespawn (final int roleNameIndex, final int npcCount)

Method trackDespawn.

Parameters:
final int roleNameIndex
final int npcCount

removeChunk

public void removeChunk (@Nonnull final Ref ref, @Nonnull final ComponentAccessor componentAccessor)

Method removeChunk.

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

addChunk

public void addChunk (@Nonnull final Ref ref, @Nonnull final ComponentAccessor componentAccessor)

Method addChunk.

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

recalculateWeight

public void recalculateWeight (final int moonPhase)

Method recalculateWeight.

Parameters:
final int moonPhase

updateExpectedNPCs

public void updateExpectedNPCs (final int moonPhase)

Method updateExpectedNPCs.

Parameters:
final int moonPhase