#untwo:proj_sys/collision_check/
#xyzのいずれかが範囲外なら0を返す(当たったら1)

###
scoreboard players set #&collsion.hit_shape.special untwo.temp.0 0
scoreboard players operation #&collsion.hit_shape.special.x untwo.temp.0 = #&collsion.decimal.x untwo.temp.0
scoreboard players operation #&collsion.hit_shape.special.y untwo.temp.0 = #&collsion.decimal.y untwo.temp.0
scoreboard players operation #&collsion.hit_shape.special.z untwo.temp.0 = #&collsion.decimal.z untwo.temp.0
execute if block ~ ~ ~ #untwo:collision/pass_through/natural/amethyst[facing=up] run scoreboard players set #&collsion.hit_shape.special untwo.temp.0 0
execute if block ~ ~ ~ #untwo:collision/pass_through/natural/amethyst[facing=north] run scoreboard players set #&collsion.hit_shape.special untwo.temp.0 1
execute if block ~ ~ ~ #untwo:collision/pass_through/natural/amethyst[facing=south] run scoreboard players set #&collsion.hit_shape.special untwo.temp.0 2
execute if block ~ ~ ~ #untwo:collision/pass_through/natural/amethyst[facing=east] run scoreboard players set #&collsion.hit_shape.special untwo.temp.0 3
execute if block ~ ~ ~ #untwo:collision/pass_through/natural/amethyst[facing=west] run scoreboard players set #&collsion.hit_shape.special untwo.temp.0 4
execute if block ~ ~ ~ #untwo:collision/pass_through/natural/amethyst[facing=down] run scoreboard players set #&collsion.hit_shape.special untwo.temp.0 5


execute if score #&collsion.hit_shape.special untwo.temp.0 matches 1 run function untwo:proj_sys/collision_check/operation/convert.nouth_south
execute if score #&collsion.hit_shape.special untwo.temp.0 matches 1..2 run scoreboard players operation #&collsion.hit_shape.special.z untwo.temp.0 >< #&collsion.hit_shape.special.y untwo.temp.0
execute if score #&collsion.hit_shape.special untwo.temp.0 matches 4 run function untwo:proj_sys/collision_check/operation/convert.east_west
execute if score #&collsion.hit_shape.special untwo.temp.0 matches 3..4 run scoreboard players operation #&collsion.hit_shape.special.x untwo.temp.0 >< #&collsion.hit_shape.special.y untwo.temp.0
execute if score #&collsion.hit_shape.special untwo.temp.0 matches 5 run function untwo:proj_sys/collision_check/operation/convert.up_down

execute if block ~ ~ ~ minecraft:small_amethyst_bud if score #&collsion.hit_shape.special.x untwo.temp.0 matches 2500..7500 if score #&collsion.hit_shape.special.y untwo.temp.0 matches 0..1875 if score #&collsion.hit_shape.special.z untwo.temp.0 matches 2500..7500 run return 1
execute if block ~ ~ ~ minecraft:medium_amethyst_bud if score #&collsion.hit_shape.special.x untwo.temp.0 matches 1875..8125 if score #&collsion.hit_shape.special.y untwo.temp.0 matches 0..2500 if score #&collsion.hit_shape.special.z untwo.temp.0 matches 1875..8125 run return 1
execute if block ~ ~ ~ minecraft:large_amethyst_bud if score #&collsion.hit_shape.special.x untwo.temp.0 matches 1875..8125 if score #&collsion.hit_shape.special.y untwo.temp.0 matches 0..3125 if score #&collsion.hit_shape.special.z untwo.temp.0 matches 1875..8125 run return 1
execute if block ~ ~ ~ minecraft:amethyst_cluster if score #&collsion.hit_shape.special.x untwo.temp.0 matches 1875..8125 if score #&collsion.hit_shape.special.y untwo.temp.0 matches 0..4375 if score #&collsion.hit_shape.special.z untwo.temp.0 matches 1875..8125 run return 1

return fail