From 4a05de7fe1bd0f1f6c94f0bff08484481a38c810 Mon Sep 17 00:00:00 2001
From: Jab125 <67534807+jab125@users.noreply.github.com>
Date: Sat, 21 May 2022 03:17:28 +1000
Subject: [PATCH] Allow Built in Resource Packs to have custom names (#1827)

* TooltipComponent API (#1695)

* TooltipComponent API

* Add warning

* Fix handling of orphaned registry entries (#1759)

* Fix handling of orphaned registry entries

* Fix handling of orphaned registry entries in RegistrySyncManager

* Transfer API: bugfixes and improvements (#1762)

* Fix SingleVariantItemStorage extraction bug

* Inventory wrappers: reuse the original stack more aggressively

* Add some filtered overloads to StorageUtil methods

* Override PlayerInventoryStorage#insert to call #offer

* Add small comment regarding predicates

* Bump version

* Fix refamp generation for gametest API. Fixes #1722

* Bump version.

* Add two more sleep events (#1755)

* Add event for setting bed occupation state

* Add wake up pos event and update tests

* Bump version

Just in case. I have a bad feeling that
this could become a patch version otherwise.

* Add code tags for true/false/null in EntitySleepEvents jd

* Add Dynamic annotations for lambda body mixins

* Update class javadoc to contain the new events

* Bump version

* Fix Registry.GAME_EVENT not being synced.

* Updated mappings to yarn 1.17.1+build.63 (#1786)

* Updated mappings to yarn 1.17.1+build.63

* Forgot some bits.

* Forgot to reeable

* Make biome & dimension api stable. And change usage around @Deprecated (#1783)

* Make biome & dimension api stable (for 1.17). Remove the usage of @Deprecated for other experimental modules.

The @Deprecated should be used for experimental/volatile APIs that are highly likely to change.

* Apply suggestions from code review

Co-authored-by: Juuxel <6596629+Juuxel@users.noreply.github.com>

Co-authored-by: Juuxel <6596629+Juuxel@users.noreply.github.com>

* ItemGroup API: Remove return and call super so all others ItemStack's get appended (#1617)

* Remove return and call super so all others ItemStack's get appended

* Add method to FabricItemGroupBuilder to pass ItemGroup with appendItems and change stacksForDisplay to a BiConsumer

* Update ItemGroupBuilder javadoc and add example to testmod

* Remove leftover aw

* Update fabric-item-groups-v0/src/main/java/net/fabricmc/fabric/api/client/itemgroup/FabricItemGroupBuilder.java

Co-authored-by: liach <7806504+liach@users.noreply.github.com>

* Update fabric-item-groups-v0/src/testmod/java/net/fabricmc/fabric/test/item/group/ItemGroupTest.java

Co-authored-by: Technici4n <13494793+Technici4n@users.noreply.github.com>

* Remove used import in ItemGroupTest

* Clean up

* Fix damn checkstyle

* Change version to 0.3.0

Co-authored-by: liach <7806504+liach@users.noreply.github.com>
Co-authored-by: Technici4n <13494793+Technici4n@users.noreply.github.com>

* Bump version

* Add tag-based mining level API, fix and deprecate FabricBlockSettings.breakByTool (#1629)

* Mining Level API, part 1

* Fix incorrect netherite mining level in MiningLevelManager docs

* Add some format checks in dynamic mining level tag checking

* Add mining level API test mod

* Grammar

* Add cursed basic support for the tool attribute api

* Fix tool attribute JD

* Add proper compat for tool attribute api

Also fixes the remaining bugs in it!

* Update license headers

* stuff

* better comments

* more test mod work

* more

* Fix test mod

* i'm done with this module

* Address some code review things

* Use Reference2IntMap (basically IdentityHashMap for int values)

* Prefix mixin handlers with fabric$

* Add missing license header

* Update fabric-object-builder-api-v1/src/main/java/net/fabricmc/fabric/api/object/builder/v1/block/FabricBlockSettings.java

* Resolve liach's comment

* Update to use TagFactory

* Add event phases (#1669)

* Proof of concept

* Simplify and document

* Allow events to be registered with default phases

* Use modified Kosaraju for the toposort, and add test for cyclic dependency graphs

* Separate phase-related functionality in an EventPhase class

* Revert "Separate phase-related functionality in an EventPhase class"

This reverts commit e433f348f4d3d056e6c5ccf1802d11103e3fe961.

* Ensure that the phase order is deterministic

* Add pretty graphs

* Add a test, fix a bug, only do one sort for every constraint registration

* Environmental renderers (#1727)

* Environmental Renderers

* Remove defunt hideClouds and hideWeather

* Pushed missing License

* Push checkstyle fixes

* remove unused

* Unwrapped the test mod sky rendering.

* Added a first attempt at javadoc.

* Forgot a blank line

* Moved Environment references out of class

* Moved Lamda functions for fog override, thick fog usage and fog color adjustment to their own interfaces and gave them proper javadoc.

* Made FabricSkyProperties private

* PURGE THE H...I mean FabricSkyPropertyBuilder and FabricSkyProperties.

- Reverted unintentional mixin changes
- Fix various typo errors that were pointed out.
- Added missing javadocs and added the ability to override.

* Forgot some pluggin in some overrides.

* Added missing javadoc suggestion

* Changed api a bit so that it fires a exception if renderer not being overridden and one already exists.

* Split Implemtnation and Interface

* Forgot a license

* Added WorldRenderContext to Renderers

* Added logging

* Added missing javadocs and removed the override option.

* Removed INSTANCE

* Environmental Renderers

* Remove defunt hideClouds and hideWeather

* Pushed missing License

* Push checkstyle fixes

* remove unused

* Unwrapped the test mod sky rendering.

* Added a first attempt at javadoc.

* Forgot a blank line

* Moved Environment references out of class

* Moved Lamda functions for fog override, thick fog usage and fog color adjustment to their own interfaces and gave them proper javadoc.

* Made FabricSkyProperties private

* PURGE THE H...I mean FabricSkyPropertyBuilder and FabricSkyProperties.

- Reverted unintentional mixin changes
- Fix various typo errors that were pointed out.
- Added missing javadocs and added the ability to override.

* Forgot some pluggin in some overrides.

* Added missing javadoc suggestion

* Changed api a bit so that it fires a exception if renderer not being overridden and one already exists.

* Split Implemtnation and Interface

* Forgot a license

* Added WorldRenderContext to Renderers

* Added logging

* Added missing javadocs and removed the override option.

* Removed INSTANCE

* Fixed Issues

* Fixed formatting issue.

* completed Juuxl's suggestions and removed null check on adding skyproperties. Changed SkyProperties registering to take an Identifier. Registration turns out to be only adding new options to the "effects" entry of dimension type jsonjson.

* Forgot to reenable this.

* Just did suggested tweaks

* Changed SkyProperties to DimensionEffects

* Pushed suggestions of Haykam and apple502j

* Added missing changes from sky properties to dimension effects.

* Corrected me being inconsistent.

* Forgot to remove import.

* Impliments

https://github.com/FabricMC/fabric/pull/1727#discussion_r734988305
https://github.com/FabricMC/fabric/pull/1727#discussion_r734988265

* Implements https://github.com/FabricMC/fabric/pull/1727#discussion_r730429748

* Last minute tweak. Runnable that controls fog runs right before dimension spefific rendering is done. Based on more subtle issues discovered while working api with twilight forest.

Co-authored-by: AlphaMode <AlphaModeYT@gmail.com>

* Another wave of transfer API improvements (#1801)

* Another wave of transfer API improvements

* Cleaner implementation of FilteringStorage#...Of

* Undo colored name for water and lava variants

* Custom fluid renderers and enhanced vanilla fluid renderer customization (#1687)

* Implement custom fluid rendering

* Move custom renderers in FluidRenderer mixin and add overlay sprite support to FluidRenderHandlers

* Add vanilla-like fluid renderer. Maybe very unnecessary, might remove.

* Optimize imports

* Allow custom fluid renderers to call the default renderer. Re-add DEFAULT.

* Add interface to implement by blocks that enforces overlay texture on fluids

* Some comments

* Simplify API and remove DefaultLikeFluidRenderer

* Make simple renderer overlay texture nullable

Co-authored-by: Technici4n <13494793+Technici4n@users.noreply.github.com>

* Expand test mod

* Checkstyle and licenses

* Easy shortcut for custom colored vanilla water fluids

* Easy way to register a renderer for two (still+flowing) fluids

* Update fabric-rendering-fluids-v1/src/main/java/net/fabricmc/fabric/api/client/render/fluid/v1/FluidRenderHandlerRegistry.java

Co-authored-by: Juuxel <6596629+Juuxel@users.noreply.github.com>

* Update fabric-rendering-fluids-v1/src/main/java/net/fabricmc/fabric/mixin/client/rendering/fluid/MixinFluidRenderer.java

Co-authored-by: Juuxel <6596629+Juuxel@users.noreply.github.com>

Co-authored-by: Technici4n <13494793+Technici4n@users.noreply.github.com>
Co-authored-by: modmuss50 <modmuss50@gmail.com>
Co-authored-by: Juuxel <6596629+Juuxel@users.noreply.github.com>

* Bump versions

All of the version need to be bumped due to fabric-api-base being updated, this highlights the need for a better solution.

* Target the void world in the DimensionalRenderingTest

It's a bit too obnoxious for the overworld.

* Fix shears being the ultimate mining tool (#1809)

* Add detail about default value to MiningLevelManager jd

* Fix shears being the ultimate mining tool

In more technical terms, fix an invalid
comparison in TaggedToolsModdedBlocksToolHandler.
The code was supposed to check if the tool's
mining level was at least the block's minimum
mining level. Instead, the check succeeded
whenever the block required a tool
(min level >= 0).

* WIP fixing tool attribute api bugs

* Fix mostly everything

* Simplify to (== 0) with explanation

* A less breaking workaround for https://github.com/FabricMC/fabric/issues/1806 (#1811)

* A less breaking workaround for https://github.com/FabricMC/fabric/issues/1806

* Checkstyle

* Bump version

* Update Loom and Loader. Cleanup/improve buildscript. (#1802)

Co-authored-by: shartte <shartte@users.noreply.github.com>

* Fix missing some chunk unloads events leading to a possible memory leak. (#1820)

* Fix crash when loading resources from a UNC (windows) network share.

See: https://bugs.openjdk.java.net/browse/JDK-8178726

* Update ResourceManagerHelper.java

* Update ResourceManagerHelperImpl.java

* Update ResourceManagerHelperImpl.java

* attempt to get rid of trailing whitespace

* works

* Update the test mod

* Split TestPack to check if unnamed packs still load and display correctly

* update javadoc

* bump testmod version

* Update fabric-resource-loader-v0/src/main/java/net/fabricmc/fabric/api/resource/ResourceManagerHelper.java

Co-authored-by: LambdAurora <aurora42lambda@gmail.com>

* Use modid in description

* Add lang

Co-Authored-By: LambdAurora <email@lambdaurora.dev>

* Update fabric-resource-loader-v0/src/main/java/net/fabricmc/fabric/impl/resource/loader/ResourceManagerHelperImpl.java

Co-authored-by: Juuxel <6596629+Juuxel@users.noreply.github.com>

* Fix optional server resource loading

* small changes and adhere to checkstyle

* Remove ResourcePackProfileAccessor from mixin json

* bump pack_format

Co-authored-by: Technici4n <13494793+Technici4n@users.noreply.github.com>
Co-authored-by: BasiqueEvangelist <basiqueevangelist@yandex.ru>
Co-authored-by: modmuss50 <modmuss50@gmail.com>
Co-authored-by: Juuxel <6596629+Juuxel@users.noreply.github.com>
Co-authored-by: Waterpicker <Waterpickerenternity@gmail.com>
Co-authored-by: AlphaMode <AlphaModeYT@gmail.com>
Co-authored-by: liach <7806504+liach@users.noreply.github.com>
Co-authored-by: Shadew <11669132+FoxShadew@users.noreply.github.com>
Co-authored-by: shartte <shartte@users.noreply.github.com>
Co-authored-by: LambdAurora <aurora42lambda@gmail.com>
Co-authored-by: LambdAurora <email@lambdaurora.dev>
Co-authored-by: deirn <deirn@bai.lol>
(cherry picked from commit 2afceb2962776210c1aa231f18b62cece5831d99)
---
 .../api/resource/ResourceManagerHelper.java   |  21 ++++++++++++++
 .../loader/BuiltinModResourcePackSource.java} |  23 +++++++++------
 .../loader/ResourceManagerHelperImpl.java     |  27 +++++++++++++++---
 .../resource/loader/MinecraftServerMixin.java |   6 ++--
 .../fabric-resource-loader-v0/lang/en_us.json |   5 ++--
 .../fabric-resource-loader-v0/lang/fr_ca.json |   3 ++
 .../fabric-resource-loader-v0/lang/fr_fr.json |   3 ++
 .../fabric-resource-loader-v0.mixins.json     |   1 -
 .../loader/BuiltinResourcePackTestMod.java    |   4 +++
 .../resources/resourcepacks/test/pack.mcmeta  |   2 +-
 .../data/minecraft/tags/blocks/climbable.json |   0
 .../resources/resourcepacks/test2/pack.mcmeta |   6 ++++
 .../resources/resourcepacks/test2/pack.png    | Bin 0 -> 1579 bytes
 13 files changed, 81 insertions(+), 20 deletions(-)
 rename fabric-resource-loader-v0/src/main/java/net/fabricmc/fabric/{mixin/resource/loader/ResourcePackProfileAccessor.java => impl/resource/loader/BuiltinModResourcePackSource.java} (57%)
 create mode 100644 fabric-resource-loader-v0/src/main/resources/assets/fabric-resource-loader-v0/lang/fr_ca.json
 create mode 100644 fabric-resource-loader-v0/src/main/resources/assets/fabric-resource-loader-v0/lang/fr_fr.json
 rename fabric-resource-loader-v0/src/testmod/resources/resourcepacks/{test => test2}/data/minecraft/tags/blocks/climbable.json (100%)
 create mode 100644 fabric-resource-loader-v0/src/testmod/resources/resourcepacks/test2/pack.mcmeta
 create mode 100644 fabric-resource-loader-v0/src/testmod/resources/resourcepacks/test2/pack.png

diff --git a/fabric-resource-loader-v0/src/main/java/net/fabricmc/fabric/api/resource/ResourceManagerHelper.java b/fabric-resource-loader-v0/src/main/java/net/fabricmc/fabric/api/resource/ResourceManagerHelper.java
index b74589da4..016aebb66 100644
--- a/fabric-resource-loader-v0/src/main/java/net/fabricmc/fabric/api/resource/ResourceManagerHelper.java
+++ b/fabric-resource-loader-v0/src/main/java/net/fabricmc/fabric/api/resource/ResourceManagerHelper.java
@@ -75,6 +75,27 @@ public interface ResourceManagerHelper {
 		return ResourceManagerHelperImpl.registerBuiltinResourcePack(id, "resourcepacks/" + id.getPath(), container, activationType);
 	}
 
+	/**
+	 * Registers a built-in resource pack.
+	 *
+	 * <p>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.
+	 *
+	 * <p>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.
+	 *
+	 * <p>The path in which the resource pack is located is in the mod JAR file under the {@code "resourcepacks/<id path>"} directory. {@code id path} being the path specified
+	 * in the identifier of this built-in resource pack.
+	 *
+	 * @param id             the identifier of the resource pack
+	 * @param container      the mod container
+	 * @param displayName    the display name of the resource pack, should include mod name for clarity
+	 * @param activationType the activation type of the resource pack
+	 * @return {@code true} if successfully registered the resource pack, else {@code false}
+	 */
+	static boolean registerBuiltinResourcePack(Identifier id, ModContainer container, String displayName, ResourcePackActivationType activationType) {
+		return ResourceManagerHelperImpl.registerBuiltinResourcePack(id, "resourcepacks/" + id.getPath(), container, displayName, activationType);
+	}
+
 	/**
 	 * Registers a built-in resource pack.
 	 *
diff --git a/fabric-resource-loader-v0/src/main/java/net/fabricmc/fabric/mixin/resource/loader/ResourcePackProfileAccessor.java b/fabric-resource-loader-v0/src/main/java/net/fabricmc/fabric/impl/resource/loader/BuiltinModResourcePackSource.java
similarity index 57%
rename from fabric-resource-loader-v0/src/main/java/net/fabricmc/fabric/mixin/resource/loader/ResourcePackProfileAccessor.java
rename to fabric-resource-loader-v0/src/main/java/net/fabricmc/fabric/impl/resource/loader/BuiltinModResourcePackSource.java
index 0c3bbf4b0..9be1b6af1 100644
--- a/fabric-resource-loader-v0/src/main/java/net/fabricmc/fabric/mixin/resource/loader/ResourcePackProfileAccessor.java
+++ b/fabric-resource-loader-v0/src/main/java/net/fabricmc/fabric/impl/resource/loader/BuiltinModResourcePackSource.java
@@ -14,16 +14,21 @@
  * limitations under the License.
  */
 
-package net.fabricmc.fabric.mixin.resource.loader;
+package net.fabricmc.fabric.impl.resource.loader;
 
-import org.spongepowered.asm.mixin.Mixin;
-import org.spongepowered.asm.mixin.gen.Accessor;
-
-import net.minecraft.resource.ResourcePackProfile;
 import net.minecraft.resource.ResourcePackSource;
+import net.minecraft.text.Text;
+import net.minecraft.util.Formatting;
 
-@Mixin(ResourcePackProfile.class)
-public interface ResourcePackProfileAccessor {
-	@Accessor("source")
-	ResourcePackSource getResourcePackSource();
+public class BuiltinModResourcePackSource implements ResourcePackSource {
+	private final String modId;
+
+	public BuiltinModResourcePackSource(String modId) {
+		this.modId = modId;
+	}
+
+	@Override
+	public Text decorate(Text packName) {
+		return Text.translatable("pack.nameAndSource", packName, Text.translatable("pack.source.builtinMod", modId)).formatted(Formatting.GRAY);
+	}
 }
diff --git a/fabric-resource-loader-v0/src/main/java/net/fabricmc/fabric/impl/resource/loader/ResourceManagerHelperImpl.java b/fabric-resource-loader-v0/src/main/java/net/fabricmc/fabric/impl/resource/loader/ResourceManagerHelperImpl.java
index 373c9266a..ad71ee975 100644
--- a/fabric-resource-loader-v0/src/main/java/net/fabricmc/fabric/impl/resource/loader/ResourceManagerHelperImpl.java
+++ b/fabric-resource-loader-v0/src/main/java/net/fabricmc/fabric/impl/resource/loader/ResourceManagerHelperImpl.java
@@ -32,7 +32,6 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 import net.minecraft.resource.ResourcePackProfile;
-import net.minecraft.resource.ResourcePackSource;
 import net.minecraft.resource.ResourceReloader;
 import net.minecraft.resource.ResourceType;
 import net.minecraft.util.Identifier;
@@ -61,13 +60,17 @@ public class ResourceManagerHelperImpl implements ResourceManagerHelper {
 	 * @param id             the identifier of the resource pack
 	 * @param subPath        the sub path in the mod resources
 	 * @param container      the mod container
+	 * @param displayName    the display name of the resource pack
 	 * @param activationType the activation type of the resource pack
 	 * @return {@code true} if successfully registered the resource pack, else {@code false}
+	 * @see ResourceManagerHelper#registerBuiltinResourcePack(Identifier, ModContainer, String, ResourcePackActivationType)
 	 * @see ResourceManagerHelper#registerBuiltinResourcePack(Identifier, ModContainer, ResourcePackActivationType)
 	 * @see ResourceManagerHelper#registerBuiltinResourcePack(Identifier, String, ModContainer, boolean)
 	 */
-	public static boolean registerBuiltinResourcePack(Identifier id, String subPath, ModContainer container, ResourcePackActivationType activationType) {
-		String name = id.getNamespace() + "/" + id.getPath();
+	public static boolean registerBuiltinResourcePack(Identifier id, String subPath, ModContainer container, String displayName, ResourcePackActivationType activationType) {
+		String separator = container.getRootPath().getFileSystem().getSeparator();
+		subPath = subPath.replace("/", separator);
+		String name = displayName;
 		ModNioResourcePack resourcePack = ModNioResourcePack.create(name, container, subPath, ResourceType.CLIENT_RESOURCES, activationType);
 		ModNioResourcePack dataPack = ModNioResourcePack.create(name, container, subPath, ResourceType.SERVER_DATA, activationType);
 		if (resourcePack == null && dataPack == null) return false;
@@ -83,6 +86,22 @@ public class ResourceManagerHelperImpl implements ResourceManagerHelper {
 		return true;
 	}
 
+	/**
+	 * Registers a built-in resource pack. Internal implementation.
+	 *
+	 * @param id             the identifier of the resource pack
+	 * @param subPath        the sub path in the mod resources
+	 * @param container      the mod container
+	 * @param activationType the activation type of the resource pack
+	 * @return {@code true} if successfully registered the resource pack, else {@code false}
+	 * @see ResourceManagerHelper#registerBuiltinResourcePack(Identifier, ModContainer, ResourcePackActivationType)
+	 * @see ResourceManagerHelper#registerBuiltinResourcePack(Identifier, ModContainer, String, ResourcePackActivationType)
+	 * @see ResourceManagerHelper#registerBuiltinResourcePack(Identifier, String, ModContainer, boolean)
+	 */
+	public static boolean registerBuiltinResourcePack(Identifier id, String subPath, ModContainer container, ResourcePackActivationType activationType) {
+		return registerBuiltinResourcePack(id, subPath, container, id.getNamespace() + "/" + id.getPath(), activationType);
+	}
+
 	public static void registerBuiltinResourcePacks(ResourceType resourceType, Consumer<ResourcePackProfile> consumer, ResourcePackProfile.Factory factory) {
 		// Loop through each registered built-in resource packs and add them if valid.
 		for (Pair<String, ModNioResourcePack> entry : builtinResourcePacks) {
@@ -93,7 +112,7 @@ public class ResourceManagerHelperImpl implements ResourceManagerHelper {
 				// Make the resource pack profile for built-in pack, should never be always enabled.
 				ResourcePackProfile profile = ResourcePackProfile.of(entry.getLeft(),
 						pack.getActivationType() == ResourcePackActivationType.ALWAYS_ENABLED,
-						entry::getRight, factory, ResourcePackProfile.InsertionPosition.TOP, ResourcePackSource.PACK_SOURCE_BUILTIN);
+						entry::getRight, factory, ResourcePackProfile.InsertionPosition.TOP, new BuiltinModResourcePackSource(pack.getFabricModMetadata().getId()));
 				if (profile != null) {
 					consumer.accept(profile);
 				}
diff --git a/fabric-resource-loader-v0/src/main/java/net/fabricmc/fabric/mixin/resource/loader/MinecraftServerMixin.java b/fabric-resource-loader-v0/src/main/java/net/fabricmc/fabric/mixin/resource/loader/MinecraftServerMixin.java
index 464340895..fc079bf43 100644
--- a/fabric-resource-loader-v0/src/main/java/net/fabricmc/fabric/mixin/resource/loader/MinecraftServerMixin.java
+++ b/fabric-resource-loader-v0/src/main/java/net/fabricmc/fabric/mixin/resource/loader/MinecraftServerMixin.java
@@ -25,9 +25,9 @@ import org.spongepowered.asm.mixin.injection.Redirect;
 import net.minecraft.resource.ResourcePack;
 import net.minecraft.resource.ResourcePackManager;
 import net.minecraft.resource.ResourcePackProfile;
-import net.minecraft.resource.ResourcePackSource;
 import net.minecraft.server.MinecraftServer;
 
+import net.fabricmc.fabric.impl.resource.loader.BuiltinModResourcePackSource;
 import net.fabricmc.fabric.impl.resource.loader.ModNioResourcePack;
 
 @Mixin(MinecraftServer.class)
@@ -43,10 +43,10 @@ public class MinecraftServerMixin {
 
 		ResourcePackProfile profile = resourcePackManager.getProfile(profileName);
 
-		if (((ResourcePackProfileAccessor) profile).getResourcePackSource() == ResourcePackSource.PACK_SOURCE_BUILTIN && !profileName.equals("vanilla")) {
+		if (profile.getSource() instanceof BuiltinModResourcePackSource) {
 			ResourcePack pack = profile.createResourcePack();
 			// Prevents automatic load for built-in data packs provided by mods.
-			return pack instanceof ModNioResourcePack && !((ModNioResourcePack) pack).getActivationType().isEnabledByDefault();
+			return pack instanceof ModNioResourcePack modPack && !modPack.getActivationType().isEnabledByDefault();
 		}
 
 		return false;
diff --git a/fabric-resource-loader-v0/src/main/resources/assets/fabric-resource-loader-v0/lang/en_us.json b/fabric-resource-loader-v0/src/main/resources/assets/fabric-resource-loader-v0/lang/en_us.json
index 3965e20c7..2d624999e 100644
--- a/fabric-resource-loader-v0/src/main/resources/assets/fabric-resource-loader-v0/lang/en_us.json
+++ b/fabric-resource-loader-v0/src/main/resources/assets/fabric-resource-loader-v0/lang/en_us.json
@@ -1,3 +1,4 @@
 {
-  "pack.source.fabricmod": "Fabric mod"
-}
\ No newline at end of file
+  "pack.source.fabricmod": "Fabric mod",
+  "pack.source.builtinMod": "built-in: %s"
+}
diff --git a/fabric-resource-loader-v0/src/main/resources/assets/fabric-resource-loader-v0/lang/fr_ca.json b/fabric-resource-loader-v0/src/main/resources/assets/fabric-resource-loader-v0/lang/fr_ca.json
new file mode 100644
index 000000000..fa9cf1956
--- /dev/null
+++ b/fabric-resource-loader-v0/src/main/resources/assets/fabric-resource-loader-v0/lang/fr_ca.json
@@ -0,0 +1,3 @@
+{
+  "pack.source.builtinMod": "intégré: %s"
+}
diff --git a/fabric-resource-loader-v0/src/main/resources/assets/fabric-resource-loader-v0/lang/fr_fr.json b/fabric-resource-loader-v0/src/main/resources/assets/fabric-resource-loader-v0/lang/fr_fr.json
new file mode 100644
index 000000000..fa9cf1956
--- /dev/null
+++ b/fabric-resource-loader-v0/src/main/resources/assets/fabric-resource-loader-v0/lang/fr_fr.json
@@ -0,0 +1,3 @@
+{
+  "pack.source.builtinMod": "intégré: %s"
+}
diff --git a/fabric-resource-loader-v0/src/main/resources/fabric-resource-loader-v0.mixins.json b/fabric-resource-loader-v0/src/main/resources/fabric-resource-loader-v0.mixins.json
index 77222b848..feff26275 100644
--- a/fabric-resource-loader-v0/src/main/resources/fabric-resource-loader-v0.mixins.json
+++ b/fabric-resource-loader-v0/src/main/resources/fabric-resource-loader-v0.mixins.json
@@ -13,7 +13,6 @@
     "ReloadableResourceManagerImplMixin",
     "ResourcePackManagerMixin",
     "ResourcePackManagerAccessor",
-    "ResourcePackProfileAccessor",
     "SimpleResourceReloadMixin"
   ],
   "client": [
diff --git a/fabric-resource-loader-v0/src/testmod/java/net/fabricmc/fabric/test/resource/loader/BuiltinResourcePackTestMod.java b/fabric-resource-loader-v0/src/testmod/java/net/fabricmc/fabric/test/resource/loader/BuiltinResourcePackTestMod.java
index 42758e7d8..40481fc6e 100644
--- a/fabric-resource-loader-v0/src/testmod/java/net/fabricmc/fabric/test/resource/loader/BuiltinResourcePackTestMod.java
+++ b/fabric-resource-loader-v0/src/testmod/java/net/fabricmc/fabric/test/resource/loader/BuiltinResourcePackTestMod.java
@@ -36,6 +36,10 @@ public class BuiltinResourcePackTestMod implements ModInitializer {
 		// Should always be present as it's **this** mod.
 		FabricLoader.getInstance().getModContainer(MODID)
 				.map(container -> ResourceManagerHelper.registerBuiltinResourcePack(new Identifier(MODID, "test"),
+						container, "Fabric Resource Loader Test Pack", ResourcePackActivationType.NORMAL))
+				.filter(success -> !success).ifPresent(success -> LOGGER.warn("Could not register built-in resource pack with custom name."));
+		FabricLoader.getInstance().getModContainer(MODID)
+				.map(container -> ResourceManagerHelper.registerBuiltinResourcePack(new Identifier(MODID, "test2"),
 						container, ResourcePackActivationType.NORMAL))
 				.filter(success -> !success).ifPresent(success -> LOGGER.warn("Could not register built-in resource pack."));
 	}
diff --git a/fabric-resource-loader-v0/src/testmod/resources/resourcepacks/test/pack.mcmeta b/fabric-resource-loader-v0/src/testmod/resources/resourcepacks/test/pack.mcmeta
index ce1669837..0c7c189d3 100644
--- a/fabric-resource-loader-v0/src/testmod/resources/resourcepacks/test/pack.mcmeta
+++ b/fabric-resource-loader-v0/src/testmod/resources/resourcepacks/test/pack.mcmeta
@@ -1,6 +1,6 @@
 {
   "pack": {
-    "pack_format": 7,
+    "pack_format": 8,
     "description": "Fabric Resource Loader Test Builtin Pack."
   }
 }
diff --git a/fabric-resource-loader-v0/src/testmod/resources/resourcepacks/test/data/minecraft/tags/blocks/climbable.json b/fabric-resource-loader-v0/src/testmod/resources/resourcepacks/test2/data/minecraft/tags/blocks/climbable.json
similarity index 100%
rename from fabric-resource-loader-v0/src/testmod/resources/resourcepacks/test/data/minecraft/tags/blocks/climbable.json
rename to fabric-resource-loader-v0/src/testmod/resources/resourcepacks/test2/data/minecraft/tags/blocks/climbable.json
diff --git a/fabric-resource-loader-v0/src/testmod/resources/resourcepacks/test2/pack.mcmeta b/fabric-resource-loader-v0/src/testmod/resources/resourcepacks/test2/pack.mcmeta
new file mode 100644
index 000000000..6d1f6996f
--- /dev/null
+++ b/fabric-resource-loader-v0/src/testmod/resources/resourcepacks/test2/pack.mcmeta
@@ -0,0 +1,6 @@
+{
+  "pack": {
+    "pack_format": 9,
+    "description": "Fabric Resource Loader Test Builtin Pack."
+  }
+}
diff --git a/fabric-resource-loader-v0/src/testmod/resources/resourcepacks/test2/pack.png b/fabric-resource-loader-v0/src/testmod/resources/resourcepacks/test2/pack.png
new file mode 100644
index 0000000000000000000000000000000000000000..2931efbf610873c0084debb8690902b0103d27fe
GIT binary patch
literal 1579
zcmbVMTWB0r7@iGm)TAXsYw<=rnU=;v=W=GRbL=!tc4Brl6GO7t2vVJ$IlDV#XU;e?
z+r2ymsZdMQqAyaFLLUo;RumtE8Z@?uf_*4nP^4;o6fOFoSkN<j8Kcx&2hN<!|DEr@
zod5ryo}Zi9I&|j{!!TP5d3Ax#ARIRj(!bws|3s%--25Xx!whc=M~pe~^6d;0zuPJ<
z1xwm2GKkIVCMjXQX}c87F#9H&u5K*j0F-dWauoLax87!fWh(5!lqPC!4p*&w+rx|P
zxuVftHe{2X*bnwK5hbv3po6Aeb9~fP*bXnE>+o1$K?f2nE9_*b5G-l)AV)k5Qhb^-
zU{V4ZnTKgnmXdpcB*Kg!W(1hvM2N&RO30x1u~eI9meGQGe@_?PDQq<eTqFpMMuTr8
zc;ZzAD9f@SN`fSD6v6o|C(xUm<L~S<sMt3=%MC2zfRIryk$Rx8)Y7gCwj0qpelJWk
zU_w)O1;~q`OC6wTL^!wZ)jG;eL%=m`V<+$_7DiaNN&@0n$=^^%;y)>%q1CiV$8~M7
z?MQ_mOdqCh^a65Sv|ntwSXjV5se1;VK1|Kr8G7TQoQL&*ctt{L{fC<Gn+$Tf@L{sx
z-h-B7l7_!$(;ckp0an;h&OwQT=^{*{R1(1qCuWf-cA*+Et#T`Z%AA<tq-;@w6o-;o
zy8Q!6v&Pf|{a?YRfy%_Qb?UQa>lG}xPK5<gBvFpkh({Gu>k^yK3%T69N6J=>3jBqc
zDNvZsrJ<Zoa}p0b=4u)$IDViz1}>-yOXI^^mWf1cmY^XST)CVzIGjvEPENowmy}ax
zvJ8_(Cf#+H-dBlH53`_u-~6BVAMz|(g?jCVdBWNZ(+A}(pFV7>S3QgPiQcMaflkIC
z-3Ti|VT~{au*vq0ts9O&m$p&Gl=L6+q6_m$IcVq}o~+Pl{g>1esQp4%wp~|*zk1n`
zZ7T6Toc4`y88s}riCP|ZXrJ?FLz@^KTcyqLje<H^TzdE0PhK5b5x2)LE6;s)`N3ZX
z2Cv?+vFqVy1|k2_cl$rw7=Ck$@N2wL$?9VEp7Gi35A3;$)g3FR_g;G8x7eAVQRC>y
zu95Yz%F&S{<0~f)Iomek?+hQ%MhCu%T^zsg>C_L`1`Br`xNY&))k9yTQb$JC>)w_f
zpU<A$%?N8BFlS$R^rq&-d+#&n&pq`bxOC;qliz$4TRVRI>(^tu^Q)y%W~lVz`jz;_
jF?g&s@Y=Qe&c#kW|JbvqK0Y=Rw)4XDoVqsk_>;c_`@;F@

literal 0
HcmV?d00001