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
Modifier and TypeFieldDescriptionfinal PixelmonEntity
The optional Pokemon that started it.final net.minecraft.server.level.ServerPlayer
The player being engaged in the battlefinal net.minecraft.core.BlockPos
The exact position of the block starting the battlefinal BattleStartTypes
The source of the battle as an element of EnumBattleStartTypesfinal PixelmonEntity
The Pokemon being foughtfinal PixelmonEntity
The optional second Pokemon being fought, used in the event of a double battlefinal net.minecraft.world.level.Level
The world in which the block activating the battle is located -
Constructor Summary
ConstructorDescriptionPixelmonBlockStartingBattleEvent
(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
-
Field Details
-
worldIn
public final net.minecraft.world.level.Level worldInThe world in which the block activating the battle is located -
pos
public final net.minecraft.core.BlockPos posThe exact position of the block starting the battle -
player
public final net.minecraft.server.level.ServerPlayer playerThe player being engaged in the battle -
startType
The source of the battle as an element of EnumBattleStartTypes -
initialisingPixelmon
The optional Pokemon that started it. For example, the Pokemon using headbutt. -
wildPixelmon1
The Pokemon being fought -
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)
-