attribute @s block_interaction_range base set 10
#create a 3x3 grid of hitboxes in front and constantly teleport them to detect RC and LC

execute unless entity @e[type=interaction,tag=grid_hitbox_1,tag=1_gridbox] run summon item_display ~ ~ ~ {teleport_duration:0,Tags:["grid_hitbox_1","1_gridbox","gridbox"],Passengers:[{id:"minecraft:interaction",response:1b,width:1f,height:1f,Tags:["grid_hitbox_1","1_gridbox","gridbox"]}]}
execute unless entity @e[type=interaction,tag=grid_hitbox_2,tag=1_gridbox] run summon item_display ~ ~ ~ {teleport_duration:0,Tags:["grid_hitbox_2","1_gridbox","gridbox"],Passengers:[{id:"minecraft:interaction",response:1b,width:1f,height:1f,Tags:["grid_hitbox_2","1_gridbox","gridbox"]}]}
execute unless entity @e[type=interaction,tag=grid_hitbox_3,tag=1_gridbox] run summon item_display ~ ~ ~ {teleport_duration:0,Tags:["grid_hitbox_3","1_gridbox","gridbox"],Passengers:[{id:"minecraft:interaction",response:1b,width:1f,height:1f,Tags:["grid_hitbox_3","1_gridbox","gridbox"]}]}
execute unless entity @e[type=interaction,tag=grid_hitbox_4,tag=1_gridbox] run summon item_display ~ ~ ~ {teleport_duration:0,Tags:["grid_hitbox_4","1_gridbox","gridbox"],Passengers:[{id:"minecraft:interaction",response:1b,width:1f,height:1f,Tags:["grid_hitbox_4","1_gridbox","gridbox"]}]}
execute unless entity @e[type=interaction,tag=grid_hitbox_5,tag=1_gridbox] run summon item_display ~ ~ ~ {teleport_duration:0,Tags:["grid_hitbox_5","1_gridbox","gridbox"],Passengers:[{id:"minecraft:interaction",response:1b,width:1f,height:1f,Tags:["grid_hitbox_5","1_gridbox","gridbox"]}]}
execute unless entity @e[type=interaction,tag=grid_hitbox_6,tag=1_gridbox] run summon item_display ~ ~ ~ {teleport_duration:0,Tags:["grid_hitbox_6","1_gridbox","gridbox"],Passengers:[{id:"minecraft:interaction",response:1b,width:1f,height:1f,Tags:["grid_hitbox_6","1_gridbox","gridbox"]}]}
execute unless entity @e[type=interaction,tag=grid_hitbox_7,tag=1_gridbox] run summon item_display ~ ~ ~ {teleport_duration:0,Tags:["grid_hitbox_7","1_gridbox","gridbox"],Passengers:[{id:"minecraft:interaction",response:1b,width:1f,height:1f,Tags:["grid_hitbox_7","1_gridbox","gridbox"]}]}
execute unless entity @e[type=interaction,tag=grid_hitbox_8,tag=1_gridbox] run summon item_display ~ ~ ~ {teleport_duration:0,Tags:["grid_hitbox_8","1_gridbox","gridbox"],Passengers:[{id:"minecraft:interaction",response:1b,width:1f,height:1f,Tags:["grid_hitbox_8","1_gridbox","gridbox"]}]}
execute unless entity @e[type=interaction,tag=grid_hitbox_9,tag=1_gridbox] run summon item_display ~ ~ ~ {teleport_duration:0,Tags:["grid_hitbox_9","1_gridbox","gridbox"],Passengers:[{id:"minecraft:interaction",response:1b,width:1f,height:1f,Tags:["grid_hitbox_9","1_gridbox","gridbox"]}]}

execute unless entity @e[type=interaction,tag=grid_hitbox_10] run summon item_display ~ ~ ~ {teleport_duration:0,Tags:["grid_hitbox_10","1_gridbox","gridbox"],Passengers:[{id:"minecraft:interaction",response:1b,width:1f,height:1f,Tags:["grid_hitbox_10","1_gridbox","gridbox"]}]}
execute unless entity @e[type=interaction,tag=grid_hitbox_11] run summon item_display ~ ~ ~ {teleport_duration:0,Tags:["grid_hitbox_11","1_gridbox","gridbox"],Passengers:[{id:"minecraft:interaction",response:1b,width:1f,height:1f,Tags:["grid_hitbox_11","1_gridbox","gridbox"]}]}
execute unless entity @e[type=interaction,tag=grid_hitbox_12] run summon item_display ~ ~ ~ {teleport_duration:0,Tags:["grid_hitbox_12","1_gridbox","gridbox"],Passengers:[{id:"minecraft:interaction",response:1b,width:1f,height:1f,Tags:["grid_hitbox_12","1_gridbox","gridbox"]}]}
execute unless entity @e[type=interaction,tag=grid_hitbox_13] run summon item_display ~ ~ ~ {teleport_duration:0,Tags:["grid_hitbox_13","1_gridbox","gridbox"],Passengers:[{id:"minecraft:interaction",response:1b,width:1f,height:1f,Tags:["grid_hitbox_13","1_gridbox","gridbox"]}]}
execute unless entity @e[type=interaction,tag=grid_hitbox_14] run summon item_display ~ ~ ~ {teleport_duration:0,Tags:["grid_hitbox_14","1_gridbox","gridbox"],Passengers:[{id:"minecraft:interaction",response:1b,width:1f,height:1f,Tags:["grid_hitbox_14","1_gridbox","gridbox"]}]}
execute unless entity @e[type=interaction,tag=grid_hitbox_15] run summon item_display ~ ~ ~ {teleport_duration:0,Tags:["grid_hitbox_15","1_gridbox","gridbox"],Passengers:[{id:"minecraft:interaction",response:1b,width:1f,height:1f,Tags:["grid_hitbox_15","1_gridbox","gridbox"]}]}
execute unless entity @e[type=interaction,tag=grid_hitbox_16] run summon item_display ~ ~ ~ {teleport_duration:0,Tags:["grid_hitbox_16","1_gridbox","gridbox"],Passengers:[{id:"minecraft:interaction",response:1b,width:1f,height:1f,Tags:["grid_hitbox_16","1_gridbox","gridbox"]}]}
execute unless entity @e[type=interaction,tag=grid_hitbox_17] run summon item_display ~ ~ ~ {teleport_duration:0,Tags:["grid_hitbox_17","1_gridbox","gridbox"],Passengers:[{id:"minecraft:interaction",response:1b,width:1f,height:1f,Tags:["grid_hitbox_17","1_gridbox","gridbox"]}]}
execute unless entity @e[type=interaction,tag=grid_hitbox_18] run summon item_display ~ ~ ~ {teleport_duration:0,Tags:["grid_hitbox_18","1_gridbox","gridbox"],Passengers:[{id:"minecraft:interaction",response:1b,width:1f,height:1f,Tags:["grid_hitbox_18","1_gridbox","gridbox"]}]}

execute as @s anchored eyes at @s positioned ^ ^ ^-0.2 run function main:settings/holding/hitbox_tp_1