Skip to content
This repository was archived by the owner on Jun 23, 2024. It is now read-only.
This repository was archived by the owner on Jun 23, 2024. It is now read-only.

Conflict with YetAnotherConfigLib #22

@isXander

Description

@isXander

This is an issue due to fragile path parsing code found https://github.com/gbl/CrowdinTranslate/blob/fabric_1_17/src/main/java/de/guntram/mcmod/crowdintranslate/CTResourcePack.java#L99 here.

java.lang.ArrayIndexOutOfBoundsException: Index 1 out of bounds for length 1
	at de.guntram.mcmod.crowdintranslate.CTResourcePack.fromPath(CTResourcePack.java:112)
	at java.base@17.0.10/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
	at java.base@17.0.10/java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:992)
	at java.base@17.0.10/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
	at java.base@17.0.10/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
	at java.base@17.0.10/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:921)
	at java.base@17.0.10/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
	at java.base@17.0.10/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:682)
	at de.guntram.mcmod.crowdintranslate.CTResourcePack.findResources(CTResourcePack.java:72)
	at MC//net.minecraft.resource.NamespaceResourceManager.findResources(NamespaceResourceManager.java:202)
	at MC//net.minecraft.resource.LifecycledResourceManagerImpl.findResources(LifecycledResourceManagerImpl.java:107)
	at dev.isxander.yacl3.gui.image.YACLImageReloadListener.reload(YACLImageReloadListener.java:36)
	at MC//net.minecraft.resource.SimpleResourceReload.method_18368(SimpleResourceReload.java:32)

Here is a copy of the error.

The YACL code that is causing the issue is https://github.com/isXander/YetAnotherConfigLib/blob/multiversion/dev/src/main/java/dev/isxander/yacl3/gui/image/YACLImageReloadListener.java#L37 here. Where it passes an empty string as the prefix of findResources. This is done to search through all resources.

I will be fixing this on my end, making the prefix textures, though I highly recommend making this less fragile with other mods that do this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions