Skip to content

Force Pack Unload - Caused by jpm structure #74

@GrandPappyJay

Description

@GrandPappyJay

I am testing across a bunch of versions at the moment, but this issue was found on 1.20.4 with RP Renames 0.9.1, EMF 2.4.1 and ETF 6.2.9. It could be present in other version as well but I haven't confirmed.

Blockbench seems to have changed the order of the content within a jpm file.

This will cause my resource pack to unload.

{
	"id": "sheep_body_sheared",
	"invertAxis": "xy",
	"translate": [0, 0, 0],
	"boxes": [
		{
			"coordinates": [-4, -6, -7, 8, 16, 6],
			"uvNorth": [34, 14, 42, 30],
			"uvEast": [28, 14, 34, 30],
			"uvSouth": [48, 14, 56, 30],
			"uvWest": [42, 14, 48, 30],
			"uvUp": [42, 14, 34, 8],
			"uvDown": [50, 8, 42, 14],
			"sizeAdd": 0.02
		}
	],
	"credit": "Made with Blockbench - GrandPappyJay",
	"textureSize": [64, 32],
	"texture": "textures/entity/sheep/sheep_fur_sheared.png"
}

But this is acceptable.

{
	"textureSize": [64, 32],
	"texture": "textures/entity/sheep/sheep_fur_sheared.png",
	"credit": "Made with Blockbench - GrandPappyJay",
	"id": "sheep_body_sheared",
	"invertAxis": "xy",
	"translate": [0, 0, 0],
	"boxes": [
		{
			"coordinates": [-4, -6, -7, 8, 16, 6],
			"uvNorth": [34, 14, 42, 30],
			"uvEast": [28, 14, 34, 30],
			"uvSouth": [48, 14, 56, 30],
			"uvWest": [42, 14, 48, 30],
			"uvUp": [42, 14, 34, 8],
			"uvDown": [50, 8, 42, 14],
			"sizeAdd": 0.02
		}
	]	
}

I think this is the relevant part of the log

[05:26:15] [Render thread/INFO]: Caught error loading resourcepacks, removing all selected resourcepacks
java.util.concurrent.CompletionException: java.lang.StringIndexOutOfBoundsException: begin 413, end -1, length 457
	at java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:315) ~[?:?]
	at java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:320) ~[?:?]
	at java.util.concurrent.CompletableFuture.biApply(CompletableFuture.java:1313) ~[?:?]
	at java.util.concurrent.CompletableFuture$BiApply.tryFire(CompletableFuture.java:1280) ~[?:?]
	at java.util.concurrent.CompletableFuture$Completion.exec(CompletableFuture.java:483) ~[?:?]
	at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373) ~[?:?]
	at java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182) ~[?:?]
	at java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655) ~[?:?]
	at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622) ~[?:?]
	at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165) ~[?:?]
Caused by: java.lang.StringIndexOutOfBoundsException: begin 413, end -1, length 457
	at java.lang.String.checkBoundsBeginEnd(String.java:4606) ~[?:?]
	at java.lang.String.substring(String.java:2709) ~[?:?]
	at com.HiWord9.RPRenames.util.config.generation.CEMParser.objToParamList(CEMParser.java:193) ~[RPRenames-1.20.4-0.9.1.jar:?]
	at com.HiWord9.RPRenames.util.config.generation.CEMParser.parseTextureSourceFile(CEMParser.java:130) ~[RPRenames-1.20.4-0.9.1.jar:?]
	at com.HiWord9.RPRenames.util.config.generation.CEMParser.parse(CEMParser.java:55) ~[RPRenames-1.20.4-0.9.1.jar:?]
	at com.HiWord9.RPRenames.util.rename.RenamesManager.updateRenames(RenamesManager.java:37) ~[RPRenames-1.20.4-0.9.1.jar:?]
	at net.minecraft.class_1088.handler$cka000$rprenames$loadRenames(class_1088.java:1543) ~[client-intermediary.jar:?]
	at net.minecraft.class_1088.<init>(class_1088.java:154) ~[client-intermediary.jar:?]
	at net.minecraft.class_1092.method_45884(class_1092.java:87) ~[client-intermediary.jar:?]
	at net.minecraft.class_1092.md9002f1$fabric-model-loading-api-v1$lambda$loadModelPluginData$0$1(class_1092.java:1079) ~[client-intermediary.jar:?]
	at java.util.concurrent.CompletableFuture.biApply(CompletableFuture.java:1311) ~[?:?]
	... 7 more

If you need I can provide a sample pack with and without the error for testing. Thank you in advance!

Metadata

Metadata

Assignees

No one assigned

    Labels

    🐢 cemCustom Entity Model🔥 bugSomething isn't working🚨 importantThis is very important and has to be solved

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions