Skip to content

Commit

Permalink
🐛 fix(bs.view): can_see_ata function not working (#346)
Browse files Browse the repository at this point in the history
  • Loading branch information
aksiome authored Mar 2, 2025
1 parent 7f84ed8 commit ffaa007
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions docs/_templates/changelog/v3.0.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,4 @@
### `👀 bs.view`

- <abbr title="New Features">✨</abbr> **[#299](https://github.com/mcbookshelf/Bookshelf/pull/299)** - Block tag `#bs.view:can_see_through` is now properly documented.
- <abbr title="Bug Fix">🐛</abbr> **[#319](https://github.com/mcbookshelf/Bookshelf/issues/319)** - Fixed `#bs.view:can_see_ata` max distance computation.
1 change: 1 addition & 0 deletions modules/bs.view/data/bs.view/function/__load__.mcfunction
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@

forceload add -30000000 1600
execute unless entity B5-0-0-0-1 run summon minecraft:marker -30000000 0 1600 {UUID:[I;181,0,0,1],Tags:["bs.entity","bs.persistent","smithed.entity","smithed.strict"]}
execute unless entity B5-0-0-0-2 run summon minecraft:text_display -30000000 0 1600 {UUID:[I;181,0,0,2],Tags:["bs.entity","bs.persistent","smithed.entity","smithed.strict"],view_range:0f,alignment:"center"}

scoreboard objectives add bs.data dummy [{"text":"BS ","color":"dark_gray"},{"text":"Data","color":"aqua"}]
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
# ------------------------------------------------------------------------------------------------------------

kill B5-0-0-0-1
kill B5-0-0-0-2
forceload remove -30000000 1600

scoreboard objectives remove bs.data
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ data modify storage bs:ctx x set from storage bs:ctx _[0]
data modify storage bs:ctx y set from storage bs:ctx _[1]
data modify storage bs:ctx z set from storage bs:ctx _[2]
execute summon minecraft:marker run function bs.view:can_see_ata/max_distance/get_rpos with storage bs:ctx
function bs.view:can_see_ata/max_distance/compute with storage bs:ctx
execute as B5-0-0-0-2 run function bs.view:can_see_ata/max_distance/compute with storage bs:ctx

execute facing entity @s eyes run function bs.raycast:run
return run execute if score #raycast.distance bs.data matches 2147483647

0 comments on commit ffaa007

Please sign in to comment.