Class WorldEnvironmentSpawnData
java.lang.Object
com.hypixel.hytale.server.spawning.world.WorldEnvironmentSpawnData
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate intprivate final Set<Ref<ChunkStore>> private doubleprivate final intprivate doubleprivate booleanstatic final doubleprivate final it.unimi.dsi.fastutil.ints.Int2ObjectMap<WorldNPCSpawnStat> private intprivate doubleprivate boolean -
Constructor Summary
ConstructorsConstructorDescriptionWorldEnvironmentSpawnData(int index) WorldEnvironmentSpawnData(int environmentIndex, double density) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddChunk(Ref<ChunkStore> ref, ComponentAccessor<EntityStore> componentAccessor) voidaddNPC(int roleIndex, WorldSpawnWrapper spawnWrapper, RoleSpawnParameters spawnParams, World world, ComponentAccessor<EntityStore> componentAccessor) voidadjustSegmentCount(int delta) voidvoidforEachNpcStat(IntObjectConsumer<WorldNPCSpawnStat> consumer) intSet<Ref<ChunkStore>> intdoubleit.unimi.dsi.fastutil.ints.Int2ObjectMap<WorldNPCSpawnStat> intbooleanhasNPCs()booleanisEmpty()booleanbooleanpickRandomSpawnNPCStat(ComponentAccessor<EntityStore> componentAccessor) voidrecalculateWeight(int moonPhase) voidremoveChunk(Ref<ChunkStore> ref, ComponentAccessor<EntityStore> componentAccessor) voidremoveNPC(int roleIndex, ComponentAccessor<EntityStore> componentAccessor) voidvoidsetDensity(double density, Store<ChunkStore> store) voidsetFullyPopulated(boolean fullyPopulated) voidsetUnspawnable(boolean unspawnable) doublevoidtrackDespawn(int roleNameIndex, int npcCount) voidtrackSpawn(int roleNameIndex, int npcCount) voidupdateExpectedNPCs(int moonPhase) voidupdateNPCs(WorldSpawnWrapper spawnWrapper, World world) voidupdateSpawnStats(int roleIndex, int spansTried, int spansSuccess, int budgetUsed, it.unimi.dsi.fastutil.objects.Object2IntMap<SpawnRejection> rejections, boolean success)
-
Field Details
-
K_COLUMNS
public static final double K_COLUMNS- See Also:
-
environmentIndex
private final int environmentIndex -
expectedNPCs
private double expectedNPCs -
actualNPCs
private int actualNPCs -
segmentCount
private int segmentCount -
density
private double density -
sumOfWeights
private double sumOfWeights -
unspawnable
private boolean unspawnable -
fullyPopulated
private boolean fullyPopulated -
npcStatMap
-
chunkRefSet
-
-
Constructor Details
-
WorldEnvironmentSpawnData
public WorldEnvironmentSpawnData(int environmentIndex, double density) -
WorldEnvironmentSpawnData
public WorldEnvironmentSpawnData(int index)
-
-
Method Details
-
getEnvironmentIndex
public int getEnvironmentIndex() -
getSegmentCount
public int getSegmentCount() -
isUnspawnable
public boolean isUnspawnable() -
setUnspawnable
public void setUnspawnable(boolean unspawnable) -
getExpectedNPCs
public double getExpectedNPCs() -
getActualNPCs
public int getActualNPCs() -
isEmpty
public boolean isEmpty() -
hasNPCs
public boolean hasNPCs() -
getNpcStatMap
-
isFullyPopulated
public boolean isFullyPopulated() -
setFullyPopulated
public void setFullyPopulated(boolean fullyPopulated) -
getChunkRefSet
-
adjustSegmentCount
public void adjustSegmentCount(int delta) -
forEachNpcStat
-
setDensity
-
updateNPCs
-
clearNPCs
public void clearNPCs() -
updateSpawnStats
public void updateSpawnStats(int roleIndex, int spansTried, int spansSuccess, int budgetUsed, @Nonnull it.unimi.dsi.fastutil.objects.Object2IntMap<SpawnRejection> rejections, boolean success) -
removeNPC
-
addNPC
public void addNPC(int roleIndex, @Nonnull WorldSpawnWrapper spawnWrapper, @Nonnull RoleSpawnParameters spawnParams, @Nonnull World world, @Nonnull ComponentAccessor<EntityStore> componentAccessor) -
spawnWeight
public double spawnWeight() -
pickRandomSpawnNPCStat
@Nullable public WorldNPCSpawnStat pickRandomSpawnNPCStat(@Nonnull ComponentAccessor<EntityStore> componentAccessor) -
resetUnspawnable
public void resetUnspawnable() -
trackSpawn
public void trackSpawn(int roleNameIndex, int npcCount) -
trackDespawn
public void trackDespawn(int roleNameIndex, int npcCount) -
removeChunk
public void removeChunk(@Nonnull Ref<ChunkStore> ref, @Nonnull ComponentAccessor<EntityStore> componentAccessor) -
addChunk
public void addChunk(@Nonnull Ref<ChunkStore> ref, @Nonnull ComponentAccessor<EntityStore> componentAccessor) -
recalculateWeight
public void recalculateWeight(int moonPhase) -
updateExpectedNPCs
public void updateExpectedNPCs(int moonPhase)
-