Package net.fabricmc.fabric.api.resource

package net.fabricmc.fabric.api.resource
The Resource Loader, version 0.

Quick note about vocabulary in Resource Loader and Minecraft:

  • Resource Pack refers to both client-sided resource pack and data pack.
  • Virtual Resource Pack refers to a resource pack that may be generated at runtime, or simply doesn't exist directly on disk.
  • Group Resource Pack refers to a virtual resource pack that groups multiple resource packs together.

Modded Resource Pack Handling

The Resource Loader will create a resource pack for each mod that provides resources in assets or data sub-directories. Those mod resource packs are grouped into a single always-enabled group resource pack which is shown in the resource pack screen.

Built-in Mod Resource Pack

The Resource Loader adds manually registered mod resource packs. Those resource packs are registered with ResourceManagerHelper.registerBuiltinResourcePack(net.minecraft.util.Identifier, net.fabricmc.loader.api.ModContainer, net.fabricmc.fabric.api.resource.ResourcePackActivationType)

Programmer Art Resource Pack

The Resource Loader will inject resources into the Programmer Art resource pack for each mod that provides Programmer Art resources in the programmer_art top-level directory of the mod whose structure is similar to a normal resource pack.

Resource Reload Listener

The Resource Loader allows mods to register resource reload listeners through ResourceManagerHelper.registerReloadListener(net.fabricmc.fabric.api.resource.IdentifiableResourceReloadListener), which are triggered when resources are reloaded. A resource reload listener can depend on another and vanilla resource reload listener identifiers may be found in ResourceReloadListenerKeys.