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:
Class | Usage |
---|---|
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 ResourceReloader s in addition to being a ResourceManager .
Usually held by the game engine, it may be provided by the modding APIs as well. |
Class | Usage |
---|---|
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 ResourcePackProfile s, so they are taken account of during reloads.
This is usually implemented by mods providing resources. |
ResourcePackManager |
Keeps track of ResourcePackProvider s and uses the profiles from the providers
to create ResourcePack s to send to ReloadableResourceManager s in each reload. |
In addition to these APIs, this package includes implementation details of the resource system.
-
InterfaceDescriptionA resource manager that has a reload mechanism.A resource of binary data.Provides resource access.Provides resource loading capabilities to Minecraft.A resource pack, providing resources to resource managers.A factory for resource pack profiles, somewhat resembling the constructor of
ResourcePackProfile
but allowing more customization.A resource pack provider providesResourcePackProfile
s, usually toResourcePackManager
s.Represents a resource reload.A resource reloader performs actual reloading in its reload in a reloadable resource manager it is registered to.A synchronizer to indicate completion of a reloader's prepare stage and to allow start of the apply stage only if all reloaders have finished the prepare stage.A factory that creates a completable future for each reloader in the resource reload.A base resource reloader that does all its work in the apply executor, or the game engine's thread. -
ClassDescriptionAn abstract implementation of resource reloader that reads JSON files into Gson representations in the prepare stage.An implementation of resource reload that includes an additional profiling summary for each reloader.The profiling summary for each reloader in the reload.A resource pack manager manages a list of
ResourcePackProfile
s and builds a list of resource packs when the resource manager reloads.Represents a resource pack in aResourcePackManager
.A simple implementation of resource reload.A base resource reloader implementation that prepares an object in a single call (as opposed to in multiple concurrent tasks) and handles the prepared object in the apply stage. -
Enum ClassDescription
-
ExceptionDescription