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

Conflict with YetAnotherConfigLib #22

Open
isXander opened this issue Apr 24, 2024 · 0 comments
Open

Conflict with YetAnotherConfigLib #22

isXander opened this issue Apr 24, 2024 · 0 comments

Comments

@isXander
Copy link

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 [email protected]/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
	at [email protected]/java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:992)
	at [email protected]/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
	at [email protected]/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
	at [email protected]/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:921)
	at [email protected]/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
	at [email protected]/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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant