canLoad

abstract fun canLoad(@NotNull resourceName: @NotNull String): Boolean(source)

Returns whether the current resource loader can load a resource with a given file name. Called only on Minecraft 1.18.2 or lower. Further filtering takes place in canLoad.

Return

true, if the resource may be loaded, and should be checked with its full path, false otherwise

Parameters

resourceName

The file name of the resource. For example, the file name of /assets/minecraft/textures/texture.png is texture.png

See also


abstract fun canLoad(@NotNull resourcePath: @NotNull Identifier): Boolean(source)

Returns whether the current resource loader can load a resource at the given path.

Return

true, if the resource can be loaded, false otherwise

Parameters

resourcePath

The path to the resource to load