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 {@code assets} or {@code 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 registerBuiltinResourcePack

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 {@code 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 registerReloadListener, 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 net.fabricmc.fabric.api.resource.ResourceReloadListenerKeys.

Types

IdentifiableResourceReloadListener
Link copied to clipboard
public interface IdentifiableResourceReloadListener implements ResourceReloader
Interface for "identifiable" resource reload listeners.
ModResourcePack
Link copied to clipboard
public interface ModResourcePack implements ResourcePack
Interface implemented by mod-provided resource packs.
ResourceManagerHelper
Link copied to clipboard
public interface ResourceManagerHelper
Helper for working with ResourceManager instances, and other resource loader generalities.
ResourcePackActivationType
Link copied to clipboard
public enum ResourcePackActivationType
Represents the resource pack activation type.
ResourceReloadListenerKeys
Link copied to clipboard
public final class ResourceReloadListenerKeys
This class contains default keys for various Minecraft resource reload listeners.
SimpleResourceReloadListener
Link copied to clipboard
public interface SimpleResourceReloadListener<T> implements IdentifiableResourceReloadListener
A simplified version of the "resource reload listener" interface, hiding the peculiarities of the API.
SimpleSynchronousResourceReloadListener
Link copied to clipboard
public interface SimpleSynchronousResourceReloadListener implements IdentifiableResourceReloadListener, SynchronousResourceReloader
A simplified version of the "resource reload listener" interface, hiding the peculiarities of the API and ensuring all data is loaded on the main thread.