mojira.dev
MC-112409

Test for empty slot

Testing for an empty slot does not work.

Yes, I have seen some reports saying that it is a feature suggestion, not a bug.

On the contrary, if you're telling it to find air (when there is air/nothing in the slot), it should come out as true, however it's saying that is not the case, as if there is something in that slot.

In a similar case, if you have the same item in the first 2 slots and test for {Items:[{Slot:0b,Count:1b,Damage:0s,id:"minecraft:stone"},{}]} refering to the second slot being empty, it still shows as true, even though the second slot has data in it.

Comments 1

Testing for nbt does not look at the position of the tag; your {} succeeds as there is a compound in the list (the stone blocks) and lastly, when there's nothing in a certain slot, there is no compound for it, eg whole chest filled but the first slot will just have {Items:[{Slot:1b....},....]}.

user-2a4c8

(Unassigned)

Unconfirmed

Minecraft 1.11.2

Retrieved