Class LegendarySpawnEvent.ChoosePlayer
java.lang.Object
net.minecraftforge.eventbus.api.Event
com.pixelmonmod.pixelmon.api.events.spawning.LegendarySpawnEvent
com.pixelmonmod.pixelmon.api.events.spawning.LegendarySpawnEvent.ChoosePlayer
- Enclosing class:
- LegendarySpawnEvent
Event fired when a
LegendarySpawner
has selected which player to spawn a legendary near.
Which Pokémon will spawn has not been chosen at this point, and whether or not a legendary will
spawn is not guaranteed. This is only for deciding where to look for a legendary spawn location.
The spawner included in this event is guaranteed to be a LegendarySpawner
Cancelling this event or making the player null will prevent a legendary spawn calculation from occurring.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.pixelmonmod.pixelmon.api.events.spawning.LegendarySpawnEvent
LegendarySpawnEvent.ChoosePlayer, LegendarySpawnEvent.DoSpawn
Nested classes/interfaces inherited from class net.minecraftforge.eventbus.api.Event
net.minecraftforge.eventbus.api.Event.HasResult, net.minecraftforge.eventbus.api.Event.Result
-
Field Summary
Modifier and TypeFieldDescriptionThe clusters of players that are considered during selection.net.minecraft.server.level.ServerPlayer
The player to potentially spawn a legendary near.Fields inherited from class com.pixelmonmod.pixelmon.api.events.spawning.LegendarySpawnEvent
spawner
-
Constructor Summary
ConstructorDescriptionChoosePlayer
(LegendarySpawner spawner, net.minecraft.server.level.ServerPlayer player, ArrayList<ArrayList<net.minecraft.server.level.ServerPlayer>> clusters) -
Method Summary
Methods inherited from class net.minecraftforge.eventbus.api.Event
getListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult
-
Field Details
-
player
public net.minecraft.server.level.ServerPlayer playerThe player to potentially spawn a legendary near. Changing this player is acceptable. -
clusters
The clusters of players that are considered during selection. You might use this to perform your own calculation. Emptying a cluster's contents is safe, but not modifying the cluster list itself.
-
-
Constructor Details
-
ChoosePlayer
public ChoosePlayer(LegendarySpawner spawner, net.minecraft.server.level.ServerPlayer player, ArrayList<ArrayList<net.minecraft.server.level.ServerPlayer>> clusters)
-