Class ApricornEvent.Pick
java.lang.Object
net.minecraftforge.eventbus.api.Event
com.pixelmonmod.pixelmon.api.events.ApricornEvent
com.pixelmonmod.pixelmon.api.events.ApricornEvent.Pick
- Enclosing class:
- ApricornEvent
ApricornEvent
subclass event which fires when an apricorn is being picked by a player.
Cancelling this event will stop the player from harvesting the apricorn
-
Nested Class Summary
Nested classes/interfaces inherited from class com.pixelmonmod.pixelmon.api.events.ApricornEvent
ApricornEvent.Pick
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
ConstructorDescriptionPick
(net.minecraft.world.level.Level level, net.minecraft.world.level.block.state.BlockState state, ApricornType apricorn, net.minecraft.core.BlockPos pos, net.minecraft.server.level.ServerPlayer player, net.minecraft.world.item.ItemStack pickedStack) -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.world.item.ItemStack
Gets the itemstack being droppednet.minecraft.server.level.ServerPlayer
Gets the player picking the itemMethods inherited from class com.pixelmonmod.pixelmon.api.events.ApricornEvent
getApricorn, getLevel, getPos, getState
Methods inherited from class net.minecraftforge.eventbus.api.Event
getListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult
-
Constructor Details
-
Pick
public Pick(net.minecraft.world.level.Level level, net.minecraft.world.level.block.state.BlockState state, ApricornType apricorn, net.minecraft.core.BlockPos pos, net.minecraft.server.level.ServerPlayer player, net.minecraft.world.item.ItemStack pickedStack)
-
-
Method Details
-
getPickedStack
public net.minecraft.world.item.ItemStack getPickedStack()Gets the itemstack being dropped- Returns:
- the dropped stack
-
getPlayer
public net.minecraft.server.level.ServerPlayer getPlayer()Gets the player picking the item- Returns:
-