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

public static class ApricornEvent.Pick extends 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

    Constructors
    Constructor
    Description
    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 Summary

    Modifier and Type
    Method
    Description
    net.minecraft.world.item.ItemStack
    Gets the itemstack being dropped
    net.minecraft.server.level.ServerPlayer
    Gets the player picking the item

    Methods 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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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: