I want to make a scale datapack in Minecraft, however to do that I need to know which block is currently being 'scanned'. Assuming there was a /whatblock
command, I could then ideally do /execute as @e[tag=Small] store result entity @s HandItems string 1 run whatblock ~ ~ ~
Unfortunately, of course basically none of that works, both because Minecraft seems to hate string datatypes and because the /whatblock command doesn't seem to exist. I was playing with the idea of getting an Enderman to pick up the block, thus making it NBT data, but a. I don't know how to force an Enderman to do that and b. The Enderman would then need to pick up pretty much any block, including obsidian, making them extremely dangerous.
Currently, the only other option I can see is to make a giant list for every single block in Minecraft, then go If block ~ ~ ~ stone then set handitem to stone. If block ~ ~ ~ dirt then set handitem to dirt... etc
As you can imagine, for each of the 3172 blocks in the game, I'd need a line of code, which would need to run for every single block in the reference build.
As such, any alternative would be greatly appreciated.