Interface PlayerPickItemEvents.PickItemFromBlock

Enclosing class:
PlayerPickItemEvents
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public static interface PlayerPickItemEvents.PickItemFromBlock
  • Method Summary

    Modifier and Type
    Method
    Description
    @Nullable ItemStack
    onPickItemFromBlock(ServerPlayerEntity player, BlockPos pos, BlockState state, boolean requestIncludeData)
    Determines the pick item stack to give to a player that is attempting to pick an item from a block.
  • Method Details

    • onPickItemFromBlock

      @Nullable @Nullable ItemStack onPickItemFromBlock(ServerPlayerEntity player, BlockPos pos, BlockState state, boolean requestIncludeData)
      Determines the pick item stack to give to a player that is attempting to pick an item from a block.
      Parameters:
      player - the player attempting to pick an item from a block
      pos - the position of the block being picked from
      state - the state of the block being picked from
      requestIncludeData - whether the client has requested additional data to be included in the picked item stack
      Returns:
      a pick item stack to give to the player, or null if the default pick item stack should be given