
#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
scoreboard players set #&collsion.hit_shape.direction untwo.temp.0 0
execute if block ~ ~ ~ #untwo:collision/pass_through/functional/chest[facing=north] run scoreboard players set #&collsion.hit_shape.direction untwo.temp.0 1
execute if block ~ ~ ~ #untwo:collision/pass_through/functional/chest[facing=south] run scoreboard players set #&collsion.hit_shape.direction untwo.temp.0 2
execute if block ~ ~ ~ #untwo:collision/pass_through/functional/chest[facing=east] run scoreboard players set #&collsion.hit_shape.direction untwo.temp.0 3
execute if block ~ ~ ~ #untwo:collision/pass_through/functional/chest[facing=west] run scoreboard players set #&collsion.hit_shape.direction untwo.temp.0 4



execute if block ~ ~ ~ #untwo:collision/pass_through/functional/chest[type=right] run scoreboard players set #&collsion.hit_shape.special untwo.temp.0 1
execute if block ~ ~ ~ #untwo:collision/pass_through/functional/chest[type=left] run scoreboard players set #&collsion.hit_shape.special untwo.temp.0 2

execute if score #&collsion.hit_shape.special.x untwo.temp.0 matches 625..9375 if score #&collsion.hit_shape.special.y untwo.temp.0 matches 0..8750 if score #&collsion.hit_shape.special.z untwo.temp.0 matches 625..9375 run return 1
execute if score #&collsion.hit_shape.direction untwo.temp.0 matches 1 if score #&collsion.hit_shape.special untwo.temp.0 matches 1 if score #&collsion.hit_shape.special.x untwo.temp.0 matches 0..9375 if score #&collsion.hit_shape.special.y untwo.temp.0 matches 0..8750 if score #&collsion.hit_shape.special.z untwo.temp.0 matches 625..9375 run return 1
execute if score #&collsion.hit_shape.direction untwo.temp.0 matches 2 if score #&collsion.hit_shape.special untwo.temp.0 matches 2 if score #&collsion.hit_shape.special.x untwo.temp.0 matches 0..9375 if score #&collsion.hit_shape.special.y untwo.temp.0 matches 0..8750 if score #&collsion.hit_shape.special.z untwo.temp.0 matches 625..9375 run return 1
execute if score #&collsion.hit_shape.direction untwo.temp.0 matches 3 if score #&collsion.hit_shape.special untwo.temp.0 matches 1 if score #&collsion.hit_shape.special.x untwo.temp.0 matches 625..9375 if score #&collsion.hit_shape.special.y untwo.temp.0 matches 0..8750 if score #&collsion.hit_shape.special.z untwo.temp.0 matches 0..9375 run return 1
execute if score #&collsion.hit_shape.direction untwo.temp.0 matches 4 if score #&collsion.hit_shape.special untwo.temp.0 matches 2 if score #&collsion.hit_shape.special.x untwo.temp.0 matches 625..9375 if score #&collsion.hit_shape.special.y untwo.temp.0 matches 0..8750 if score #&collsion.hit_shape.special.z untwo.temp.0 matches 0..9375 run return 1
execute if score #&collsion.hit_shape.direction untwo.temp.0 matches 1 if score #&collsion.hit_shape.special untwo.temp.0 matches 2 if score #&collsion.hit_shape.special.x untwo.temp.0 matches 625..9999 if score #&collsion.hit_shape.special.y untwo.temp.0 matches 0..8750 if score #&collsion.hit_shape.special.z untwo.temp.0 matches 625..9375 run return 1
execute if score #&collsion.hit_shape.direction untwo.temp.0 matches 2 if score #&collsion.hit_shape.special untwo.temp.0 matches 1 if score #&collsion.hit_shape.special.x untwo.temp.0 matches 625..9999 if score #&collsion.hit_shape.special.y untwo.temp.0 matches 0..8750 if score #&collsion.hit_shape.special.z untwo.temp.0 matches 625..9375 run return 1
execute if score #&collsion.hit_shape.direction untwo.temp.0 matches 3 if score #&collsion.hit_shape.special untwo.temp.0 matches 2 if score #&collsion.hit_shape.special.x untwo.temp.0 matches 625..9375 if score #&collsion.hit_shape.special.y untwo.temp.0 matches 0..8750 if score #&collsion.hit_shape.special.z untwo.temp.0 matches 625..9999 run return 1
execute if score #&collsion.hit_shape.direction untwo.temp.0 matches 4 if score #&collsion.hit_shape.special untwo.temp.0 matches 1 if score #&collsion.hit_shape.special.x untwo.temp.0 matches 625..9375 if score #&collsion.hit_shape.special.y untwo.temp.0 matches 0..8750 if score #&collsion.hit_shape.special.z untwo.temp.0 matches 625..9999 run return 1
return fail



