Skip to main content

apply_use_remainder

Function apply_use_remainder 

Source
pub(crate) fn apply_use_remainder(
    original_stack: &ItemStack,
    used_stack: ItemStack,
    user: &dyn LivingEntity,
) -> ItemStack
Expand description

Applies vanilla UseRemainder.convertIntoRemainder: if the original stack had a use_remainder and was actually consumed, either swap the fully emptied stack for the remainder, or — for a stack that still has items left (e.g. one honey bottle out of several)