While messing around with spawners, I was messing around with the tags for SpawnPotentials and SpawnData. While messing with them, I stumbled upon a weird combination that led to my game crashing. After investigating it further, I found that there were only certain conditions that this crash occurred.
For ease of investigation and to recreation of my results, I have compiled some of my results and tests into a structure that's formed from a structure block. First, download the .nbt file for the structure and from the world folder, put it in the <World Name>/generated/minecraft/structures folder. Then go into the world and run the command below in the command block.
give @p minecraft:structure_block{BlockEntityTag:{metadata:"",mirror:"NONE",ignoreEntities:1b,powered:0b,seed:0L,author:"?",rotation:"NONE",posX:1,mode:"LOAD",posY:0,sizeX:9,posZ:1,integrity:1.0f,showair:0b,name:"minecraft:spawner_bug",id:"minecraft:structure_block",sizeY:5,sizeZ:9,showboundingbox:1b},display:{Lore:["(+NBT)"]}} 1
I have found that when there is a capital letter in ID of an entity in the SpawnPotentials tag, AND there is an entity with a correct ID in the SpawnData tag, the game will crash. This will happen if these conditions are set on a spawner, regardless of use of "/data merge block" or "/setblock".
To try the crash out, run this command as a player or in a command block. It will crash the game, but the world it was used in will not be corrupted. The crash works for different entities, not just the ones I used in the command. Also, because the ID just needs to contain at least one capital letter, "{Entity:{id:"cOw"}}" and "{Entity:{id:"cOW"}}" would also induce to a crash.
setblock ~ ~1 ~ spawner{SpawnPotentials:[{Entity:{id:"Cow"}}],SpawnData:{id:"chicken"}}
However, if "minecraft:" is used in the SpawnPotentials entity's ID, then the crash would not occur. For example, "{Entity:{id:"Cow"}}" is used in the command, and would induce a crash. In contrast, if "{Entity:{id:"minecraft:Cow"}}" is used, a crash will not occur and the entity will instead not register as a real one.
I have done more conditional testing with capital letters on my time, but the results can be found and tested in the structure file.
Stack trace
1.13: [^crash-2018-07-22_17.57.27-server.txt]
Time: 7/22/18 5:57 PM
Description: Exception ticking world
i: Non [a-z0-9/._-] character in path of location: minecraft:Cow
at pc.<init>(SourceFile:38)
at pc.<init>(SourceFile:43)
at ayg.a(SourceFile:37)
at axe.b(SourceFile:216)
at bjv.a(SourceFile:56)
at bjv.aa_(SourceFile:74)
at bjv.Z_(SourceFile:69)
at tj.a(SourceFile:205)
at tj.d(SourceFile:195)
at tk.c(SourceFile:101)
at tc.i_(SourceFile:220)
at net.minecraft.server.MinecraftServer.w(SourceFile:723)
at net.minecraft.server.MinecraftServer.v(SourceFile:656)
at dfx.v(SourceFile:157)
at net.minecraft.server.MinecraftServer.run(SourceFile:559)
at java.lang.Thread.run(Thread.java:745)
Linked issues
is duplicated by 1
relates to 1
Attachments
Comments 7
Same stack trace as MC-122441, but different cause
Confirmed for 18w31a
Confirmed for 18w32a
Confirmed for 18w33a
Confirmed for 1.13.1-pre1
Confirmed for 1.13.1.
Crash report?