Class SpawnActionPokemon
java.lang.Object
com.pixelmonmod.pixelmon.api.spawning.SpawnAction<PixelmonEntity>
com.pixelmonmod.pixelmon.api.spawning.archetypes.entities.pokemon.SpawnActionPokemon
SpawnAction
for Pokémon entities.-
Field Summary
Fields inherited from class com.pixelmonmod.pixelmon.api.spawning.SpawnAction
entity, spawnInfo, spawnLocation
-
Constructor Summary
ConstructorDescriptionSpawnActionPokemon
(SpawnInfoPokemon spawnInfo, SpawnLocation spawnLocation, Pokemon pokemon, BossTier bossTier) -
Method Summary
Modifier and TypeMethodDescriptionprotected PixelmonEntity
Creates the entity and returns the result.doSpawn
(AbstractSpawner spawner) Does the spawn of this entity at the storedSpawnLocation
on behalf of the givenAbstractSpawner
.static int
getPokemonLevelBasedOnDistance
(SpawnLocation spawnLocation) Gets the base pokemonLevel for a Pokémon spawning at this location according to thespawnLevelsByDistance
config option.Methods inherited from class com.pixelmonmod.pixelmon.api.spawning.SpawnAction
applyLocationMutations, getOrCreateEntity, setEntity
-
Field Details
-
pokemon
ThePokemon
that is spawning. -
bossTier
-
-
Constructor Details
-
SpawnActionPokemon
public SpawnActionPokemon(SpawnInfoPokemon spawnInfo, SpawnLocation spawnLocation, Pokemon pokemon, BossTier bossTier)
-
-
Method Details
-
createEntity
Description copied from class:SpawnAction
Creates the entity and returns the result. Returning null if the spawn should fail is safe in default implementations.- Specified by:
createEntity
in classSpawnAction<PixelmonEntity>
-
doSpawn
Description copied from class:SpawnAction
Does the spawn of this entity at the storedSpawnLocation
on behalf of the givenAbstractSpawner
. This can return null if the spawn should fail at any point, and the Better Spawner will interpret this as a cancelled spawn without consequences.Overrides of this method are strongly advised to call the super due to important functions that occur here.
- Overrides:
doSpawn
in classSpawnAction<PixelmonEntity>
-
getPokemonLevelBasedOnDistance
Gets the base pokemonLevel for a Pokémon spawning at this location according to thespawnLevelsByDistance
config option.
-