public class UseBattleItemEvent
Event fired when an item is about to be used in battle. This is during the execution of battle turns, not in
the moment that the participant decided to use an item.
The target, used ItemStack, and the additionalInfo (in the case of self-targeting item usage) are all mutable
but if you decide to use these then first understand how they work for the item you're working with. For
items being used on the user, the value of target and user will be the same. For
items being used on a target, additionalInfo will be equal to -1.
Cancelling this event will prevent the item from being consumed and from any messages being sent about the
item. Note: this will mean the user of the item will do nothing during their turn.
Created by Hiroku
March 11, 2019 (Pixelmon 7.0.4)
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraftforge.fml.common.eventhandler.Event
The ItemStack being used on the Pokémon. This is the exact ItemStack from the inventory that will be consumed.
You are free to modify this value so long as it is never null and is never wrapping an item that
doesn't extend PixelmonItem.
public int additionalInfo
Additional information in integer form that the specific item might need to function. At time of writing, this
is -1 for when the item is self-targeting, and in the specific case of Ether usage it is the move index. In
all other cases this is zero. As a consequence, this value only needs changing if you are changing the target
move of an Ether usage or are changing the used item to an Ether. Highly unlikely, but here you go.