Additional Args Support
Backend that turns the AdditionalArgs declaration into actual persistent-data reads and writes.
It is the glue behind EffectiveItem.getAdditionalArgs / EffectiveEntity.getAdditionalArgs: it parses raw string arguments (from createItemStack(args) / spawnEntity(loc, args) or the /egive and /emob commands) into typed values, stores them on the holder's PersistentDataHolder, and reads them back. You rarely call it directly — the base classes and commands do — but it is public so custom commands or tooling can reuse the same parsing.
Value formats. Each declared key has a PersistentDataType; a raw string is parsed accordingly: scalar types (STRING, BYTE, SHORT, INTEGER, LONG, FLOAT, DOUBLE, BOOLEAN) from a single token, and array types (BYTE_ARRAY, INTEGER_ARRAY, LONG_ARRAY) from a comma-separated list. Unsupported types fail to parse. When read back, values are stringified (arrays comma-joined) so they round-trip through commands and lore.
localeScope. Several methods take a localeScope ("items" or "entities") used only to pick the message key for errors — e.g. errors.items.cannot_parse_additional_arg — so item and entity failures read naturally.
Functions
All declared keys resolved to NamespacedKey -> PDC type pairs (in declaration order), or null if args is null. Handy for enumerating every stored parameter without knowing the names up front.
Reads the declared args values from holder's persistent data and returns them as strings, in declaration order (arrays comma-joined). Returns an empty list if args is null/empty or if any declared key is missing on the holder — i.e. it's all-or-nothing, matching how applyToHolder writes the full set. Useful for showing current values in lore or echoing them back to commands.