• • 6/28/26 6:31 am • 2 logs
- 2.1k views • 10 today
- save_alt 268 downloads • 4 today
- Compatibility
- Minecraft 1.21
- to version
- Minecraft 26.2
- Changes include
- Advancements
- Functions
- Predicates
- Recipes
167
📖 About
This datapack adds a flashlight that casts light across the entire beam path.Important information:
- In order for light to logically pass through incomplete blocks (slabs for example), you need to install the MIDWUT(click) library datapack;
- Help with translation into other languages is welcome, currently only available: Russian, English and pre-reformation Russian.
Features:
- Using redstone dust as energy;
- Real lighting using light blocks;
- Charge reduction even if the flashlight is not in your hand;
- The flashlight shines 20 blocks ahead, covering the entire beam path.
- The player will receive a recipe if he receives a redstone lamp or redstone dust.
- Recipe visualization on the misode generator website: Click
The maximum possible charge for a flashlight is 10 redstone dusts, each redstone dust adds 6 minutes of real-time operation, as a result, the flashlight can be charged for 1 hour. If the flashlight is on, the energy is used up and the next time you pick it up, the battery status will be updated, if more than an hour has passed, the flashlight will turn off immediately. This is achieved by storing the gametime in an item, and when the player holds a flashlight, the datapack compares the saved time with the current one.
🧩 Add-ons & Technical info
Custom light beams
If you want to add custom light beam, you can do it, but first you need to know: the datapack tick function runs on a 2-tick schedule for optimization, so I added the `#energy_flashlight:tick` functions tag. You can add your own functions for the spawn light beam to this tag.Why is this necessary?
1) To optimize the light sources so that their life is handled only in this datapack;
2) To avoid bugs, the life of light sources must be processed after they are spawned and updated.
So, to spawn a light beam, you need to set its length and run the function.
The length is measured in 0.5 blocks, that is, the length of the raycast 10 is equal to (<=)5 blocks.
# The base length is 20 blocks.
scoreboard players set #raycast main_score 40
execute anchored eyes positioned ^ ^ ^ run function energy_flashlight:other/raycast/loopCustom charging item
The charging flashlight always accepts only vanilla redstone dust without any custom components, but if you add the `energy_flashlight.energy_for_flashlight:true` nbt tag to the `minecraft:custom_data` component, then this item can be used as a charger.2 Update Logs
Update 1.0.1 — Supports up to 26.2 : by Antoha256M 06/28/2026 6:31:32 amJune 28 @ 10:31 am UTC
- Supports up to 26.2.
LOAD MORE LOGS
More like this
6719010
119



Have something to say?