Package net.minecraft.resource


package net.minecraft.resource
Provides resources to Minecraft, including resource access, provision, and reloading.

"Data" as in "Data Packs" is considered resource as well.

Here is a quick overview on the resource access and provision APIs of Minecraft:

Resource Access APIs
ClassUsage
Resource Accesses to binary data.
ResourceFactory Provides a resource given an Identifier.
ResourceManager Exposes more resource access in addition to being a ResourceFactory.
LifecycledResourceManager A resource manager with a specific lifecycle, to fine-grain resource access.
ResourceReloader The most common accessor to resources, acting during reloads to set up in-game contents.
This is usually implemented by mods using resources.
Resource Provision APIs
ClassUsage
ResourcePack Provides binary data based on queries.
They are usually single-use, created by ResourcePackManager and provided to the resource manager in each reload.
ResourcePackProfile A user-friendly, persistent form of ResourcePack. Used to create resource packs in reloads.
ResourcePackProvider Provides ResourcePackProfiles, so they are taken account of during reloads.
This is usually implemented by mods providing resources.
ResourcePackManager Keeps track of ResourcePackProviders and uses the profiles from the providers to create ResourcePacks to send to resource managers in each reload.

In addition to these APIs, this package includes implementation details of the resource system.