[Mod] lava ore generator [lava_ore_gen]

User avatar
Coder12
Member
Posts: 160
Joined: Sat Sep 30, 2017 00:15
GitHub: Coder12a
IRC: Coder12
In-game: Bob12

[Mod] lava ore generator [lava_ore_gen]

by Coder12 » Post

This mod makes the lava turn stone into ore over time. When lava comes in contact with stone it turns red hot. After a specific time it turns into ore.
License: MIT
Mod dependencies: none
Optional dependencies: none
+api
+config
+screenshot
ContentDB
Browse Code
Download
Last edited by Coder12 on Wed Jul 15, 2020 00:09, edited 20 times in total.

User avatar
cx384
Member
Posts: 502
Joined: Wed Apr 23, 2014 09:38
GitHub: cx384
IRC: cx384

Re: [Mod] Lava ore generator [lava_ore_gen]

by cx384 » Post

I have seen a mod like this on an old server about 4 years ago. So this is nothing new, but Good job!

It would be nice if the chance of each ore would depend on its ore generating rarity.
Can your read this?

User avatar
azekill_DIABLO
Member
Posts: 7497
Joined: Wed Oct 29, 2014 20:05
GitHub: azekillDIABLO
In-game: azekill_DIABLO
Location: OMICRON
Contact:

Re: [Mod] Lava ore generator [lava_ore_gen]

by azekill_DIABLO » Post

A bit overpowered no? an ore farm? could even be automated with mesecons and pipes... anyway it's nice. But it needs what cx884 said.

User avatar
Coder12
Member
Posts: 160
Joined: Sat Sep 30, 2017 00:15
GitHub: Coder12a
IRC: Coder12
In-game: Bob12

Re: [Mod] Lava ore generator [lava_ore_gen]

by Coder12 » Post

Sure thing when I have time I will make the ores generate based on how rare it is.

Chem871
Member
Posts: 957
Joined: Sat Aug 19, 2017 21:49
GitHub: Chemguy99
In-game: Chem Nyx
Location: My Basement's Attic

Re: [Mod] Lava ore generator [lava_ore_gen]

by Chem871 » Post

Could you make it work for any ore from any mod? That would make it awesome for an all-ocean world.
What is SCP-055?

User avatar
Coder12
Member
Posts: 160
Joined: Sat Sep 30, 2017 00:15
GitHub: Coder12a
IRC: Coder12
In-game: Bob12

Re: [Mod] Lava ore generator [lava_ore_gen]

by Coder12 » Post

I rewrote the code to make it work with more ore mods(if the name of the ores is right). And I added rarity. I did not test the rarity for long to see if it truly works right tho.

User avatar
Coder12
Member
Posts: 160
Joined: Sat Sep 30, 2017 00:15
GitHub: Coder12a
IRC: Coder12
In-game: Bob12

Re: [Mod] Lava ore generator [lava_ore_gen]

by Coder12 » Post

Never mind I got it work. :)
Chem871 wrote:Could you make it work for any ore from any mod? That would make it awesome for an all-ocean world.
Yep I did that it. If the ore names is like :stone_with_ or :mineral_

John_Constructor
Member
Posts: 76
Joined: Thu Jun 01, 2017 20:06
GitHub: John-Constructor
In-game: Nooberton
Location: On Minetest 24/7

Re: [Mod] Lava ore generator [lava_ore_gen]

by John_Constructor » Post

Tried the mod out in Creative, this literally gave me two Mithril ores within 50 seconds.



Image

10/10 though for the possibilities! Rarity might want to be further tested.

Hopefully this was helpful.
Attachments
QuickMithril.png
Quickest two mithril ores in the world.
(300.98 KiB) Not downloaded yet
Constructing mechs and wingless aircraft since 2016.

User avatar
Coder12
Member
Posts: 160
Joined: Sat Sep 30, 2017 00:15
GitHub: Coder12a
IRC: Coder12
In-game: Bob12

Re: [Mod] Lava ore generator [lava_ore_gen]

by Coder12 » Post

John_Constructor wrote:Tried the mod out in Creative, this literally gave me two Mithril ores within 50 seconds.



Image

10/10 though for the possibilities! Rarity might want to be further tested.

Hopefully this was helpful.
...
Thanks for pointing that out.
Okay I tested it my self and it gave me lots of Mithril.
[Update]
I change the code again. The abm now has a interval of 20 and a chance of 400, and I change the some code in the abm.
it now gives me lots of iron.

Chem871
Member
Posts: 957
Joined: Sat Aug 19, 2017 21:49
GitHub: Chemguy99
In-game: Chem Nyx
Location: My Basement's Attic

Re: [Mod] Lava ore generator [lava_ore_gen]

by Chem871 » Post

Is there a way to keep a specific ore from generating?
What is SCP-055?

User avatar
Coder12
Member
Posts: 160
Joined: Sat Sep 30, 2017 00:15
GitHub: Coder12a
IRC: Coder12
In-game: Bob12

Re: [Mod] Lava ore generator [lava_ore_gen]

by Coder12 » Post

Chem871 wrote:Is there a way to keep a specific ore from generating?
I can add a way. Would you like a ore blacklist or block ores if they are too rare? Or both?

Chem871
Member
Posts: 957
Joined: Sat Aug 19, 2017 21:49
GitHub: Chemguy99
In-game: Chem Nyx
Location: My Basement's Attic

Re: [Mod] Lava ore generator [lava_ore_gen]

by Chem871 » Post

For an all-ocean world, there's already a way to get coal and diamonds, so maybe those?
What is SCP-055?

User avatar
Coder12
Member
Posts: 160
Joined: Sat Sep 30, 2017 00:15
GitHub: Coder12a
IRC: Coder12
In-game: Bob12

Re: [Mod] Lava ore generator [lava_ore_gen]

by Coder12 » Post

Chem871 wrote:For an all-ocean world, there's already a way to get coal and diamonds, so maybe those?
you have to download again.
I added a blacklist. All you have to do is edit the init.lua file.
Just copy and paste this line of code.

Code: Select all

local blacklist = {"default:stone_with_coal","default:stone_with_diamond"}

Chem871
Member
Posts: 957
Joined: Sat Aug 19, 2017 21:49
GitHub: Chemguy99
In-game: Chem Nyx
Location: My Basement's Attic

Re: [Mod] Lava ore generator [lava_ore_gen]

by Chem871 » Post

Awesome!
What is SCP-055?

User avatar
RSLRedstonier
Member
Posts: 451
Joined: Wed May 10, 2017 21:00
GitHub: RSL-Redstonier
In-game: RSLRedstonier
Location: some were in middle earth

Re: [Mod] Lava ore generator [lava_ore_gen]

by RSLRedstonier » Post

does this use a set list(whitelist) or a ore gen table(can spawn any ore added by minetest.register_ore)?
"A programmer is just a tool which converts caffeine into code"

try out my skytest mod always being updated!
viewtopic.php?f=9&t=17568

Chem871
Member
Posts: 957
Joined: Sat Aug 19, 2017 21:49
GitHub: Chemguy99
In-game: Chem Nyx
Location: My Basement's Attic

Re: [Mod] Lava ore generator [lava_ore_gen]

by Chem871 » Post

It does it by what it starts with, (mod):stone_with_(name) and (mod):mineral_(name) are supported.
What is SCP-055?

User avatar
RSLRedstonier
Member
Posts: 451
Joined: Wed May 10, 2017 21:00
GitHub: RSL-Redstonier
In-game: RSLRedstonier
Location: some were in middle earth

Re: [Mod] Lava ore generator [lava_ore_gen]

by RSLRedstonier » Post

Chem871 wrote:It does it by what it starts with, (mod):stone_with_(name) and (mod):mineral_(name) are supported.
so its a universal stone_with_(random name of random ore random mod registers) or mineral_(random name of random ore random mod registers)
"A programmer is just a tool which converts caffeine into code"

try out my skytest mod always being updated!
viewtopic.php?f=9&t=17568

Chem871
Member
Posts: 957
Joined: Sat Aug 19, 2017 21:49
GitHub: Chemguy99
In-game: Chem Nyx
Location: My Basement's Attic

Re: [Mod] Lava ore generator [lava_ore_gen]

by Chem871 » Post

Yep.
What is SCP-055?

User avatar
RSLRedstonier
Member
Posts: 451
Joined: Wed May 10, 2017 21:00
GitHub: RSL-Redstonier
In-game: RSLRedstonier
Location: some were in middle earth

Re: [Mod] Lava ore generator [lava_ore_gen]

by RSLRedstonier » Post

Chem871 wrote:Yep.
sweet!
"A programmer is just a tool which converts caffeine into code"

try out my skytest mod always being updated!
viewtopic.php?f=9&t=17568

bell07
Member
Posts: 599
Joined: Sun Sep 04, 2016 15:15
GitHub: bell07

Re: [Mod] Lava ore generator [lava_ore_gen]

by bell07 » Post

Just for reference: In Unternull an other ore enabled lava cooling is implemented too, without usage of ABM but by direct redefinition of "default" lava cooling: https://github.com/CasimirKaPazi/untern ... t.lua#L130

Chem871
Member
Posts: 957
Joined: Sat Aug 19, 2017 21:49
GitHub: Chemguy99
In-game: Chem Nyx
Location: My Basement's Attic

Re: [Mod] Lava ore generator [lava_ore_gen]

by Chem871 » Post

Bell07, that doesn't work anymore, as soon as I updated to 0.4.16, it stopped working.
What is SCP-055?

User avatar
Coder12
Member
Posts: 160
Joined: Sat Sep 30, 2017 00:15
GitHub: Coder12a
IRC: Coder12
In-game: Bob12

Re: [Mod] Lava ore generator [lava_ore_gen]

by Coder12 » Post

Bell07 a abm is still created in the default mod pack for lava cooling. That mod just overrides the function that is used in the abm.

bell07
Member
Posts: 599
Joined: Sun Sep 04, 2016 15:15
GitHub: bell07

Re: [Mod] Lava ore generator [lava_ore_gen]

by bell07 » Post

The reason it was stopped working was https://github.com/minetest/minetest_game/issues/1761. The issue is already fixed.
About ABM's you are right. But your mod adds an second ABM in addition to the default one ;-)

By the way, I like the generic way in unternull to select ores, wrote by me ;-)

User avatar
Coder12
Member
Posts: 160
Joined: Sat Sep 30, 2017 00:15
GitHub: Coder12a
IRC: Coder12
In-game: Bob12

Re: [Mod] Lava ore generator [lava_ore_gen]

by Coder12 » Post

bell07 wrote:The reason it was stopped working was https://github.com/minetest/minetest_game/issues/1761. The issue is already fixed.
About ABM's you are right. But your mod adds an second ABM in addition to the default one ;-)
Yeah maybe I should change that.
bell07 wrote:By the way, I like the generic way in unternull to select ores, wrote by me ;-)
Cool.

User avatar
Coder12
Member
Posts: 160
Joined: Sat Sep 30, 2017 00:15
GitHub: Coder12a
IRC: Coder12
In-game: Bob12

Re: [Mod] lava ore generator [lava_ore_gen]

by Coder12 » Post

I updated this mod. I removed the ABM and made the stone turn a bit red when its next to the lava.
+ Spoiler
Attachments
screenshot_20181010_210028.png
(382.04 KiB) Not downloaded yet

Post Reply

Who is online

Users browsing this forum: No registered users and 7 guests