Summon with BlockEntityTag creates "cannot drop air" error
I am trying to use this command
summon minecraft:item -282 71 74 {Item:{id:"minecraft:shulker_box{BlockEntityTag:{Items:[{Slot:0,id:oak_planks,Count:64}]}}",Count:1}}
on a spigot 1.16.4 server. I will add more items to the shulker later, however I have reduced it for readability.
When I enter the command into the console I get this error:
at net.minecraft.server.v1_16_R3.EntityTypes.a(EntityTypes.java:347) ~[spigot-1.16.4.jar:git-Spigot-37d799b-3eb7236]
at net.minecraft.server.v1_16_R3.CommandSummon.a(SourceFile:65) ~[spigot-1.16.4.jar:git-Spigot-37d799b-3eb7236]
at net.minecraft.server.v1_16_R3.CommandSummon.a(SourceFile:48) ~[spigot-1.16.4.jar:git-Spigot-37d799b-3eb7236]
at com.mojang.brigadier.CommandDispatcher.execute(CommandDispatcher.java:262) ~[spigot-1.16.4.jar:git-Spigot-37d799b-3eb7236]
at com.mojang.brigadier.CommandDispatcher.execute(CommandDispatcher.java:176) ~[spigot-1.16.4.jar:git-Spigot-37d799b-3eb7236]
at net.minecraft.server.v1_16_R3.CommandDispatcher.a(CommandDispatcher.java:182) ~[spigot-1.16.4.jar:git-Spigot-37d799b-3eb7236]
at org.bukkit.craftbukkit.v1_16_R3.command.VanillaCommandWrapper.execute(VanillaCommandWrapper.java:45) ~[spigot-1.16.4.jar:git-Spigot-37d799b-3eb7236]
at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:149) ~[spigot-1.16.4.jar:git-Spigot-37d799b-3eb7236]
at org.bukkit.craftbukkit.v1_16_R3.CraftServer.dispatchCommand(CraftServer.java:758) ~[spigot-1.16.4.jar:git-Spigot-37d799b-3eb7236]
at org.bukkit.craftbukkit.v1_16_R3.CraftServer.dispatchServerCommand(CraftServer.java:743) ~[spigot-1.16.4.jar:git-Spigot-37d799b-3eb7236]
at net.minecraft.server.v1_16_R3.DedicatedServer.handleCommandQueue(DedicatedServer.java:387) ~[spigot-1.16.4.jar:git-Spigot-37d799b-3eb7236]
at net.minecraft.server.v1_16_R3.DedicatedServer.b(DedicatedServer.java:356) ~[spigot-1.16.4.jar:git-Spigot-37d799b-3eb7236]
at net.minecraft.server.v1_16_R3.MinecraftServer.a(MinecraftServer.java:1007) ~[spigot-1.16.4.jar:git-Spigot-37d799b-3eb7236]
at net.minecraft.server.v1_16_R3.MinecraftServer.w(MinecraftServer.java:846) ~[spigot-1.16.4.jar:git-Spigot-37d799b-3eb7236]
at net.minecraft.server.v1_16_R3.MinecraftServer.lambda$0(MinecraftServer.java:164) ~[spigot-1.16.4.jar:git-Spigot-37d799b-3eb7236]
at java.lang.Thread.run(Thread.java:834) [?:?]
Caused by: java.lang.IllegalArgumentException: Cannot drop air
at com.google.common.base.Preconditions.checkArgument(Preconditions.java:122) ~[spigot-1.16.4.jar:git-Spigot-37d799b-3eb7236]
at net.minecraft.server.v1_16_R3.EntityItem.setItemStack(EntityItem.java:418) ~[spigot-1.16.4.jar:git-Spigot-37d799b-3eb7236]
at net.minecraft.server.v1_16_R3.EntityItem.loadData(EntityItem.java:321) ~[spigot-1.16.4.jar:git-Spigot-37d799b-3eb7236]
at net.minecraft.server.v1_16_R3.Entity.load(Entity.java:1611) ~[spigot-1.16.4.jar:git-Spigot-37d799b-3eb7236]
... 20 more
[05:46:33] [Server thread/INFO]: Unable to summon entity
Any help would be appreciated.
Command syntax is different from NBT format.
Wrong way:
{
id:"minecraft:shulker_box{...}"
}
Right way:
{
id:"minecraft:shulker_box",
tag: {
BlockEntityTag: {
...
}
}
}