public static class MysteryBoxEvent.Feed extends MysteryBoxEvent
MysteryBoxEvent.Activate, MysteryBoxEvent.ComparatorPower, MysteryBoxEvent.Feed, MysteryBoxEvent.Open, MysteryBoxEvent.Tick
Constructor and Description |
---|
Feed(MysteryBoxTileEntity box,
net.minecraft.entity.player.PlayerEntity player,
net.minecraft.block.BlockState blockState,
net.minecraft.item.ItemStack itemStack,
int scrapsLeft)
Fired when a Mystery Box is about to be fed a scrap.
|
Modifier and Type | Method and Description |
---|---|
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.
|
int |
getScrapsLeft()
The current value of the counter for Netherite Scraps required to open this Mystery Box.
|
void |
setScrapsLeft(int scrapsLeft)
Sets the current value of the counter for Netherite Scraps required to open this Mystery Box.
|
getBlockState, getBox
public Feed(MysteryBoxTileEntity box, net.minecraft.entity.player.PlayerEntity player, net.minecraft.block.BlockState blockState, net.minecraft.item.ItemStack itemStack, int scrapsLeft)
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.scrapsLeft
- The current value of the counter for Netherite Scraps required to open this Mystery Box.public net.minecraft.entity.player.PlayerEntity getPlayer()
public net.minecraft.item.ItemStack getItemStack()
public int getScrapsLeft()
public void setScrapsLeft(int scrapsLeft)
scrapsLeft
- The value of the scrap counter.