public interface ActiveItemData extends DataManipulator<ActiveItemData,ImmutableActiveItemData>
DataManipulator
which allows access to the active item that a
Living
may be using. For example this includes a food a player is
currently eating or a shield they are blocking with.
If there is no item, the snapshot will be empty. You can check this
with ItemStackSnapshot.isEmpty()
.
Modifier and Type | Method and Description |
---|---|
Value<ItemStackSnapshot> |
activeItem()
Gets the item stack snapshot of the item that is currently being used.
|
asImmutable, copy, fill, fill, from, set, set, set, set, transform
getContentVersion, toContainer
Value<ItemStackSnapshot> activeItem()
If there is no item, the snapshot will be empty. You can check this
with ItemStackSnapshot.isEmpty()
.