mojira.dev
MC-120128

testforblock can't detect Items in blocks with inventories

Was trying to use testforblock to check for certain items in a dispenser but is not working as intended.

command: /testforblock ~ ~1 ~ minecraft:dispenser 1 {Items:[{Slot:0b,Count:1b,id:minecraft:stone,Damage:0s}]} => result: Data tag parsing failed: Expected '}' but got ':' at id:minecraft: <- [HERE]

command: /testforblock ~ ~-1 ~ minecraft:dispenser 1 {Items:[{Slot:0b,Count:1b,minecraft:stone,Damage:0s}]} => result: The block at X Y Z did not have required NBT keys

tested the same command in 1.11.2 and works without issue.

Attachments

Comments 1

/testforblock ~ ~-1 ~ minecraft:dispenser 1 {Items:[{Slot:0b,Count:1b,id:"minecraft:stone",Damage:0s}]}

Raymond Michael Kruse

(Unassigned)

Unconfirmed

Minecraft 1.12.1

Retrieved