Energy Flashlight

Energy Flashlight

Darkness in caves? Need to light the way forward? Use redstone as energy for your new flashlight!

von
6.7K Downloads
datapackfabricminecraftneoforgequiltequipmentgame-mechanicstechnology
Server mit dieser Mod mieten

Screenshots

Preview
Cave
Flashlight clicks
No energy
It's on!
Recipe

Über diese Mod

📖 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 can craft a flashlight or give using a function /function energy_flashlight:give/flashlight

  • The player will receive a recipe if he receives a redstone lamp or redstone dust.
  • Recipe visualization on the misode generator website: Click

Instructions for charging a flashlight will always be in the description of the flashlight at zero energy, but I'll repeat it here: the player must hold the flashlight in the main hand, the redstone dust in the off hand, sneak and use the flashlight.
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/loop

Custom 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.

🔗 Links

You can leave a comment on the PMC page!

PMC

Russian discord server of datapackers / Русский дискорд сервер датапакеров

Если вы датапакер, ищите адекватной помощи, полезных ресурсов и возможности поделиться проектами, то вам на СвинСоюз: Датапаки!
Это сервер-ответвление от изначального заброшенного сервера ZeroCaty "СвинСоюз". Сейчас мы не имеем к нему никакого отношения.

SvinSoyuz

Verfügbare Versionen

Updated for 26.2release
MC 26.2fabric, neoforge, quilt
26. Juni 2026
Updated for 26.2release
MC 26.2minecraft
25. Juni 2026
Updated for 26.2release
MC 26.2datapack
25. Juni 2026
Supports Uprelease
MC 1.21.9, 1.21.10, 1.21.11fabric, neoforge, quilt
13. Januar 2026
Supports Uprelease
MC 1.21.9, 1.21.10, 1.21.11datapack, minecraft
13. Januar 2026

Energy Flashlight auf dem Server installieren

1

Server bestellen

Bestelle einen Minecraft Java Server mit mindestens 3 GB RAM (4 GB empfohlen).

2

datapack Loader setzen

Wähle im Panel unter "Egg" den datapack-Loader und die passende Minecraft-Version (26.2).

3

Mod installieren

Öffne den Mod-Browser im Dashboard und suche nach "Energy Flashlight". Klicke "Installieren" – fertig! Alternativ: Lade die .jar via SFTP in den /mods Ordner.

Kompatibilität

Mod-Loader

datapackfabricminecraftneoforgequilt

Minecraft-Versionen

26.2, 1.21.11, 1.21.10 (+4 weitere)

Server-seitig

Erforderlich

Empfohlener RAM

4 GB(min. 3 GB)

Häufige Fragen

Energy Flashlight Server crasht beim Start – was tun?

Häufigste Ursache: falsche datapack-Version oder zu wenig RAM. Prüfe im Server-Log (latest.log), ob ein "OutOfMemoryError" oder "Mixin"-Fehler auftritt. Bei Mado Hosting: Stelle sicher, dass mindestens 3 GB RAM zugewiesen sind und der Loader zur Mod-Version passt (26.2). Über das Panel kannst du den Loader mit einem Klick wechseln.

Ist Energy Flashlight mit datapack und fabric und minecraft und neoforge und quilt kompatibel?

Energy Flashlight unterstützt offiziell datapack, fabric, minecraft, neoforge, quilt für Minecraft 26.2, 1.21.11, 1.21.10. Im Mado Dashboard werden inkompatible Loader-Kombinationen automatisch erkannt.

Server laggt mit Energy Flashlight – wie optimiere ich die Performance?

Empfohlener RAM: 4 GB (+1 GB pro 8 Spieler). Prüfe mit /spark profiler, ob Energy Flashlight den meisten Tick-Time verbraucht. Häufige Fixes: Server-View-Distance auf 8-10 reduzieren, bei Forge "performant" oder "starlight" als Zusatz-Mod installieren. Bei Mado Hosting läuft dein Server auf NVMe-SSDs mit dedizierten CPU-Kernen für minimale Latenz.

Modded Server mieten

Installiere Energy Flashlight mit nur einem Klick auf deinem Server.

Empfohlener RAM
4 GBab €5.2/Monat
Min. 3 GB | +1 GB pro 8 Spieler
Jetzt Server erstellen
1-Klick Mod Installation
NVMe SSD Speicher
DDoS-Schutz inklusive

Details

Lizenz
GNU General Public License v3.0 only
Server-seitig
Erforderlich

Unterstützte Versionen

26.21.21.111.21.101.21.91.21.81.21.71.21.6