Class PixelmonBlockTriggeredBattleEvent

java.lang.Object
net.minecraftforge.eventbus.api.Event
com.pixelmonmod.pixelmon.api.events.PixelmonBlockTriggeredBattleEvent

public class PixelmonBlockTriggeredBattleEvent extends net.minecraftforge.eventbus.api.Event
Fires when a battle MIGHT be started as a result of a block such as seaweed, tall grass, rock smash, etc. Note that this event will fire even if a battle will not occur. In the event of rock smash, there is still a chance that no battle will be started. This event is only in regards to the actual potential of a battle starting. If you want the event for the battle starting, see PixelmonBlockStartingBattleEvent Canceling this event will stop any chance of a battle starting
  • Nested Class Summary

    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
    Modifier and Type
    Field
    Description
    The specific spawning handler being used to trigger the event
    The Pokemon that triggered the event if from a MoveSkill otherwise it will be null
    final net.minecraft.server.level.ServerPlayer
    The player who triggered the event
    final net.minecraft.core.BlockPos
    The position of the block triggering the event
    The source of the battle as an element of EnumBattleStartTypes
    final net.minecraft.world.level.Level
    The world in which the triggering block is located
  • Constructor Summary

    Constructors
    Constructor
    Description
    PixelmonBlockTriggeredBattleEvent(BlockSpawningHandler handler, net.minecraft.world.level.Level world, net.minecraft.core.BlockPos pos, net.minecraft.server.level.ServerPlayer player, PixelmonEntity entityPixelmon, BattleStartTypes startType)
     
  • Method Summary

    Methods inherited from class net.minecraftforge.eventbus.api.Event

    getListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • handler

      public final BlockSpawningHandler handler
      The specific spawning handler being used to trigger the event
    • world

      public final net.minecraft.world.level.Level world
      The world in which the triggering block is located
    • pos

      public final net.minecraft.core.BlockPos pos
      The position of the block triggering the event
    • player

      public final net.minecraft.server.level.ServerPlayer player
      The player who triggered the event
    • pixelmon

      public final PixelmonEntity pixelmon
      The Pokemon that triggered the event if from a MoveSkill otherwise it will be null
    • startType

      public final BattleStartTypes startType
      The source of the battle as an element of EnumBattleStartTypes
  • Constructor Details

    • PixelmonBlockTriggeredBattleEvent

      public PixelmonBlockTriggeredBattleEvent(BlockSpawningHandler handler, net.minecraft.world.level.Level world, net.minecraft.core.BlockPos pos, net.minecraft.server.level.ServerPlayer player, PixelmonEntity entityPixelmon, BattleStartTypes startType)