diff options
Diffstat (limited to 'fabric/src/main')
3 files changed, 30 insertions, 0 deletions
diff --git a/fabric/src/main/java/dev/isxander/yacl3/platform/fabric/YACLFabricEntrypoint.java b/fabric/src/main/java/dev/isxander/yacl3/platform/fabric/YACLFabricEntrypoint.java new file mode 100644 index 0000000..032f46b --- /dev/null +++ b/fabric/src/main/java/dev/isxander/yacl3/platform/fabric/YACLFabricEntrypoint.java @@ -0,0 +1,13 @@ +package dev.isxander.yacl3.platform.fabric; + +import dev.isxander.yacl3.platform.fabric.image.YACLImageReloadListenerFabric; +import net.fabricmc.api.ClientModInitializer; +import net.fabricmc.fabric.api.resource.ResourceManagerHelper; +import net.minecraft.server.packs.PackType; + +public class YACLFabricEntrypoint implements ClientModInitializer { + @Override + public void onInitializeClient() { + ResourceManagerHelper.get(PackType.CLIENT_RESOURCES).registerReloadListener(new YACLImageReloadListenerFabric()); + } +} diff --git a/fabric/src/main/java/dev/isxander/yacl3/platform/fabric/image/YACLImageReloadListenerFabric.java b/fabric/src/main/java/dev/isxander/yacl3/platform/fabric/image/YACLImageReloadListenerFabric.java new file mode 100644 index 0000000..9eed7fe --- /dev/null +++ b/fabric/src/main/java/dev/isxander/yacl3/platform/fabric/image/YACLImageReloadListenerFabric.java @@ -0,0 +1,12 @@ +package dev.isxander.yacl3.platform.fabric.image; + +import dev.isxander.yacl3.gui.image.YACLImageReloadListener; +import net.fabricmc.fabric.api.resource.IdentifiableResourceReloadListener; +import net.minecraft.resources.ResourceLocation; + +public class YACLImageReloadListenerFabric extends YACLImageReloadListener implements IdentifiableResourceReloadListener { + @Override + public ResourceLocation getFabricId() { + return new ResourceLocation("yet_another_config_lib_v3", "image_reload_listener"); + } +} diff --git a/fabric/src/main/resources/fabric.mod.json b/fabric/src/main/resources/fabric.mod.json index f2979ff..7f74e56 100644 --- a/fabric/src/main/resources/fabric.mod.json +++ b/fabric/src/main/resources/fabric.mod.json @@ -25,6 +25,11 @@ "yacl.mixins.json", "yacl-fabric.mixins.json" ], + "entrypoints": { + "client": [ + "dev.isxander.yacl3.platform.fabric.YACLFabricEntrypoint" + ] + }, "custom": { "modmenu": { "badges": ["library"] |