public class PlayerTrackingSpawner extends TickingSpawner
TickingSpawner. This attaches itself to a single player,
and tracks their motion to select places to spawn. It maintains a cache of some party information
of the player it is tracking.| Modifier and Type | Class and Description |
|---|---|
static class |
PlayerTrackingSpawner.PlayerTrackingSpawnerBuilder<T extends PlayerTrackingSpawner> |
TickingSpawner.TickingSpawnerBuilder<T extends TickingSpawner>AbstractSpawner.SpawnerBuilder<T extends AbstractSpawner>| Modifier and Type | Field and Description |
|---|---|
int |
horizontalSliceRadius |
float |
horizontalTrackFactor |
java.lang.Long |
lastStorageCheck
The last time storage and the pokemonLevel variables were updated.
|
int |
maxDistFromCentre |
int |
minDistFromCentre |
PlayerPartyStorage |
playerStorage
The
PlayerPartyStorage of the player being tracked. |
java.util.UUID |
playerUUID
The UUID of the player being tracked.
|
protected java.util.List<SpawnAction<? extends net.minecraft.entity.Entity>> |
possibleSpawns |
int |
verticalSliceRadius |
float |
verticalTrackFactor |
capacity, lastCycleTime, minDistBetweenSpawns, nextSpawnTime, spawnFrequency, spawnLocationCalculator, spawnsPerPasscacheSets, checkSpawns, conditions, isBusy, lastSpawnTime, name, rarityMultipliers, rarityTweaks, selectionAlgorithm, spawnedTracker, spawnSets, tweaks| Constructor and Description |
|---|
PlayerTrackingSpawner(net.minecraft.entity.player.ServerPlayerEntity player) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canSpawn(SpawnAction<?> action) |
int |
getNumPasses()
Gets the number of passes.
|
java.util.List<SpawnAction<? extends net.minecraft.entity.Entity>> |
getSpawns(int pass)
Performs a specific pass, where pass index starts at zero, returning a list of
SpawnActions
that should execute. |
net.minecraft.entity.player.ServerPlayerEntity |
getTrackedPlayer() |
boolean |
hasCapacity(int numSpawns)
Gets if the spawner has enough space for the given number of entities.
|
boolean |
isTrackedPlayerOnline() |
boolean |
shouldDoSpawning()
Whether or not this spawner should do spawning when it is triggered
|
doPass, onSpawnEndedcalculateSpatialData, fits, getCondition, getSuitableSpawns, getTrackedBlockCollection, getTweak, getWeightedSpawnInfo, hasCondition, hasTweakpublic final java.util.UUID playerUUID
public PlayerPartyStorage playerStorage
PlayerPartyStorage of the player being tracked. This can be null.public java.lang.Long lastStorageCheck
protected java.util.List<SpawnAction<? extends net.minecraft.entity.Entity>> possibleSpawns
public int minDistFromCentre
public int maxDistFromCentre
public float horizontalTrackFactor
public float verticalTrackFactor
public int horizontalSliceRadius
public int verticalSliceRadius
public PlayerTrackingSpawner(net.minecraft.entity.player.ServerPlayerEntity player)
public int getNumPasses()
TickingSpawnergetNumPasses in class TickingSpawner@Nullable public net.minecraft.entity.player.ServerPlayerEntity getTrackedPlayer()
public boolean hasCapacity(int numSpawns)
TickingSpawnerTickingSpawner.capacity and the maximumSpawnedPokemon.hasCapacity in class TickingSpawnerpublic boolean canSpawn(SpawnAction<?> action)
canSpawn in class TickingSpawnerpublic boolean shouldDoSpawning()
AbstractSpawnershouldDoSpawning in class TickingSpawnerpublic boolean isTrackedPlayerOnline()
public java.util.List<SpawnAction<? extends net.minecraft.entity.Entity>> getSpawns(int pass)
TickingSpawnerSpawnActions
that should execute. Null or empty lists are acceptable. An implementation that doesn't use passes
will ignore this parameter.getSpawns in class TickingSpawner