Can I use the {Invisible} tag on an item frame?
I want to make a floating item, and the best way I could think of was to make an invulnerable invisible item frame. I tried this command:
/summon minecraft:item_frame ~ ~ ~ {Item:{id:diamond,Count:1},Invisible:1,Invulnerable:1}
It did summon an item frame but I could see it and the item. What happened?
As Skylinerw said, item frames cannot be made invisible.
However, you just want to make a floating item. You can summon an item that won't despawn which players can't pick up. On top of that, you can use the NoGravity
tag which will allow the item to float in mid-air. Combining these 3 abilities, you can summon the item using this command:
/summon item ~ ~ ~ {Item:{id:stone,Count:1},Age:-32768,PickupDelay:32767,NoGravity:1}
If you do not like that the item is spinning around, you can use a second method where an invisible armor stand has the item in his head slot using this command:
/summon armor_stand ~ ~ ~ {Invisible:1,NoGravity:1,Marker:1,ArmorItems:[{},{},{},{id:stone,Count:1b}]}
The Invisible
tag is specifically for armor stands. Item frames cannot be made invisible.
You can find a list of NBT data here, which tells you which tags belong to what entities.