[Mod] Automatic Cave Lighting [cave_lighting]

Post Reply
User avatar
Hybrid Dog
Member
Posts: 2828
Joined: Thu Nov 01, 2012 12:46
GitHub: HybridDog

[Mod] Automatic Cave Lighting [cave_lighting]

by Hybrid Dog » Post

This mod adds two chatcommands to automatically light up dark places (e.g. caves) with lighting nodes such as torches. The commands are light_cave [maxlight] and auto_light_placing [maxlight].
In both cases, maxlight is the maximum light a lighting node is placed to. If you, for example, pass 0 to the chatcommand, then the lighting nodes are only placed where the light is zero.
The lighting nodes which are placed are from the currently wielded itemstack, or the stack right to it.
light_cave [maxlight] automatically lights up a whole dark region where the player looks at.
auto_light_placing [maxlight] enables a function for the player which constantly tests where the player looks at; if it is dark at a pointed position, the function makes the player automatically place the light node there.

If you want to see light values at specific positions, try the superpick mod.
The chat command tool can be used to light caves without manually writing the chat command into the chat.

Download: zip, tar.gz
github: cave_lighting

Image

If you got ideas or found bugs, please tell them to me.

How to install a mod?
Last edited by Hybrid Dog on Sun Dec 17, 2023 15:06, edited 11 times in total.

‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪

User avatar
Desour
Member
Posts: 1469
Joined: Thu Jun 19, 2014 19:49
GitHub: Desour
IRC: Desour
In-game: DS
Location: I'm scared that if this is too exact, I will be unable to use my keyboard.

Re: [Mod] cave lighting chatcommand [cave_lighting]

by Desour » Post

cool mod, but
Hybrid Dog wrote:to automatically to light up
(fixed)
Last edited by Desour on Tue Jun 16, 2015 17:11, edited 1 time in total.
he/him; Codeberg; GitHub; ContentDB; public personal TODO list; "DS" is preferred (but often too short)

User avatar
Nathan.S
Member
Posts: 1147
Joined: Wed Sep 24, 2014 17:47
GitHub: NathanSalapat
IRC: NathanS21
In-game: NathanS21
Location: Bigsby Texas
Contact:

Re: [Mod] cave lighting chatcommand [cave_lighting]

by Nathan.S » Post

Does it take torches from the players inventory?
I record Minetest videos, Mod reviews, Modding tutorials, and Lets plays.
Check out my website, and brand new Minetest Modding Course

User avatar
Hybrid Dog
Member
Posts: 2828
Joined: Thu Nov 01, 2012 12:46
GitHub: HybridDog

Re: [Mod] cave lighting chatcommand [cave_lighting]

by Hybrid Dog » Post

DS-minetest wrote:cool mod, but
Hybrid Dog wrote:to automatically to light up
fixed.
Nathan.S wrote:Does it take torches from the players inventory?
No, it depends on which light_source node you hold in hands. Currently automatically lighting a cave requires the give privilege because l think it's fairly cheaty.

‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪

User avatar
lightonflux
Member
Posts: 384
Joined: Mon Nov 11, 2013 07:22
In-game: lof
Location: Germany

Re: [Mod] cave lighting chatcommand [cave_lighting]

by lightonflux » Post

Very impressive mod.

Works flawlessly in really big caves. But it didn't work in a small cave that was 50% filled with water. But that is okay, because the mod did give some feedback (something went wrong).

BTW: does not work with meselamp block.

Just wanted to mention this two things. I don't need them fixed, but you might want to know. :)

User avatar
Hybrid Dog
Member
Posts: 2828
Joined: Thu Nov 01, 2012 12:46
GitHub: HybridDog

Re: [Mod] cave lighting chatcommand [cave_lighting]

by Hybrid Dog » Post

lightonflux wrote:Very impressive mod.

Works flawlessly in really big caves. But it didn't work in a small cave that was 50% filled with water. But that is okay, because the mod did give some feedback (something went wrong).
The something went wrong message didn't mean an error, it meant that you viewed a node with an angle < 45°, l fixed it.
Thanks for informing me about the water problem, now the light nodes are only placed onto "normal" nodes.
BTW: does not work with meselamp block.

Just wanted to mention this two things. I don't need them fixed, but you might want to know. :)
Did you get the "Something went wrong." message?
Image

ls the bobblocks mod or the version l use broken?
When the light node is placed, it becomes dark, so the mod fills every possible position with a bobblock:
Image
Attachments
screenshot_20150616_163048.png
screenshot_20150616_163048.png (615.58 KiB) Viewed 6846 times
screenshot_20150616_162833.png
screenshot_20150616_162833.png (491.17 KiB) Viewed 6846 times

‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪

User avatar
lightonflux
Member
Posts: 384
Joined: Mon Nov 11, 2013 07:22
In-game: lof
Location: Germany

Re: [Mod] cave lighting chatcommand [cave_lighting]

by lightonflux » Post

Just tested again with meselamp before updating your mod. It appears it was a user error and meselamps work fine. So i probably didn't look at the right thing.

User avatar
lightonflux
Member
Posts: 384
Joined: Mon Nov 11, 2013 07:22
In-game: lof
Location: Germany

Re: [Mod] cave lighting chatcommand [cave_lighting]

by lightonflux » Post

I just got the "cave to big" error. Would it be possible to light only a part of the cave in that case?

User avatar
Hybrid Dog
Member
Posts: 2828
Joined: Thu Nov 01, 2012 12:46
GitHub: HybridDog

Re: [Mod] cave lighting chatcommand [cave_lighting]

by Hybrid Dog » Post

lightonflux wrote:I just got the "cave to big" error. Would it be possible to light only a part of the cave in that case?
yes, it would also be possible to increase the maximum amount of nodes
l think I'll greatly increase the 20000 nodes limit. lt's actually just to avoid overfilling memory (e.g. if a bug would appear).

‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪

jurgenbv
New member
Posts: 2
Joined: Tue Jul 25, 2023 08:12
In-game: Happybleubird

Re: [Mod] Automatic Cave Lighting [cave_lighting]

by jurgenbv » Post

Hi I want to install this mod but I don't thin k I am able to. The modern days require a .jar file for a mod to be installed. This mod doesn't contain a .jar file. How do I install this mod and does it still work in modern Minecraft?

User avatar
Blockhead
Member
Posts: 1622
Joined: Wed Jul 17, 2019 10:14
GitHub: Montandalar
IRC: Blockhead256
In-game: Blockhead Blockhead256
Location: Land Down Under
Contact:

Re: [Mod] Automatic Cave Lighting [cave_lighting]

by Blockhead » Post

jurgenbv wrote:
Tue Jul 25, 2023 08:14
Hi I want to install this mod but I don't thin k I am able to. The modern days require a .jar file for a mod to be installed. This mod doesn't contain a .jar file. How do I install this mod and does it still work in modern Minecraft?
You seem lost, friend. This is forum is for Minetest, the free-as-in-freedom block game, and not related to the game Minecraft except by similarity. There are no Minecraft mods here. In case you're actually interested in trying Minetest with mods, see the wiki page Installing Mods.
/˳˳_˳˳]_[˳˳_˳˳]_[˳˳_˳˳\ Advtrains enthusiast | My map: Noah's Railyard | My Content on ContentDB ✝️♂

jurgenbv
New member
Posts: 2
Joined: Tue Jul 25, 2023 08:12
In-game: Happybleubird

Re: [Mod] Automatic Cave Lighting [cave_lighting]

by jurgenbv » Post

Blockhead wrote:
Tue Jul 25, 2023 09:15
You seem lost, friend. This is forum is for Minetest, the free-as-in-freedom block game, and not related to the game Minecraft except by similarity. There are no Minecraft mods here. In case you're actually interested in trying Minetest with mods, see the wiki page Installing Mods.
OMG I feel so stupid 😂 thanks for letting me know!

Post Reply

Who is online

Users browsing this forum: No registered users and 13 guests