Skip to content

Commit

Permalink
Set distance to maximum value if nothing is hit
Browse files Browse the repository at this point in the history
  • Loading branch information
Nico314159 committed Aug 19, 2023
1 parent 5403fa0 commit a7442a9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion data/retina/functions/traverse/setup.mcfunction
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ scoreboard players operation $test_Z retina.__variable__ /= $overflow_risk retin
execute unless score $test_Z retina.__variable__ matches -1..0 run tellraw @a ["",{"text":"[Error] ","color":"dark_red"},{"text":"Raycast Z coordinate of ","color":"red"},{"score":{"name":"$int_Z","objective":"retina.__variable__"},"color":"red"},{"text":" is out of range (-","color":"red"},{"score":{"name":"$overflow_risk","objective":"retina.__variable__"},"color":"red"},{"text":", ","color":"red"},{"score":{"name":"$overflow_risk","objective":"retina.__variable__"},"color":"red"},{"text":")","color":"red"}]
execute unless score $test_Z retina.__variable__ matches -1..0 run return 0
data modify storage retina:output Target set value "NONE"
data remove storage retina:output Distance
data modify storage retina:output Distance set from storage retina:input MaxRecursionDepth
data remove storage retina:output TargetedBlock
data remove storage retina:output TargetedEntity
data remove storage retina:output PlacingPosition
Expand Down
2 changes: 1 addition & 1 deletion retina.jmc
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class traverse {
);

data modify storage retina:output Target set value "NONE";
data remove storage retina:output Distance;
data modify storage retina:output Distance set from storage retina:input MaxRecursionDepth;
data remove storage retina:output TargetedBlock;
data remove storage retina:output TargetedEntity;
data remove storage retina:output PlacingPosition;
Expand Down

0 comments on commit a7442a9

Please sign in to comment.