Class BerryEvent.Pick

java.lang.Object
net.minecraftforge.eventbus.api.Event
com.pixelmonmod.pixelmon.api.events.BerryEvent
com.pixelmonmod.pixelmon.api.events.BerryEvent.Pick
Enclosing class:
BerryEvent

public static class BerryEvent.Pick extends BerryEvent
BerryEvent subclass event which fires when an berry is being picked by a player.

Cancelling this event will stop the player from harvesting the berry

  • Nested Class Summary

    Nested classes/interfaces inherited from class com.pixelmonmod.pixelmon.api.events.BerryEvent

    BerryEvent.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, BerryType berry, 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.BerryEvent

    getBerry, 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, BerryType berry, 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: