public static class MysteryBoxEvent.Activate extends MysteryBoxEvent
MysteryBoxEvent.Activate, MysteryBoxEvent.ComparatorPower, MysteryBoxEvent.Feed, MysteryBoxEvent.Open, MysteryBoxEvent.Tick| Constructor and Description |
|---|
Activate(MysteryBoxTileEntity box,
net.minecraft.entity.player.PlayerEntity player,
net.minecraft.block.BlockState blockState,
net.minecraft.item.ItemStack itemStack,
net.minecraft.item.Item acceptedItem)
Fired when a Mystery Box is right-clicked by a player.
|
| Modifier and Type | Method and Description |
|---|---|
net.minecraft.item.Item |
getAcceptedItem()
The item which will be accepted as valid for this interaction.
|
net.minecraft.item.ItemStack |
getItemStack()
Gets the item stack used in this interaction.
|
net.minecraft.entity.player.PlayerEntity |
getPlayer()
Gets the player who instigated this event.
|
void |
setAcceptedItem(net.minecraft.item.Item acceptedItem)
Changes the item which will be accepted as valid for this interaction.
|
getBlockState, getBoxpublic Activate(MysteryBoxTileEntity box, net.minecraft.entity.player.PlayerEntity player, net.minecraft.block.BlockState blockState, net.minecraft.item.ItemStack itemStack, net.minecraft.item.Item acceptedItem)
box - The Mystery Box tile entity.player - The player instigating this event.blockState - The block state of this Mystery Box.itemStack - The item stack being used in this interaction.acceptedItem - The item which this Mystery Box will accept as input.public net.minecraft.entity.player.PlayerEntity getPlayer()
public net.minecraft.item.ItemStack getItemStack()
public net.minecraft.item.Item getAcceptedItem()
public void setAcceptedItem(net.minecraft.item.Item acceptedItem)
acceptedItem - The new item required.