类 ItemEntityPickupEvent.Post

java.lang.Object
net.neoforged.bus.api.Event
net.neoforged.neoforge.event.entity.player.ItemEntityPickupEvent
net.neoforged.neoforge.event.entity.player.ItemEntityPickupEvent.Post
封闭类:
ItemEntityPickupEvent

public static class ItemEntityPickupEvent.Post extends ItemEntityPickupEvent
This event is fired when an ItemEntity on the ground has been picked up by the player and after the item is added to the player's inventory.

This event only fires if part of the item was picked up by the player.

If the remaining item stack is empty, the item entity will be discarded.

This event is only fired on the logical server.

  • 字段详细资料

    • originalStack

      private final ItemStack originalStack
  • 构造器详细资料

  • 方法详细资料

    • getOriginalStack

      public ItemStack getOriginalStack()
      Returns a copy of the original stack, before it was added to the player's inventory. Changes to this item stack have no effect on any further processing.
    • getCurrentStack

      public ItemStack getCurrentStack()
      Returns a live reference to the remaining stack held by the ItemEntity.