pub(super) fn collection_field_nbt<P>( collection: Option<&CollectionPredicate<P>>, name: &str, encode: impl Fn(&P) -> NbtTag + Copy, ) -> NbtTag