public abstract class MegaEvolutionEvent
extends net.minecraftforge.eventbus.api.Event
Modifier and Type | Class and Description |
---|---|
static class |
MegaEvolutionEvent.Battle
Fired when the battle mega evolution is about to happen
Cancelling will prevent the mega evolution
|
static class |
MegaEvolutionEvent.MoveSkill
Fired when the move skill mega evolution is about to happen
Cancelling will prevent the mega evolution
|
static class |
MegaEvolutionEvent.Post
Fired after all the mega evolution logic is complete
This is not cancellable
|
static class |
MegaEvolutionEvent.Pre
Fired just before the mega evolution logic occurs
|
Modifier | Constructor and Description |
---|---|
protected |
MegaEvolutionEvent(net.minecraft.entity.player.ServerPlayerEntity player,
Pokemon pokemon) |
protected |
MegaEvolutionEvent(net.minecraft.entity.player.ServerPlayerEntity player,
Pokemon pokemon,
net.minecraft.item.ItemStack item) |
protected |
MegaEvolutionEvent(net.minecraft.entity.player.ServerPlayerEntity player,
Pokemon pokemon,
net.minecraft.item.ItemStack stone,
boolean ultraBurst) |
Modifier and Type | Method and Description |
---|---|
java.util.Optional<PixelmonEntity> |
getEntity()
Gets the pixelmon entity from the world if it exists
|
net.minecraft.entity.player.ServerPlayerEntity |
getPlayer()
The player calling the mega evolution
|
Pokemon |
getPokemon()
Gets the pokemon that is mega evolving
|
java.util.Optional<net.minecraft.item.ItemStack> |
getStone()
Gets the
ItemStack used for the mega evolution
Will return an empty optional of there was no item used |
java.util.Optional<MegaStoneItem> |
getStoneItem()
Gets the item used to mega evolve if one was used
If there was no item used it will return an empty optional
This will always be empty for the pre event
|
boolean |
isUltraBurst()
If the evolution is an ultra burst
This will always be false for the pre event
|
protected MegaEvolutionEvent(net.minecraft.entity.player.ServerPlayerEntity player, Pokemon pokemon)
protected MegaEvolutionEvent(net.minecraft.entity.player.ServerPlayerEntity player, Pokemon pokemon, net.minecraft.item.ItemStack item)
protected MegaEvolutionEvent(net.minecraft.entity.player.ServerPlayerEntity player, Pokemon pokemon, net.minecraft.item.ItemStack stone, boolean ultraBurst)
public net.minecraft.entity.player.ServerPlayerEntity getPlayer()
public Pokemon getPokemon()
public java.util.Optional<net.minecraft.item.ItemStack> getStone()
ItemStack
used for the mega evolution
Will return an empty optional of there was no item usedpublic java.util.Optional<MegaStoneItem> getStoneItem()
public boolean isUltraBurst()
public java.util.Optional<PixelmonEntity> getEntity()