pub(crate) fn clear_or_count_matching_stack(
stack: &mut ItemStack,
predicate: &dyn Fn(&ItemStack) -> bool,
amount_to_remove: i32,
counting_only: bool,
) -> i32Expand description
Removes or counts matching items in one stack using vanilla /clear semantics.