I'm not exactly sure what you are looking for, but here is a way to teleport an entity to a certain block. You will need to know the location of the block (you could use datapack macros and a "for loop" to search for the location) and the block type (you could use datapack block tags to test for multiple blocks), but this is the general idea:
# Command block
/execute positioned X Y Z if block ~ ~ ~ minecraft:gold_block as @n run tp ~ ~ ~
# Macro search
$execute positioned $(X) $(Y) $(Z) if block ~ ~ ~ minecraft:gold_block as @n run tp ~ ~ ~
# Block tags
execute positioned X Y Z if block ~ ~ ~ minecraft:#your_tag as @n run tp ~ ~ ~
i'm trying to get an entity to tp to a type of block using execute command, help
Hello,
I'm not exactly sure what you are looking for, but here is a way to teleport an entity to a certain block. You will need to know the location of the block (you could use datapack macros and a "for loop" to search for the location) and the block type (you could use datapack block tags to test for multiple blocks), but this is the general idea:
Hope this helps!
-TechnoBro03