registerBuiltinResourcePack

static boolean registerBuiltinResourcePack(Identifier id, ModContainer container, ResourcePackActivationType activationType)

Registers a built-in resource pack.

A built-in resource pack is an extra resource pack provided by your mod which is not always active, it's similar to the "Programmer Art" resource pack.

Why and when to use it? A built-in resource pack should be used to provide extra assets/data that should be optional with your mod but still directly provided by it.For example it could provide textures of your mod in another resolution, or could allow to provide different styles of your assets.

The path in which the resource pack is located is in the mod JAR file under the {@code "resourcepacks/"} directory. {@code id path} being the path specifiedin the identifier of this built-in resource pack.

Return

{@code true} if successfully registered the resource pack, else {@code false}

Parameters

id

the identifier of the resource pack

container

the mod container

activationType

the activation type of the resource pack

static boolean registerBuiltinResourcePack(Identifier id, String subPath, ModContainer container, boolean enabledByDefault)

Registers a built-in resource pack.

A built-in resource pack is an extra resource pack provided by your mod which is not always active, it's similar to the "Programmer Art" resource pack.

Why and when to use it? A built-in resource pack should be used to provide extra assets/data that should be optional with your mod but still directly provided by it.For example it could provide textures of your mod in another resolution, or could allow to provide different styles of your assets.

The {@code subPath} corresponds to a path in the JAR file which points to the resource pack folder. For example the subPath can be {@code "resourcepacks/extra"}.

Note about the enabled by default parameter: a resource pack cannot be enabled by default, only data packs can.Making this work for resource packs is near impossible without touching how Vanilla handles disabled resource packs.

Return

{@code true} if successfully registered the resource pack, else {@code false}

Deprecated

Please use registerBuiltinResourcePack instead, the {@code sub path} should be removed in a futurerelease in favor of the identifier path.

Parameters

id

the identifier of the resource pack

subPath

the sub path in the mod resources

container

the mod container

enabledByDefault

{@code true} if enabled by default, else {@code false}