public class SpawnActionPokemon extends SpawnAction<EntityPixelmon>
SpawnAction
for Pokémon entities.
Created by Hiroku
Modifier and Type | Field and Description |
---|---|
PokemonSpec |
baseSpec
The original
PokemonSpec . |
PokemonSpec |
usingSpec
The
PokemonSpec that is going to be used to create the entity. |
entity, spawnInfo, spawnLocation
Constructor and Description |
---|
SpawnActionPokemon(SpawnInfoPokemon spawnInfo,
SpawnLocation spawnLocation,
PokemonSpec baseSpec,
PokemonSpec usingSpec) |
Modifier and Type | Method and Description |
---|---|
protected EntityPixelmon |
createEntity()
Creates the entity and returns the result.
|
EntityPixelmon |
doSpawn(AbstractSpawner spawner)
Does the spawn of this entity at the stored
SpawnLocation on behalf of the given AbstractSpawner . |
static int |
getLevelBasedOnDistance(SpawnLocation spawnLocation)
Gets the base level for a Pokémon spawning at this location according to the
spawnLevelsByDistance config option. |
applyLocationMutations, getOrCreateEntity, setEntity
public PokemonSpec baseSpec
PokemonSpec
.public PokemonSpec usingSpec
PokemonSpec
that is going to be used to create the entity.public SpawnActionPokemon(SpawnInfoPokemon spawnInfo, SpawnLocation spawnLocation, PokemonSpec baseSpec, PokemonSpec usingSpec)
protected EntityPixelmon createEntity()
SpawnAction
createEntity
in class SpawnAction<EntityPixelmon>
public EntityPixelmon doSpawn(AbstractSpawner spawner)
SpawnAction
SpawnLocation
on behalf of the given AbstractSpawner
.
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.
doSpawn
in class SpawnAction<EntityPixelmon>
public static int getLevelBasedOnDistance(SpawnLocation spawnLocation)
spawnLevelsByDistance
config option.