ModelContent

A PackTaskHolder that deals with model files. Everything related to model files should run through this.

Functions

Link copied to clipboard
fun Iterable<Player>.filterInRange(location: Location, maxDistance: Double): List<Player>
Link copied to clipboard
Link copied to clipboard
operator fun get(path: ResourcePath): Model?

Retrieves the model with the specified path or null if it does not exist.

Link copied to clipboard

Retrieves the custom model with the specified path or null if it does not exist.

Link copied to clipboard
fun getOrPut(path: ResourcePath, createModel: () -> Model): Model

Retrieves the Model registered under the given path or creates a model using createModel, registers it under the given path and returns it.

fun getOrPut(model: Model, createPath: () -> ResourcePath): ResourcePath

Retrieves the first ResourcePath the given model is registered under or creates a new ResourcePath using createPath, registers it under the given model and returns it.

Link copied to clipboard

Finds the ResourcePath of the given model or registers it in nova:generated/.

Link copied to clipboard

Retrieves the ResourcePaths the given model is registered under or null if it is neither present in the resource pack nor in the vanilla assets.

Link copied to clipboard

Retrieves the vanilla model with the specified path or null if it does not exist.

Link copied to clipboard
open operator override fun iterator(): Iterator<Map.Entry<ResourcePath, Model>>

Returns an iterator over the custom models.

Link copied to clipboard

Remembers the usage of the model under the given path and its parents. Only models that are used will be written to the resource pack.

Link copied to clipboard
operator fun set(path: ResourcePath, model: Model)

Sets the custom model under the given path, replacing any existing model under that path.

Link copied to clipboard