Package net.minecraft.resource


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

"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 binary data.
ResourceFactory Provides a resource given an Identifier.
ResourceManager Exposes more resource access in addition to being a ResourceFactory.
ResourceReloader The most common accessor to resources, acting during "reloads" to set up in-game contents.
This is usually implemented by mods using resources.
ReloadableResourceManager Performs reloads and manages ResourceReloaders in addition to being a ResourceManager.
Usually held by the game engine, it may be provided by the modding APIs as well.
Resource Provision APIs
ClassUsage
ResourcePack Provides binary data based on queries.
They are usually single-use, created by ResourcePackManager and provided to ReloadableResourceManager 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 ReloadableResourceManagers in each reload.

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