Class PixelmonBlockStartingBattleEvent

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

public class PixelmonBlockStartingBattleEvent extends net.minecraftforge.eventbus.api.Event
Fired when a battle is started by a block, for example seaweed, tall grass, rock smashing, etc. Note that this event only fires when a battle would definitely be starting, which is not the same as PixelmonBlockTriggeredBattleEvent Canceling this event will stop the battle from 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 optional Pokemon that started it.
    final net.minecraft.server.level.ServerPlayer
    The player being engaged in the battle
    final net.minecraft.core.BlockPos
    The exact position of the block starting the battle
    The source of the battle as an element of EnumBattleStartTypes
    The Pokemon being fought
    The optional second Pokemon being fought, used in the event of a double battle
    final net.minecraft.world.level.Level
    The world in which the block activating the battle is located
  • Constructor Summary

    Constructors
    Constructor
    Description
    PixelmonBlockStartingBattleEvent(net.minecraft.world.level.Level worldIn, net.minecraft.core.BlockPos pos, net.minecraft.server.level.ServerPlayer player, BattleStartTypes startType, PixelmonEntity fightingPokemon, PixelmonEntity pixelmon1, PixelmonEntity pixelmon2)
     
  • 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

    • worldIn

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

      public final net.minecraft.core.BlockPos pos
      The exact position of the block starting the battle
    • player

      public final net.minecraft.server.level.ServerPlayer player
      The player being engaged in the battle
    • startType

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

      public final PixelmonEntity initialisingPixelmon
      The optional Pokemon that started it. For example, the Pokemon using headbutt.
    • wildPixelmon1

      public final PixelmonEntity wildPixelmon1
      The Pokemon being fought
    • wildPixelmon2

      public final PixelmonEntity wildPixelmon2
      The optional second Pokemon being fought, used in the event of a double battle
  • Constructor Details

    • PixelmonBlockStartingBattleEvent

      public PixelmonBlockStartingBattleEvent(net.minecraft.world.level.Level worldIn, net.minecraft.core.BlockPos pos, net.minecraft.server.level.ServerPlayer player, BattleStartTypes startType, PixelmonEntity fightingPokemon, PixelmonEntity pixelmon1, PixelmonEntity pixelmon2)