diff --git a/data/iris/function/get_hitbox/entity.mcfunction b/data/iris/function/get_hitbox/entity.mcfunction index 4195648..4fd9110 100644 --- a/data/iris/function/get_hitbox/entity.mcfunction +++ b/data/iris/function/get_hitbox/entity.mcfunction @@ -28,6 +28,7 @@ scoreboard players operation $entity_{x} iris = ${x} iris scoreboard players operation $entity_{y} iris = ${y} iris scoreboard players operation $entity_{z} iris = ${z} iris execute at @s summon minecraft:marker run function iris:get_position/get_coordinates +kill @e[type=minecraft:marker, tag=iris.coordinate_getter] scoreboard players operation $entity_[x] iris >< $[x] iris scoreboard players operation $entity_[y] iris >< $[y] iris scoreboard players operation $entity_[z] iris >< $[z] iris diff --git a/data/iris/function/get_position/get_coordinates.mcfunction b/data/iris/function/get_position/get_coordinates.mcfunction index c3638b0..5fd5a54 100644 --- a/data/iris/function/get_position/get_coordinates.mcfunction +++ b/data/iris/function/get_position/get_coordinates.mcfunction @@ -6,6 +6,8 @@ # @within iris:get_position/main # @within iris:get_hitbox/entity +tag @s add iris.coordinate_getter + # Get integer coordinates data modify storage iris:data Pos set from entity @s Pos execute store result score $[x] iris store result storage iris:args x int -1 run data get storage iris:data Pos[0] @@ -21,4 +23,3 @@ execute store result score ${z} iris run data get storage iris:data Pos[2] 10000 # Clean up data remove storage iris:data Pos -kill @s diff --git a/data/iris/function/get_position/main.mcfunction b/data/iris/function/get_position/main.mcfunction index 4f85543..e715be2 100644 --- a/data/iris/function/get_position/main.mcfunction +++ b/data/iris/function/get_position/main.mcfunction @@ -29,3 +29,4 @@ function iris:get_position/get_coordinates function iris:get_position/get_rotation +kill @s