i´ve made a data pack for detect iron and diamon at same time in onefunction. functionaly is good,but
is there a way to switch between functions to enable or disable different ores?
spacialy to Megacrafter107 pls dont be angry for my MANY questions ;-) i love theese command and functions things xDD
How are you detecting these blocks, with an armor stand? if so, you can place all the detection commands inside one function and then set up conditions so you can skip over the ones you don't want to detect.
Here's an example, imagine this is your function file:
/execute as @e[type=armor_stand,name=detector] at @s if block ~ ~-1 ~ diamond_block run say hi
/execute as @e[type=armor_stand,name=detector] at @s if block ~ ~-1 ~ iron_block run say hi
^ so these commands would obviously run all the time and the armor stand will detect both types of blocks. One way you could disable a command is by adding conditions (such as tags) into the selector. Example:
/execute as @e[type=armor_stand,name=detector,tag=disable] at @s if block ~ ~-1 ~ diamond_block run say hi
^ now this armor stand won't detect the diamond block if it has a tag called "disable".