LittleTiles

LittleTiles

12M Downloads

Summoning a Structure as an Item

tonyvranic opened this issue ยท 2 comments

commented

How would I go about summoning a structure as an item?

I'm trying to summon a structure via command blocks but can't seem to get the command right. I can extract the NBT data without any problems, but I can't seem to be able to summon it. I know that I have to insert somewhere this data;
Item:{id:"littletiles:multitiles", Count:1b}.

Let's say I would like to summon an item of this structure(It's a single bit of stone):
{tiles:[{bBox:[I;15,0,0,16,1,1],tile:{block:"minecraft:stone"}}],min:[I;15,0,0],size:[I;1,1,1],count:1,structure:{blocks:[I;],name:"StonePiece",id:"fixed"}}

Summoning a piece of white wool would look like this:
/summon minecraft:item ~ ~ ~ {Item:{id:"minecraft:wool",Count:1b,Damage:0s,tag:{display:{Name:"WhitePuzzleBlock"},CanPlaceOn:["minecraft:stone"]}},Age:1s,PickupDelay:20}

Thanks in advance

commented

Your item id is wrong. If you have the structure in a recipe, either place it and use the mouse wheel button to pick the structure or use the workbench to craft the structure item. Through that way you can get the item name. Hope that works for you.

commented

image

It's a built structure.
I have the name, and I have every NBT tag, but I don't know how I would go about forming the command, because of what ever combination I try (I am not too good with commands) I get this:
image

I get a littletiles:multitiles item that hasn't got any NBT data whatsoever.

My summon command usually goes something like this:
/summon minecraft:item ~ ~2 ~ {Item:{id:"littletiles:multitiles", Count:1b},tiles:[{bBox:[I;15,0,0,16,1,1],tile:{block:"minecraft:stone"}}],min:[I;15,0,0],size:[I;1,1,1],count:1,structure:{blocks:[I;],name:"StonePiece",id:"fixed"},Age:1s,PickupDelay:20}

Edit: nvm I managed to get it to work myself

/summon minecraft:item ~ ~2 ~ {Item:{id:"littletiles:multitiles",Count:1b,Damage:0s,tag:{tiles:[{bBox:[I;15,0,0,16,1,1],tile:{block:"minecraft:stone"}}],min:[I;15,0,0],size:[I;1,1,1],count:1,structure:{blocks:[I;],name:"StonePiece",id:"fixed"},Age:1s,PickupDelay:20}}}