mojira.dev
MC-118417

Loot tables do not allow for spawn egg drops

I coded some custom loot tables for mobs in 1.11.2 to allow for the drop of their spawn eggs. Jumped over to 1.12 and I get a new error that does not allow for mob identification in the following line:

Original code: "tag":"{EntityTag:{id:minecraft:creeper}}"}

It gives the following error:

Expected '}' but got ':' at: {EntityTag:{id:minecraft:<--[HERE]

Attached is my .json file for a creeper to drop it's spawn egg along with it's mob head, but this error happens to all altered loot tables regarding the drop of mob eggs.

Attachments

Comments 2

This is intended (see http://minecraft.gamepedia.com/1.12, section NBT format): Just put quotes around the id

use

"tag":"{EntityTag:{id:\"minecraft:creeper\"}}"}

as said already, quotes are now required for any string/key that contains anything other than A-Za-z0-9.-+

Kyle Badskey

(Unassigned)

Unconfirmed

Minecraft 1.12

Retrieved