- 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.
-
Method Summary
@Nullable net.minecraft.world.item.ItemStack
onPickItemFromEntity(net.minecraft.server.level.ServerPlayer player,
net.minecraft.world.entity.Entity entity,
boolean requestIncludeData)
Determines the pick item stack to give to a player that is attempting to pick an item from a entity.
-
Method Details
-
onPickItemFromEntity
@Nullable net.minecraft.world.item.ItemStack onPickItemFromEntity(net.minecraft.server.level.ServerPlayer player,
net.minecraft.world.entity.Entity entity,
boolean requestIncludeData)
Determines the pick item stack to give to a player that is attempting to pick an item from a entity.
- Parameters:
player - the player attempting to pick an item from a entity
entity - the entity being picked from
requestIncludeData - whether the client has requested additional data to be included in the picked item stack; unused in vanilla
- Returns:
- a pick item stack to give to the player, or
null if the default pick item stack should be given