Interface PlayerPickupItemCallback


public interface PlayerPickupItemCallback
Callback for the player picking up an item entity. Is hooked in before the item is picked up.

Upon return:

  • SUCCESS cancels further processing and picks up the item.
  • PASS falls back to further processing. If all listeners return PASS, the item is picked up.
  • FAIL cancels further processing and does not pick up the item.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final net.fabricmc.fabric.api.event.Event<PlayerPickupItemCallback>
     
  • Method Summary

    Modifier and Type
    Method
    Description
    net.minecraft.world.InteractionResult
    interact(net.minecraft.world.entity.player.Player player, net.minecraft.world.entity.item.ItemEntity pickupEntity)
     
  • Field Details

  • Method Details

    • interact

      net.minecraft.world.InteractionResult interact(net.minecraft.world.entity.player.Player player, net.minecraft.world.entity.item.ItemEntity pickupEntity)