Skip to main content

Module api

Module api 

Source
Expand description

An API for programmatically accessing Minecraft resources and associated metadata.

§Resource Locations

Every resource is associated with a unique ResourceLocation, which is a combination of a ResourceKind and a namespaced identifier.

§Providers

Resources can be enumerated and loaded using the ResourceProvider trait. This crate provides the FileSystemResourceProvider as a convenient implementation of this trait.

§Asset Pack

Resources can be ergonomically loaded through the AssetPack API.

Structs§

AssetPack
Top-level API for accessing Minecraft assets.
FileSystemResourceProvider
A ResourceProvider that provides resources from the local file system.
ModelIdentifier
Helper methods for dealing with model identifiers.
ModelResolver
Methods for resolving the properties of a Model with respect to its parents.
ResourceLocation
Represents a Minecraft resource location.
ResourcePath
Represents the full path to a resource, e.g., on the local file system.

Enums§

Error
Error types that can be returned from API methods.
ResourceCategory
The category of a resource.
ResourceKind
The type of a resource.

Constants§

MINECRAFT_NAMESPACE

Traits§

EnumerateResources
Indicates that a type can enumerate available resources.
LoadResource
Indicates that a type can load provide the raw data of resources.
ResourceProvider
Marker trait for types that are EnumerateResources and LoadResource.

Type Aliases§

Result
Result alias for convenience.