public class UseBattleItemEvent extends BattleEvent
target and user will be the same. For
items being used on a target, additionalInfo will be equal to -1. | Modifier and Type | Field and Description |
|---|---|
protected int |
additionalInfo |
protected BattleParticipant |
participant |
protected net.minecraft.item.ItemStack |
stack |
protected PixelmonWrapper |
target |
protected PixelmonWrapper |
user |
battleController| Constructor and Description |
|---|
UseBattleItemEvent(PixelmonWrapper user,
PixelmonWrapper target,
net.minecraft.item.ItemStack stack,
int additionalInfo) |
| Modifier and Type | Method and Description |
|---|---|
int |
getAdditionalInfo()
Additional information in integer form that the specific item might need to function.
|
BattleParticipant |
getParticipant() |
net.minecraft.item.ItemStack |
getStack()
The ItemStack being used on the Pokémon.
|
PixelmonWrapper |
getTarget()
Gets the target of the item being used
In self targetting instances this is
this#getUser() |
PixelmonWrapper |
getUser()
Gets the user of the item
|
void |
setAdditionalInfo(int additionalInfo)
Additional information in integer form that the specific item might need to function.
|
void |
setStack(net.minecraft.item.ItemStack stack)
The ItemStack being used on the Pokémon.
|
void |
setTarget(PixelmonWrapper target)
Sets the target
|
getBattleControllerprotected final BattleParticipant participant
protected final PixelmonWrapper user
protected PixelmonWrapper target
protected net.minecraft.item.ItemStack stack
protected int additionalInfo
public UseBattleItemEvent(PixelmonWrapper user, PixelmonWrapper target, net.minecraft.item.ItemStack stack, int additionalInfo)
public BattleParticipant getParticipant()
public PixelmonWrapper getUser()
public PixelmonWrapper getTarget()
this#getUser()public void setTarget(PixelmonWrapper target)
target - The new targetpublic net.minecraft.item.ItemStack getStack()
null and is never wrapping an item that
doesn't extend PixelmonItem.public void setStack(net.minecraft.item.ItemStack stack)
null and is never wrapping an item that
doesn't extend PixelmonItem.public int getAdditionalInfo()
public void setAdditionalInfo(int additionalInfo)