Description
# š Ray's Dynamic Lighting & Offhand Torch
> Realistic Dynamic Lighting for Minecraft Bedrock Edition with Automatic Offhand Torch Support.
---
## š Overview
**Ray's Dynamic Lighting & Offhand Torch** is a lightweight, high-performance Minecraft Bedrock Behavior Pack that brings immersive real-time lighting to your survival adventures.
Explore caves, mines, and the night with dynamic illumination from torches, lanterns, glowstone, and many other light-emitting items. The addon automatically equips supported light sources into your offhand, allowing you to continue mining or fighting while keeping your surroundings illuminated.
Designed to feel like a vanilla Minecraft feature while remaining highly optimized, multiplayer-friendly, and requiring **no experimental gameplay**.
---
# ⨠Features
## š¦ Real-Time Dynamic Lighting
Light sources emit realistic dynamic lighting while held in the player's hand or offhand.
### Supported Sources
- Torch
- Soul Torch
- Lantern
- Soul Lantern
- Glowstone
- Sea Lantern
- Campfire
- End Rod
- Beacon
- Jack o'Lantern
- Shroomlight
- Froglight
- Redstone Torch
- Redstone Block
- Amethyst Cluster
- Sea Pickle
- Magma Block
- Blaze Rod
- Glow Berries
- And many more...
---
## š® Automatic Offhand Torch
Using a supported light source automatically equips it into the offhand, allowing players to:
- Mine with a Pickaxe
- Fight with a Sword
- Build normally
- Explore caves safely
without manually switching items.
---
## š„· Sneak-to-Place
While sneaking, any supported light source held in the offhand can be placed directly into the world.
The addon verifies successful placement before removing the item, preventing accidental item loss.
---
## š Dropped Item Lighting
Dropped light-emitting items continue producing light while on the ground.
Perfect for:
- Cave exploration
- Base decoration
- Adventure maps
- Multiplayer survival
---
## š· Miner Helmet Support
Custom helmets tagged with:
```
ray:miner_helmet
```
automatically emit maximum brightness while worn.
---
## ā” Performance Optimized
The addon has been designed for smooth gameplay.
Optimizations include:
- Active light caching
- Smart light updates
- Dynamic property indexing
- Minimal block updates
- Automatic cleanup
- Multiplayer optimization
No unnecessary world scans or permanent blocks are created.
---
# š® Compatibility
Minecraft Bedrock Edition
**Minimum Version**
```
1.26.30
```
Script API
```
@minecraft/server 2.8.0
```
No experimental gameplay features are required.
---
# š¦ Installation
1. Import the `.mcpack` into Minecraft Bedrock Edition.
2. Activate the Behavior Pack in your world.
3. Ensure Script API is available (stable API).
4. Start your adventure.
---
# š§© Project Structure
```
offhand_torch_bp/
āāā manifest.json
āāā README.md
āāā pack_icon.png
āāā scripts/
āāā main.js
āāā dynamicLighting.js
āāā offhandSwap.js
āāā sneakPlace.js
āāā lightLevels.js
```
---
# š§ Technical Highlights
- Dynamic light generated using invisible `minecraft:light_block`.
- Automatic cleanup prevents leftover light blocks.
- Multiple light levels (3–15) based on item brightness.
- Optimized update engine minimizes block changes.
- Dynamic property tracking improves performance.
- Supports player-held, offhand-held, helmet, and dropped light sources.
---
# š Fixed Issues
- Fixed offhand item deletion.
- Fixed failed offhand writes caused by Bedrock's offhand restrictions.
- Fixed sneak-place consuming unsupported items.
- Fixed unnecessary light block updates.
- Fixed global light cleanup on player leave.
- Optimized active light tracking.
- Improved multiplayer stability.
---
# š Performance
ā Lightweight
ā Multiplayer Friendly
ā Survival Friendly
ā Stable Script API
ā Optimized Tick Updates
ā Automatic Memory Cleanup
---
# šØš» Developer
**Chriz**
Discord Username
```
chriz__3656
```
GitHub
Community
Discord Server
---
# ā¤ļø Credits
Created and maintained by **Chriz**.
Special thanks to the Minecraft Bedrock scripting community and everyone who tested the addon and provided valuable feedback during development.
---
# š Version
## v1.0.0
### Initial Release
### Features
- Dynamic Lighting
- Automatic Offhand Torch
- Sneak-to-Place
- Dropped Item Lighting
- Miner Helmet Support
- Multiple Light Levels
- Multiplayer Compatibility
- Performance Optimizations
- Stability Improvements
---
ā Thank you for downloading **Ray's Dynamic Lighting & Offhand Torch**!
If you enjoy this addon, consider supporting the project by sharing it with your friends and joining the SKY REALM community.
Happy Mining! āļøš„




