I'm trying to make a camouflage skill and I want to summon two falling block entities on the player to make it look like they're just two blocks standing there instead of a player. I know how to summon falling blocks that look like a specific block, but I want to know if it's possible to summon a block equal to the block the player is standing on.
I know that the tile ID of falling blocks is stored in NBT, so this boils down to the fundamental issue:
How do you get an NBT string containing the namespaced ID of a block at a certain position, and write it to the falling blocks' NBT data?
Best Answer
This question boils down to the fundamental issue of transforming the block ID at a certain position to an NBT string. There is a clever workaround to do this:
inBlockState.Name
NBT tag which is the block the arrow is in.Prerequisites:
/forceload
command.Commands:
The function targeted by
/schedule
should contain the following command:In your case, you want to copy this data to a falling block's tile name, so instead of the
/data get
command above, use this one instead: