Class MysteryBoxEvent.Open
java.lang.Object
net.minecraftforge.eventbus.api.Event
com.pixelmonmod.pixelmon.api.events.blocks.MysteryBoxEvent
com.pixelmonmod.pixelmon.api.events.blocks.MysteryBoxEvent.Open
- Direct Known Subclasses:
MysteryBoxEvent.Open.Post
,MysteryBoxEvent.Open.Pre
- Enclosing class:
- MysteryBoxEvent
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
static class
Nested classes/interfaces inherited from class com.pixelmonmod.pixelmon.api.events.blocks.MysteryBoxEvent
MysteryBoxEvent.Activate, MysteryBoxEvent.ComparatorPower, MysteryBoxEvent.Feed, MysteryBoxEvent.Open, MysteryBoxEvent.Tick
Nested classes/interfaces inherited from class net.minecraftforge.eventbus.api.Event
net.minecraftforge.eventbus.api.Event.HasResult, net.minecraftforge.eventbus.api.Event.Result
-
Constructor Summary
ModifierConstructorDescriptionprotected
Open
(MysteryBoxTileEntity box, net.minecraft.world.entity.player.Player player, net.minecraft.world.level.block.state.BlockState blockState, net.minecraft.world.item.ItemStack itemStack) MysteryBoxEvent.Open base constructor. -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.world.item.ItemStack
Gets the item stack used in this interaction.net.minecraft.world.entity.player.Player
Gets the player who instigated this event.Methods inherited from class com.pixelmonmod.pixelmon.api.events.blocks.MysteryBoxEvent
getBlockState, getBox
Methods inherited from class net.minecraftforge.eventbus.api.Event
getListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult
-
Constructor Details
-
Open
protected Open(MysteryBoxTileEntity box, net.minecraft.world.entity.player.Player player, net.minecraft.world.level.block.state.BlockState blockState, net.minecraft.world.item.ItemStack itemStack) MysteryBoxEvent.Open base constructor.- Parameters:
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.
-
-
Method Details
-
getPlayer
public net.minecraft.world.entity.player.Player getPlayer()Gets the player who instigated this event.- Returns:
- The player entity.
-
getItemStack
public net.minecraft.world.item.ItemStack getItemStack()Gets the item stack used in this interaction.- Returns:
- The item stack used.
-