Перейти к содержимому
Mineforgian

Bookshelf Raycast Module

Cast rays in Minecraft datapacks to detect block and entity hits. Voxel-accurate collision detection with customizable callbacks.

Загрузки
1K
Подписчики
6
Обновлён
17 июня 2026 г.
Лицензия
MPL-2.0

Опубликован 6 апреля 2025 г.

Bookshelf

Bookshelf is a library datapack for Minecraft. It's modular, so mapmakers can pick only the parts they need. This helps them create complex systems more easily.

Documentation      


🔦 Bookshelf Raycast Module

Cast rays in Minecraft datapacks to detect block and entity hits. Voxel-accurate collision detection with customizable callbacks.

"Reality only reveals itself when it is illuminated by a ray of poetry."

— Georges Braque

✨ Features

  • 🎯 Precise detection: use voxel traversal algorithm for accurate collision detection
  • 🔄 Multi-target support: detect collisions with both blocks and entities
  • ⚡ Custom callbacks: execute commands at collision points

📚 Read the full documentation

📖 About Bookshelf

This module is part of the Bookshelf Library:

🧩 Find more modules in the Bookshelf organization
📦 Get the full Bookshelf Suite

🤝 Get involved

💬 Join our Discord community
🛠 Contribute via the contribution guide

Ченджлог

4.1.0Релиз26.2 · 17 июня 2026 г.

📦 Bookshelf - 4.1.0

🗂️ The Collection Update!

Adds a new collection module and support for Minecraft 26.2.

Bookshelf is now based on Minecraft 26.2.

  • 🐛 #552 - Migrate to the Minecraft 26.2 predicate format.

🔦 bs.raycast

  • 🐛 #556 - Fixed $raycast.prev_entry_distance and $raycast.prev_exit_distance lambda score scaling.
4.0.1Релиз26.1 · 4 апреля 2026 г.

📦 Bookshelf - 4.0.1

🩹 Hotfix!

This is a hotfix for version 4.0.0.

4.0.0Релиз26.1 · 24 марта 2026 г.

📦 Bookshelf - 4.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

  • ⚠️ #531 - Removed deprecated bs:out raycast and bs:lambda raycast storage data.
  • ⚠️ #531 - Renamed on_hit_point callback to on_entry_point. Added new on_exit_point callback.
  • ⚠️ #531 - Renamed $raycast.distance to $raycast.entry_distance. Added $raycast.exit_distance.
  • ⚠️ #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).
  • #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.
  • #531 - Added $raycast.targeted_block.[x,y,z] lambda scores for targeted block coordinates.
  • 📝 #531 - Improved documentation with comprehensive "How to use" section including examples for callbacks, filtering, piercing, and hitbox providers.
3.2.2Релиз1.21.9, 1.21.10, 1.21.11 · 1 февраля 2026 г.

📦 Bookshelf - 3.2.2

🩹 Hotfix!

This is a hotfix for version 3.2.1.

3.2.1Релиз1.21.9, 1.21.10, 1.21.11 · 12 января 2026 г.

📦 Bookshelf - 3.2.1

🩹 Hotfix!

This is a hotfix for version 3.2.0.

3.2.0Релиз1.21.9, 1.21.10, 1.21.11 · 9 декабря 2025 г.

📦 Bookshelf - 3.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.

  • #403 - Added the #bs.load:status function to view loaded modules.
  • #501 - Optimized tp commands used in macros.
  • #501 - Reduce NBT writing and remove a few macros.
  • 🐛 #501 - Ensure sculk sensors are not triggered when markers are killed.

🔦 bs.raycast

  • #473 - Added custom block hitboxes and improved multi-layer piercing.
3.1.1Релиз1.21.6, 1.21.7, 1.21.8 · 30 августа 2025 г.

📦 Bookshelf - 3.1.1

🩹 Hotfix Release!

Patch release for version 3.1.0.

3.1.0Релиз1.21.6, 1.21.7, 1.21.8 · 17 июля 2025 г.

📦 Bookshelf - 3.1.0

💫 The Spatial Update!

Introduces Moon and Sun position features, as well as fully customizable hitboxes that integrate across the entire Bookshelf ecosystem.

Bookshelf is now based on Minecraft 1.21.8.

🔦 bs.raycast

  • #465 - Added support for baked and custom entity hitboxes.
  • #445 - #bs.raycast:run now computes all lambda data before invoking callbacks.
  • 🐛 #457 - Fixed raycasts not stopping at the nearest hit when detecting both blocks and entities.

Комментарии

Загружаем…