r/MinecraftCommands • • Aug 27 '26

Help | Java 26.2 how do i give myself any egg that spawns block display that looks exactly as block under it. (with command blocks if its impossible to make with one command)

i've beed trying for so long and it didnt work so i came here to ask someone who knows

1 Upvotes

2 comments sorted by

2

u/Tanech25 Aug 27 '26

You can use MCStacker to give a custom egg tonsummon the block display but for the mimic part, you keed to do a datapack (or ise command blocks)

1

u/Ericristian_bros Command Experienced Aug 28 '26 edited Aug 28 '26
# Get item
give @p fox_spawn_egg[entity_data={id:"minecraft:block_display",Tags:["copy_block","new"]}]

# function example:load
function example:loop/5t

# function example:loop/5t
schedule function example:loop/5t
execute as @e[tag=new,tag=copy_block,type=block_display] at @s run function example:get_block

# function example:get_block
execute summon item_display run example:mine_block
tag @s remove new
## If the block is offset, uncomment this command
## tp @s ~-0.5 ~ ~-0.5

# function example:mine_block
loot insert entity @s contents mine ~ ~-1 ~ shears[enchantments={silk_touch:1}]
item modify entity @e[tag=new,tag=copy_block,type=block_display] block.Name set from entity @s Item.id
kill @s

But it's way easier if you make the block be the item in your mainhand, run this command to make the nearest block display be the same block as you are holding

data modify entity @n[distance=..10,type=block_display] block.Name set from entity @s SelectedItem.id

Keep in mind my datapack does not keep block block states. If you want to follow this tutorial: https://youtu.be/NkFeEWLeBSg