Class PlayerActivateShrineEvent.Pre
java.lang.Object
net.minecraftforge.eventbus.api.Event
com.pixelmonmod.pixelmon.api.events.PlayerActivateShrineEvent
com.pixelmonmod.pixelmon.api.events.PlayerActivateShrineEvent.Pre
- Enclosing class:
- PlayerActivateShrineEvent
-
Nested Class Summary
Nested classes/interfaces inherited from class com.pixelmonmod.pixelmon.api.events.PlayerActivateShrineEvent
PlayerActivateShrineEvent.Post, PlayerActivateShrineEvent.Pre
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
Fields inherited from class com.pixelmonmod.pixelmon.api.events.PlayerActivateShrineEvent
canEncounter, pixelmonEntity
-
Constructor Summary
ConstructorDescriptionPre
(net.minecraft.core.BlockPos blockPos, net.minecraft.server.level.ServerPlayer player, ShrineBlock block, ShrineType shrineType, BirdShrineTileEntity shrine, boolean canEncounter, PixelmonEntity pixelmonEntity) Basic constructor -
Method Summary
Modifier and TypeMethodDescriptionvoid
setCanEncounter
(boolean canEncounter) Overwrites theEncounterData.canEncounter(Player)
checkvoid
setPixelmonEntity
(PixelmonEntity entity) Overwrites the PixelmonEntity to be spawnedMethods inherited from class com.pixelmonmod.pixelmon.api.events.PlayerActivateShrineEvent
canEncounter, getBlock, getBlockPos, getBlockState, getPixelmonEntity, getPlayer, getShrine, getShrineType
Methods inherited from class net.minecraftforge.eventbus.api.Event
getListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult
-
Constructor Details
-
Pre
public Pre(net.minecraft.core.BlockPos blockPos, net.minecraft.server.level.ServerPlayer player, ShrineBlock block, ShrineType shrineType, BirdShrineTileEntity shrine, boolean canEncounter, PixelmonEntity pixelmonEntity) Basic constructor- Parameters:
blockPos
- The position of the blockplayer
- The player interacting with the blockblock
- The block type being interacted withshrineType
- The type of shrineshrine
- The shrine tile entitycanEncounter
- If the player can encounter the shrinepixelmonEntity
- The Pokémon to be spawned
-
-
Method Details
-
setCanEncounter
public void setCanEncounter(boolean canEncounter) Overwrites theEncounterData.canEncounter(Player)
check- Parameters:
canEncounter
- The new encounter check value
-
setPixelmonEntity
Overwrites the PixelmonEntity to be spawned- Parameters:
entity
- The new entity to be spawned
-