Mods / lantern

Category: #Tweak
Author: OmegaHaxors
Side: Both
Created: Oct 9th 2022 at 4:00 AM
Last modified: Apr 5th 2023 at 2:57 AM
Downloads: 2031
Follow Unfollow 20

Latest file for v1.18.0-rc.2: 1-click install

Extends the range of all player-held lights with the "lightdistance" attribute with little invisible light entities.
Now with mod support, configurable distance, and colored lights support.


Hey, isn't that the "Mario is Missing" box art?
I have no idea what you're talking about.

Are you kidding?? But that's clearly Luigi...
You must be mistaken. That's Mr. Lantern.

Why is Mr. Lantern frowning?
Because he didn't install the lantern mod.

So now that mod support is a thing, how do I make my light block compatible?
Just give it the "lightdistance: 21" attribute with the value representing how far (in blocks) you want the light beam to reach.
Here's how it works internally: First it creates an orb 9 blocks away. It will then create a new light orb every 4 blocks until it reaches or surpasses the defined distance.

Do I need to be a coder or can JSON modders/patchers use this system too?
You can add the value to the "attributes" or "attributesbytype" section of your JSON.
attributes: {lightdistance: 21} Simple as.

Do I have to worry about setting the light level and color?
Nope not at all. It uses the HSV already defined in JSON.

You think Mr. Lantern is going to download the mod now?
Probably not. He's too busy looking for his lost brother.

Is there a max limit to how far lantern light can go?
There isn't any, but any past 80 becomes meaningless since entities (and their light) stop rendering that far out.

OK so if Mr. Lantern has an L on their cap because their last name is Lantern, why does his brother have an M on their cap?
Erm, so uh, so you know how Mario- actually forget Mario. It's... Lantern... Lantern. Like the super mario movie.

Sure I get that part, but that doesn't actually answer what the M on Mr. Lantern's brother's cap stands for.
You know, I don't actually have an answer for that one. I'll ask him once he finds his brother.

Version For Game version Downloads Release date Changelog Download 1-click mod install*
v2.0.5 489 Apr 5th 2023 at 2:57 AM Show Install now
v2.0.3 126 Apr 5th 2023 at 2:50 AM Show Install now
v2.0.2 465 Nov 14th 2022 at 7:22 AM Show Install now
v2.0.1 313 Oct 11th 2022 at 4:03 AM Show Install now
v2.0.0 156 Oct 11th 2022 at 3:21 AM Show Install now
v1.2.0 176 Oct 9th 2022 at 5:14 PM Show Install now
v1.1.1 151 Oct 9th 2022 at 1:53 PM Show Install now
v1.1.0 155 Oct 9th 2022 at 4:01 AM Show Install now

28 Comments (oldest first | newest first)

💬 SpookyJ, May 9th 2023 at 5:13 PM

Unfortunately seems to be busted in 1.18 RC4. The time it takes to unlight areas is super long for some reason so large areas remain lit long after you've moved the lantern somewhere else. 

💬 macoto_hino, Apr 5th 2023 at 10:10 AM


Oh my god! Thank you so much!
I'm going to have fun playing Vintage Story again!
It's an essential mod for v1.18 with the added element of exploration!

💬 OmegaHaxorsAuthor, Apr 5th 2023 at 2:50 AM

macoto_hino Nobody knows why, but the uncompiled version just magically works.

💬 macoto_hino, Mar 16th 2023 at 4:57 AM


Seriously? Another useful mod has been reduced.
It's a shame, but it can't be helped.

💬 OmegaHaxorsAuthor, Mar 15th 2023 at 11:37 PM

Sorry to say I decided to quit modding and will not be able to provide a fix.
You're free to decompile the code and make your own version which works.
I'll admit, the implimentation of this is pretty garbage and could do with a complete rework anyway.

💬 macoto_hino, Mar 15th 2023 at 1:53 PM


I'm sorry to hear that further improvement is not possible, but it can't be helped.
This mod has become a must have when doing exploration.
I tried it in v1.18.0-pre, but unfortunately I have to report that I could not use it because it seems to load the world infinitely.

💬 OmegaHaxorsAuthor, Nov 20th 2022 at 5:34 PM

Thanks for reporting, yeah sounds like my mod exposed a memory leak in the base game. Nothing I can do about it sadly.

💬 macoto_hino, Nov 20th 2022 at 2:56 PM

I used the performance-reduced version, and while previously there was a noticeable FPS drop after 30 to 40 minutes, this time the FPS drop did not occur until 3 hours.
When continuing to view a fixed point, the flickering of lights is a concern, but it is a small disadvantage compared to the advantage of being able to illuminate a pitch-black front.
I look forward to a more complete and stable version.😆

💬 OmegaHaxorsAuthor, Nov 14th 2022 at 6:27 PM

May have had something to do with it, yes. New low-lag version will especially help the Temporal Lamp

💬 l33tmaan, Nov 14th 2022 at 6:20 PM

Oh! I had suspicions that my temporal lantern's god-like beam of light was causing part of my performance issues. That thing is bonkers, man. Hopefully this helps!

💬 OmegaHaxorsAuthor, Nov 14th 2022 at 6:53 AM

Just a theory but one way of making it less hard on performance would be to spawn moving light orbs which cast out forwards of the player and increase the frequency until it looks congruent.

EDIT: Couldn't figure out how to do that, instead i'm uploading a "low lag" version with the following changes:
- Light spawn rate and life increased from 0.1s -> 1s (runs 10x slower therefore producing 10x less lights)
- Near-light distance increased from 9 ->12 and far-light distance increased from 4 -> 7 (reduces lights from 4 -> 3)

This won't fix the core problem but it will make things a little better for servers and low-performance worlds.

💬 SpearAndFang, Nov 14th 2022 at 4:52 AM

I hope something can be done to mitigate the lag.  I really want to use this mod but unfortunately it's just too overwhelming for my machine.

💬 TheNiteFox, Nov 3rd 2022 at 11:12 PM

@macoto_hino Yeah this has been happening to me, the LAg Issue that is, Ive been going thru my mods and only keeping ones that dont completely freeze my screen. Though if you are playing in 1.17 like myself there seems to be some vanilla base game bugs with fruit tree textures that occassionally cause memory leaks, saving and reloading seems to do the trick if that error pops up because its totally random x.x and its freaking annoying. I really hopedits fixed by 1.18

💬 macoto_hino, Oct 30th 2022 at 3:28 AM

Oh, I see.
I'm not sure about recompiling, and I thought the range of the lantern was just fine, but I'm going to give up using it because the FPS starts dropping 30-40 minutes after logging into the server.
By the way, is this symptom happening to you or anyone else who has installed other mods?

💬 OmegaHaxorsAuthor, Oct 29th 2022 at 11:56 PM

There is a way to lower lag but you'd need to decompile the mod then recompile it from source.
Your two options is to make the entities last longer which may cause flickering and delay on the light.
The other option is to increase the distance between each light orb which will cause the beam to become misshapen.

The only way to lower lag without code is to lower the range of lanterns, you can do this in the mod's JSON patch.

💬 macoto_hino, Oct 29th 2022 at 10:58 PM

You are saying that the entity's judgment continues to remain in the area where you pointed the lantern and shined the light, right?
Can that be mitigated by some setting?

💬 OmegaHaxorsAuthor, Oct 29th 2022 at 5:32 PM

The mod works by creating lots of little light entities with a short life span.
My guess is that the game isn't garbage-collecting them after they die?

💬 macoto_hino, Oct 29th 2022 at 3:41 PM

I think this mod, which can add directional lights in the direction the mouse cursor is pointed, is very nice.
However, when this mod is installed, it seems to cause the FPS to drop over time.
I have confirmed this symptom in multiplayer, but I am happy to report that the symptom was reset when I logged back in.

💬 l33tmaan, Oct 11th 2022 at 4:51 AM

Oh, that image helps a LOT. I'm going to install this immediately.

💬 SpearAndFang, Oct 11th 2022 at 4:43 AM

So good, thanks for this.  this is seriously one of my new must have mods.  

💬 OmegaHaxorsAuthor, Oct 11th 2022 at 3:21 AM

Thanks to SpearAndFang for helping me with this one.
Two huge updates:
1) Now supports colored lights and custom lightvalue and
2) Now works with ANY block light. That's right, ANY.

To allow your block light to use the system, simply set the attribute lightdistance: 21 in JSON, replacing 21 with your distance of choice.
The system will take the HSV value from the block so that the casted light will be the same strength and color as the original block.
The new update will come bundled with a patch which gives this attribute to the lantern, so nothing will change from your prospective.

💬 OmegaHaxorsAuthor, Oct 10th 2022 at 5:06 PM

That would be lovely. I took a few stabs at it myself but didn't have any success.
I'm just no good when it comes to client-sided code.

💬 SpearAndFang, Oct 10th 2022 at 8:16 AM

"If you find a way around this please tell me so I don't have to hard-code the light HSV."

I have found a way around that.  It requires a few changes here and there so I'd rather not post it here.  I could PM you on Discord if you like.

💬 OmegaHaxorsAuthor, Oct 9th 2022 at 5:11 PM

Courtesy of

💬 OmegaHaxorsAuthor, Oct 9th 2022 at 1:26 PM

Any way to make them not produce bubbles in water? They just use the base EntityAgent class.
EDIT: figured it out. Turns out that entityagents will produce particles when moving in water.
EDIT2: Sadly turns out all entities are hard-coded to interact with fluids, so this is impossible to fix.

Also thanks for reminding me to make them work in the offhand. They now work in the offhand.

Lamps have more range.

💬 Edel_Recke, Oct 9th 2022 at 11:50 AM


quote: "Extends the range of all player-held lights using class: "BlockLantern" with little invisible light entities."

so, - i think - every item with class "lantern" get's additionally invisible "copies", so that yoau have more light in futher range.

Quote: "Sadly does not support [...] hard-code the light HSV."

So, if you have a green/red/yellow/... lantern, you get white light copies or nothing or a bug/crash.


💬 l33tmaan, Oct 9th 2022 at 7:26 AM

My brain is small. What does this actually do? Does it just make lanterns better or something?

💬 SpearAndFang, Oct 9th 2022 at 6:59 AM

Simple but elegant solution.  Very cool!  Just an fyi, your invisible light entity blows a lot of little bubbles when it's in water.  Bonus points if you can make this lantern work when it's in your off hand.

(edit comment delete)