
Bookshelf Raycast Module
Cast rays to detect block and entity hits, with voxel-accurate collisions.
1,8 тыс.7обновлён 19 сент. 2026 г.
Библиотеки
Описание
Bookshelf is a Minecraft datapack library. It provides performant modules that help you create complex systems more easily.
🔦 Bookshelf Raycast Module
Cast rays to detect block and entity hits, with voxel-accurate collisions.
"Reality only reveals itself when it is illuminated by a ray of poetry."
— Georges Braque
✨ Features
- Use voxel traversal algorithm for accurate collision detection
- Detect collisions with both blocks and entities
- Execute commands at collision points
About Bookshelf
This module is part of the Bookshelf library:
🧩 Find more in the Bookshelf Organization
📦 Get the full Bookshelf Suite
Get involved
💬 Join our Discord
🛠 Learn how to contribute
Последние версии
Все версии →release
Bookshelf Raycast Module
4.2.119 сент. 2026 г.89Minecraft: 26.3datapack
Что нового
## 📦 [Bookshelf - 4.2.1](https://github.com/mcbookshelf/bookshelf/releases/tag/v4.2.1)
> **🩹 Hotfix!**
>
> *This is a hotfix for version 4.2.0.*
### `🔦 bs.raycast`
- 🐛 **[#586](https://github.com/mcbookshelf/bookshelf/issues/586)** - Prevent entity ID collisions between casts.
release
Bookshelf Raycast Module
4.2.015 сент. 2026 г.10Minecraft: 26.3datapack
Что нового
## 📦 [Bookshelf - 4.2.0](https://github.com/mcbookshelf/bookshelf/releases/tag/v4.2.0)
> **🎬 The Animation Update!**
>
> *Adds a new animation module and support for Minecraft 26.3.*
Bookshelf is now based on **Minecraft 26.3**.
- <abbr title="New Features">✨</abbr> **[#572](https://github.com/mcbookshelf/bookshelf/pull/572)** - Migrate resources to Minecraft 26.3.
release
Bookshelf Raycast Module
4.1.127 авг. 2026 г.174Minecraft: 26.2datapack
Что нового
## 📦 [Bookshelf - 4.1.1](https://github.com/mcbookshelf/bookshelf/releases/tag/v4.1.1)
> **🩹 Hotfix!**
>
> *This is a hotfix for version 4.1.0.*
release
Bookshelf Raycast Module
4.1.017 июн. 2026 г.132Minecraft: 26.2datapack
Что нового
## 📦 [Bookshelf - 4.1.0](https://github.com/mcbookshelf/bookshelf/releases/tag/v4.1.0)
> **🗂️ The Collection Update!**
>
> *Adds a new collection module and support for Minecraft 26.2.*
Bookshelf is now based on **Minecraft 26.2**.
* <abbr title="Bug Fix">🐛</abbr> **[#552](https://github.com/mcbookshelf/bookshelf/pull/552)** - Migrate to the Minecraft 26.2 predicate format.
### `🔦 bs.raycast`
- 🐛 **[#556](https://github.com/mcbookshelf/bookshelf/issues/556)** - Fixed `$raycast.prev_entry_distance` and `$raycast.prev_exit_distance` lambda score scaling.
release
Bookshelf Raycast
4.0.14 апр. 2026 г.98Minecraft: 26.1datapack
Что нового
## 📦 [Bookshelf - 4.0.1](https://github.com/mcbookshelf/bookshelf/releases/tag/v4.0.1)
> **🩹 Hotfix!**
>
> *This is a hotfix for version 4.0.0.*
release
Bookshelf Raycast
4.0.024 мар. 2026 г.19Minecraft: 26.1datapack
Что нового
## 📦 [Bookshelf - 4.0.0](https://github.com/mcbookshelf/bookshelf/releases/tag/v4.0.0)
> **🧹 The Tiny Sweep Update!**
>
> *First release for Minecraft's new date-based versioning, dropping support for previous versions.*
>
> **⚠️ BREAKING CHANGES**: This version has breaking changes!
Bookshelf is now based on **Minecraft 26.1**.
### `🔦 bs.raycast`
- <abbr title="Breaking Changes">⚠️</abbr> **[#531](https://github.com/mcbookshelf/bookshelf/pull/531)** - Removed deprecated `bs:out raycast` and `bs:lambda raycast` storage data.
- <abbr title="Breaking Changes">⚠️</abbr> **[#531](https://github.com/mcbookshelf/bookshelf/pull/531)** - Renamed `on_hit_point` callback to `on_entry_point`. Added new `on_exit_point` callback.
- <abbr title="Breaking Changes">⚠️</abbr> **[#531](https://github.com/mcbookshelf/bookshelf/pull/531)** - Renamed `$raycast.distance` to `$raycast.entry_distance`. Added `$raycast.exit_distance`.
- <abbr title="Breaking Changes">⚠️</abbr> **[#531](https://github.com/mcbookshelf/bookshelf/pull/531)** - Replaced `$raycast.pierce_distance` (delta) with `$raycast.prev_entry_distance` and `$raycast.prev_exit_distance` (absolute values). Compute deltas manually for more flexibility (e.g., `entry - prev_entry`).
- <abbr title="New Features">✨</abbr> **[#531](https://github.com/mcbookshelf/bookshelf/pull/531)** - Added `$raycast.entry_point.[x,y,z]` and `$raycast.exit_point.[x,y,z]` lambda scores for precise hit positions relative to the target.
- <abbr title="New Features">✨</abbr> **[#531](https://github.com/mcbookshelf/bookshelf/pull/531)** - Added `$raycast.targeted_block.[x,y,z]` lambda scores for targeted block coordinates.
- <abbr title="Documentation">📝</abbr> **[#531](https://github.com/mcbookshelf/bookshelf/pull/531)** - Improved documentation with comprehensive "How to use" section including examples for callbacks, filtering, piercing, and hitbox providers.
release
Bookshelf Raycast
3.2.21 февр. 2026 г.170Minecraft: 1.21.9, 1.21.10, 1.21.11datapack
Что нового
## 📦 [Bookshelf - 3.2.2](https://github.com/mcbookshelf/bookshelf/releases/tag/v3.2.2)
> **🩹 Hotfix!**
>
> *This is a hotfix for version 3.2.1.*
release
Bookshelf Raycast
3.2.112 янв. 2026 г.35Minecraft: 1.21.9, 1.21.10, 1.21.11datapack
Что нового
## 📦 [Bookshelf - 3.2.1](https://github.com/mcbookshelf/bookshelf/releases/tag/v3.2.1)
> **🩹 Hotfix!**
>
> *This is a hotfix for version 3.2.0.*
release
Bookshelf Raycast
3.2.09 дек. 2025 г.45Minecraft: 1.21.9, 1.21.10, 1.21.11datapack
Что нового
## 📦 [Bookshelf - 3.2.0](https://github.com/mcbookshelf/bookshelf/releases/tag/v3.2.0)
> **🧱 The Block Update!**
>
> *Introduces new block data and deprecates several older features in preparation for the future.*
Bookshelf is now based on **Minecraft 1.21.9-1.21.11**.
- <abbr title="New Features">✨</abbr> **[#403](https://github.com/mcbookshelf/bookshelf/issues/403)** - Added the `#bs.load:status` function to view loaded modules.
- <abbr title="Enhancements">⚡</abbr> **[#501](https://github.com/mcbookshelf/bookshelf/pull/501)** - Optimized tp commands used in macros.
- <abbr title="Enhancements">⚡</abbr> **[#501](https://github.com/mcbookshelf/bookshelf/pull/506)** - Reduce NBT writing and remove a few macros.
- <abbr title="Bug Fix">🐛</abbr> **[#501](https://github.com/mcbookshelf/bookshelf/pull/501)** - Ensure sculk sensors are not triggered when markers are killed.
### `🔦 bs.raycast`
- <abbr title="New Features">✨</abbr> **[#473](https://github.com/mcbookshelf/bookshelf/issues/473)** - Added custom block hitboxes and improved multi-layer piercing.
release
Bookshelf Raycast
3.1.130 авг. 2025 г.293Minecraft: 1.21.6, 1.21.7, 1.21.8datapack
Что нового
## 📦 [Bookshelf - 3.1.1](https://github.com/mcbookshelf/bookshelf/releases/tag/v3.1.1)
> **🩹 Hotfix Release!**
>
> *Patch release for version 3.1.0.*