public static class BagItemEvent.SelectItem.Pre extends BagItemEvent.SelectItem
BagItemEvent.SelectItem.Post, BagItemEvent.SelectItem.Pre
BagItemEvent.CollectItems, BagItemEvent.Identifiers, BagItemEvent.SelectItem
foundItem, selectedItem
battleController
Constructor and Description |
---|
Pre(BattleController battleController,
java.lang.String identifier,
net.minecraft.entity.player.ServerPlayerEntity player,
net.minecraft.item.ItemStack selectedItem,
net.minecraft.item.ItemStack foundItem) |
Modifier and Type | Method and Description |
---|---|
void |
setFoundItem(net.minecraft.item.ItemStack foundItem)
Sets the
ItemStack found by the item scan to something else. |
getFoundItem, getSelectedItem
getIdentifier, getPlayer, isIdentifier, isNormalBattle
getBattleController
public Pre(BattleController battleController, java.lang.String identifier, net.minecraft.entity.player.ServerPlayerEntity player, net.minecraft.item.ItemStack selectedItem, net.minecraft.item.ItemStack foundItem)
public void setFoundItem(net.minecraft.item.ItemStack foundItem)
ItemStack
found by the item scan to something else.
If a fake item was selected, then this must be set to a non-null value in order for the fake item to
function.foundItem
- The ItemStack
to be considered as found instead.