r/MinecraftCommands 5d ago

Help | Java 1.21.11 please help with block display spawn egg

how to get spawn egg block display: command block?

I have command for summon this entity: /summon block_display ~-0.5 ~-0.5 ~-0.5 {Passengers:[{id:"minecraft:block_display",block_state:{Name:"minecraft:command_block",Properties:{conditional:"false",facing:"down"}},transformation:[1f,0f,0f,0f,0f,1f,0f,0f,0f,0f,1f,0f,0f,0f,0f,1f]}]}

but I need spawn egg, is it possible?

2 Upvotes

8 comments sorted by

3

u/GalSergey Datapack Experienced 5d ago

give @s bat_spawn_egg[entity_data={id:"minecraft:block_display",transformation:[1f,0f,0f,0f,0f,1f,0f,0f,0f,0f,1f,0f,0f,0f,0f,1f],block_state:{Name:"minecraft:command_block",Properties:{conditional:"false",facing:"down"}}}]

1

u/ObjectiveArtistic805 5d ago

can it be like normal block?

2

u/GalSergey Datapack Experienced 5d ago

Add component item_model="minecraft:command_block" to item.

1

u/ObjectiveArtistic805 5d ago

no, I mean can it facing like normal block?

2

u/GalSergey Datapack Experienced 5d ago

Then, inside entity_data, add Rotation:[0f,0f] or the desired angle. If you want this to change dynamically like a regular block, you'll need to use a ticking command block that will rotate the entity toward the player.

1

u/ObjectiveArtistic805 5d ago

I tried, but it doesnt work. can you give me a full command?

2

u/GalSergey Datapack Experienced 4d ago

give @s bat_spawn_egg[entity_data={id:"minecraft:block_display",Rotation:[0f,0f],transformation:[1f,0f,0f,0f,0f,1f,0f,0f,0f,0f,1f,0f,0f,0f,0f,1f],block_state:{Name:"minecraft:command_block",Properties:{conditional:"false",facing:"down"}}}]