Class LegendarySpawner
java.lang.Object
com.pixelmonmod.pixelmon.api.spawning.AbstractSpawner
com.pixelmonmod.pixelmon.api.spawning.archetypes.spawners.TickingSpawner
com.pixelmonmod.pixelmon.spawning.LegendarySpawner
The spawner responsible for legendary and mega-boss spawning.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Nested classes/interfaces inherited from class com.pixelmonmod.pixelmon.api.spawning.archetypes.spawners.TickingSpawner
TickingSpawner.TickingSpawnerBuilder<T extends TickingSpawner>
Nested classes/interfaces inherited from class com.pixelmonmod.pixelmon.api.spawning.AbstractSpawner
AbstractSpawner.SpawnerBuilder<T extends AbstractSpawner>
-
Field Summary
Modifier and TypeFieldDescriptionboolean
Whether or not this fires the legendary events onto the Pixelmon bus.int
int
int
List<SpawnAction<?>>
int
Fields inherited from class com.pixelmonmod.pixelmon.api.spawning.archetypes.spawners.TickingSpawner
capacity, lastCycleTime, minDistBetweenSpawns, nextSpawnTime, spawnFrequency, spawnLocationCalculator, spawnsPerPass
Fields inherited from class com.pixelmonmod.pixelmon.api.spawning.AbstractSpawner
cacheSets, checkSpawns, conditions, isBusy, lastSpawnTime, name, rarityMultipliers, rarityTweaks, selectionAlgorithm, spawnedTracker, spawnSets, tweaks
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiondoLegendarySpawn
(net.minecraft.server.level.ServerPlayer target) Attempts to perform a legendary spawn at the given target.static void
fillNearby
(ArrayList<net.minecraft.server.level.ServerPlayer> allPlayers, ArrayList<net.minecraft.server.level.ServerPlayer> cluster, net.minecraft.server.level.ServerPlayer focus) void
forcefullySpawn
(net.minecraft.server.level.ServerPlayer onlyFocus) int
Gets the number of passes.List<SpawnAction<? extends net.minecraft.world.entity.Entity>>
getSpawns
(int pass) Performs a specific pass, where pass index starts at zero, returning a list ofSpawnAction
s that should execute.Methods inherited from class com.pixelmonmod.pixelmon.api.spawning.archetypes.spawners.TickingSpawner
canSpawn, doPass, hasCapacity, onSpawnEnded, shouldDoSpawning
Methods inherited from class com.pixelmonmod.pixelmon.api.spawning.AbstractSpawner
calculateSpatialData, fits, getCondition, getSuitableSpawns, getSuitableSpawnsForBiome, getTrackedBlockCollection, getTweak, getWeightedSpawnInfo, hasCondition, hasTweak
-
Field Details
-
minDistFromCentre
public int minDistFromCentre -
maxDistFromCentre
public int maxDistFromCentre -
horizontalSliceRadius
public int horizontalSliceRadius -
verticalSliceRadius
public int verticalSliceRadius -
possibleSpawns
-
firesChooseEvent
public boolean firesChooseEventWhether or not this fires the legendary events onto the Pixelmon bus. This is also used to decide which config options to use for spawning frequency and chance.
-
-
Constructor Details
-
LegendarySpawner
-
-
Method Details
-
fillNearby
-
forcefullySpawn
public void forcefullySpawn(@Nullable net.minecraft.server.level.ServerPlayer onlyFocus) -
getSpawns
Description copied from class:TickingSpawner
Performs a specific pass, where pass index starts at zero, returning a list ofSpawnAction
s that should execute. Null or empty lists are acceptable. An implementation that doesn't use passes will ignore this parameter.- Specified by:
getSpawns
in classTickingSpawner
-
doLegendarySpawn
public CompletableFuture<List<SpawnAction<?>>> doLegendarySpawn(net.minecraft.server.level.ServerPlayer target) Attempts to perform a legendary spawn at the given target. This could fail and return null. -
getNumPasses
public int getNumPasses()Description copied from class:TickingSpawner
Gets the number of passes. An implementation that doesn't use passes will return 1.- Specified by:
getNumPasses
in classTickingSpawner
-