mojira.dev
MC-132705

Data packs fail to reload when parsing recipe with invalid character in item id

The bug

When creating a recipe with invalid characters in the item field, the game will fail to reload the data packs. It is understood that these characters should not be there, however the game should still reload the rest of the data pack.

Example: The following will cause the game to fail reloading the data packs:

"item": "minecraft:fire_charge{Enchantments:[{id:"minecraft:sharpness",lvl:1}]}"

History of this issue

Originally, this would crash the game with the following crash report.

1.13-pre5: crash-2018-07-04_16.06.19-server.txt

---- Minecraft Crash Report ----
// Would you like a cupcake?

Time: 7/4/18 4:06 PM
Description: Exception in server tick loop

i: Non [a-z0-9/._-] character in path of location: minecraft:fire_charge{Enchantments:[{id:"minecraft:sharpness",lvl:1}]}
	at ox.<init>(SourceFile:38)
	at ox.<init>(SourceFile:43)
	at auu.a(SourceFile:237)
	at auv$a.b(SourceFile:98)
	at auv$a.a(SourceFile:87)
	at aus.a(SourceFile:49)
	at auq.a(SourceFile:52)
	at vb.c(SourceFile:123)
	at vb.a(SourceFile:106)
	at net.minecraft.server.MinecraftServer.a(SourceFile:1361)
	at net.minecraft.server.MinecraftServer.a(SourceFile:355)
	at dej.a(SourceFile:82)
	at dej.d(SourceFile:132)
	at net.minecraft.server.MinecraftServer.run(SourceFile:505)
	at java.lang.Thread.run(Thread.java:745)


A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------

-- System Details --
Details:
	Minecraft Version: 1.13-pre5
	Operating System: Windows 10 (amd64) version 10.0
	Java Version: 1.8.0_91, Oracle Corporation
	Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
	Memory: 334648744 bytes (319 MB) / 674562048 bytes (643 MB) up to 2134114304 bytes (2035 MB)
	JVM Flags: 6 total; -Xmx2G -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode -XX:-UseAdaptiveSizePolicy -Xmn128M -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump
	Profiler Position: N/A (disabled)
	Player Count: 0 / 8; []
	Data Packs: vanilla, file/survivalserver (incompatible)
	Type: Integrated Server (map_client.txt)
	Is Modded: Probably not. Jar signature remains and both client + server brands are untouched.

Linked issues

Attachments

Comments 2

"item" expects an ID, not additional NBT. NBT with recipes isn't supported yet.

Edit: Though it probably shouldn't crash.

Is this still the case in the latest snapshot?

Eric Wiles

(Unassigned)

Confirmed

(Unassigned)

data-pack, recipe

Minecraft 1.13-pre6, Minecraft 1.13, 1.15.2, 20w08a

Retrieved