WorldNPCSpawnStat

public class WorldNPCSpawnStat

Class WorldNPCSpawnStat. Provides worldnpcspawnstat functionality for the Hytale server.

java.lang.Object > WorldNPCSpawnStat

Field Summary

builderInfoReference

private WeakReference builderInfoReference

Field builderInfoReference.

minSpawnSize

private int minSpawnSize

Field minSpawnSize.

expected

private double expected

Field expected.

actual

private int actual

Field actual.

unspawnable

private boolean unspawnable

Field unspawnable.

spansTried

private int spansTried

Field spansTried.

spansSuccess

private int spansSuccess

Field spansSuccess.

successfulJobCount

private int successfulJobCount

Field successfulJobCount.

successfulJobTotalBudget

private int successfulJobTotalBudget

Field successfulJobTotalBudget.

failedJobCount

private int failedJobCount

Field failedJobCount.

failedJobTotalBudget

private int failedJobTotalBudget

Field failedJobTotalBudget.

slotsLeft

final double slotsLeft

Field slotsLeft.

npcModule

final NPCPlugin npcModule

Field npcModule.

flockDefinition

final FlockAsset flockDefinition

Field flockDefinition.

Method Detail

WorldNPCSpawnStat

public public WorldNPCSpawnStat (final int roleIndex, final WorldSpawnWrapper spawnWrapper, @Nonnull final RoleSpawnParameters spawnParams, final World world)

Method WorldNPCSpawnStat.

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

getRoleIndex

public int getRoleIndex ()

Method getRoleIndex.

getExpected

public double getExpected ()

Method getExpected.

setExpected

public void setExpected (final double expected)

Method setExpected.

Parameters:
final double expected

getActual

public int getActual ()

Method getActual.

adjustActual

public void adjustActual (final int count)

Method adjustActual.

Parameters:
final int count

isUnspawnable

public boolean isUnspawnable ()

Method isUnspawnable.

setUnspawnable

public void setUnspawnable (final boolean unspawnable)

Method setUnspawnable.

Parameters:
final boolean unspawnable

getSpawnWrapper

public WorldSpawnWrapper getSpawnWrapper ()

Method getSpawnWrapper.

getSpawnParams

public RoleSpawnParameters getSpawnParams ()

Method getSpawnParams.

getSpansTried

public int getSpansTried ()

Method getSpansTried.

getSpansSuccess

public int getSpansSuccess ()

Method getSpansSuccess.

getSuccessfulJobCount

public int getSuccessfulJobCount ()

Method getSuccessfulJobCount.

getSuccessfulJobTotalBudget

public int getSuccessfulJobTotalBudget ()

Method getSuccessfulJobTotalBudget.

getFailedJobCount

public int getFailedJobCount ()

Method getFailedJobCount.

getFailedJobTotalBudget

public int getFailedJobTotalBudget ()

Method getFailedJobTotalBudget.

getWeight

public double getWeight (final int moonPhase)

Method getWeight.

Parameters:
final int moonPhase

getMissingCount

public double getMissingCount (@Nonnull final ComponentAccessor componentAccessor)

Method getMissingCount.

Parameters:
@Nonnull final ComponentAccessor componentAccessor

getAvailableSlots

public int getAvailableSlots ()

Method getAvailableSlots.

getRejectionCount

public int getRejectionCount (final SpawnRejection rejection)

Method getRejectionCount.

Parameters:
final SpawnRejection rejection

updateSpawnStats

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

Method updateSpawnStats.

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

resetUnspawnable

public void resetUnspawnable ()

Method resetUnspawnable.

isSpawnable

private boolean isSpawnable ()

Method isSpawnable.

recomputeSpawnSize

private void recomputeSpawnSize ()

Method recomputeSpawnSize.

CountOnly

public public CountOnly (final int roleIndex)

Method CountOnly.

Parameters:
final int roleIndex