mojira.dev
MC-121939

Functions in datapacks causing fatal error

I've been experimenting with the new datapacks in the 1.13 snapshots, and I think I've come across a bug.

When reloading functions (as you could in previous updates), you get the error:

String index out of range: -2

As far as I can tell, this error only happens for functions - not advancements, structures, or other datapack files. This does, however, happen whether the functions folder is empty, has .mcfunction files in it, or has subfolders with .mcfunction files.

If the functions are already present before entering the world, the world loading process gets stuck in the 'Loading world' stage.

As the bug might not be apparent on first load, exiting and re-loading the world (or using the /reload command) might cause it as well.

I've attached a zipped version of the datapack I'm using. Note that I'm using the unzipped version in order to get the error. I've also attached the error note from the output log, in case that helps.

Linked issues

Attachments

Comments

tryashtar

Would you mind attaching the affected data pack?

migrated

Just want to put my 2 cents in, I tested using a blank datapack (with just the pack.mcmeta, the pack folder, and a blank functions folder, nothing else), on Windows 7 and Java 1.8.0, and it does not appear to crash the game, nor does it output any "string out of index" error in the game output tab of the launcher.

Maybe it's a Mac thing, I don't know.

Update

Figures it would be the .DS_Store bug. The bug not-working for Windows kinda set that off.

migrated

Sorry about that. I've attached a zipped version of the datapack I'm using. Note that I'm using the unzipped version in order to get the error.

Also, I've attached the error from the output log, in case that helps.

Thank you both for looking at this!

tryashtar

Aha! Taking a look at the pack, I believe this is actually MC-121380

migrated

Digging through the output logs a bit more, I can see where the .ds_store file bug comes into play. Thanks again @tryashtar !

migrated

(Unassigned)

Unconfirmed

data-pack, function

Minecraft 17w45b

Retrieved