Builder for a 'Reference' loot condition.
A Reference condition defers checking to another loot condition, identified by the given MCResourceLocation, that acts as the name of the additional condition. This allows additional conditions that may have been created in a data-pack to be referred by other conditions, created from within scripts.
This condition acts as the vanilla counterpart of the Delegate loot condition, providing support only for data-packs instead of scripts.
A 'Reference' loot condition requires the name of the condition to call to be built correctly.
It might be required for you to import the package if you encounter any issues (like casting an Array), so better be safe than sorry and add the import at the very top of the file.
Reference implements the following interfaces. That means all methods defined in these interfaces are also available in Reference
Sets the name of the data-pack loot condition to query.
This parameter is required.
Returns: This builder for chaining.
Return Type: Reference
Reference.withName(name as string) as Reference