Skip to main content

clear_or_count_matching_stack

Function clear_or_count_matching_stack 

Source
pub(crate) fn clear_or_count_matching_stack(
    stack: &mut ItemStack,
    predicate: &dyn Fn(&ItemStack) -> bool,
    amount_to_remove: i32,
    counting_only: bool,
) -> i32
Expand description

Removes or counts matching items in one stack using vanilla /clear semantics.