Class PlayerActivateShrineEvent

java.lang.Object
net.minecraftforge.eventbus.api.Event
com.pixelmonmod.pixelmon.api.events.PlayerActivateShrineEvent
Direct Known Subclasses:
PlayerActivateShrineEvent.Post, PlayerActivateShrineEvent.Pre

public class PlayerActivateShrineEvent extends net.minecraftforge.eventbus.api.Event
Fires whenever a legendary bird shrine is activated Canceling this event will prevent the shrine from activating
  • Field Details

    • canEncounter

      protected boolean canEncounter
    • pixelmonEntity

      protected PixelmonEntity pixelmonEntity
  • Constructor Details

    • PlayerActivateShrineEvent

      public PlayerActivateShrineEvent(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 block
      player - The player interacting with the block
      block - The block type being interacted with
      shrineType - The type of shrine
      shrine - The shrine tile entity
      canEncounter - If the player can encounter the shrine
      pixelmonEntity - The Pokémon to be spawned
  • Method Details

    • getBlockPos

      public net.minecraft.core.BlockPos getBlockPos()
      Gets the block position of the interacted block
      Returns:
      The block position
    • getBlockState

      public net.minecraft.world.level.block.state.BlockState getBlockState()
      Gets the block state at the given position
      Returns:
      The state
    • getBlock

      public ShrineBlock getBlock()
      Gets the block interacted with
      Returns:
      The block interacted with
    • getPlayer

      public net.minecraft.server.level.ServerPlayer getPlayer()
      Gets the player interacting with the shrine
      Returns:
      The player
    • getShrineType

      public ShrineType getShrineType()
      Gets the type of shrine being interacted with
      Returns:
      The shrine type
    • getShrine

      public BirdShrineTileEntity getShrine()
      Gets the tile entity being interacted with
      Returns:
      The shrine tile entity
    • canEncounter

      public boolean canEncounter()
      The result of the EncounterData.canEncounter(Player) method
      Returns:
      If the player can encounter this shrine
    • getPixelmonEntity

      public PixelmonEntity getPixelmonEntity()
      Gets the PixelmonEntity to be spawned
      Returns:
      The shrine tile entity