[Mod] Mine It All [1.0] [mine_it_all]

Post Reply
echosa
Member
Posts: 107
Joined: Tue Aug 30, 2016 04:01

[Mod] Mine It All [1.0] [mine_it_all]

by echosa » Post

Mine It All is my attempt at bringing the functionality of the Minecraft mod "veinminer" to Minetest! After asking around, I learned that such a mod didn't already exist for Minetest, so here you go!

Mine It All allows you to mine entire veins of connected blocks of the same type. See a vein of coal? Simply hold `sneak` while mining one of the coal nodes, and all the coal nodes will be mined at once! Careful, though, as large nodes will quickly wear down your tools. You can also configure the mod to allow or disallow any blocks to be vein mineable as well as which tools can be used.

For more information, see the README.md file in the GitHub repository.

Download version 1.0
GitHub Source
Mod dependencies: None

Mine It All is released under the MIT license. See LICENSE.txt for more information.

User avatar
mahmutelmas06
Member
Posts: 367
Joined: Mon Mar 02, 2015 13:10
GitHub: mahmutelmas06
IRC: mahmutelmas06
In-game: masum

Re: [Mod] Mine It All [1.0] [mine_it_all]

by mahmutelmas06 » Post

That mod is what i was waiting for a long time. Thank you.
It is awesome combination with ifill mod.

Is there any way to add an option to delete any node instead of specieded one.. Because i cannot add all nodes to list. There are a houndred of them because of mods :)

for exp

Code: Select all

{
        node_name = "[b]destroy punched all same nodes[/b]",
        tools = {
            "default:pick_wood",
            "default:pick_stone",
            "default:pick_steel",
            "default:pick_bronze",
            "default:pick_mese",
            "default:pick_diamond",
},
My Mods:

Beverage

echosa
Member
Posts: 107
Joined: Tue Aug 30, 2016 04:01

Re: [Mod] Mine It All [1.0] [mine_it_all]

by echosa » Post

What is the ifill mod?

As far as adding an option to delete any node, perhaps I can implement some sort of blacklist. Not sure exactly how that would work, combined with the current whitelisting. The current whitelisting is required, because it's not just about enabling the block to be vein mined, but also defining which tools can be used to vein mine that block.

I'll give the blacklist idea some thought and see if I can come up with something.

User avatar
mahmutelmas06
Member
Posts: 367
Joined: Mon Mar 02, 2015 13:10
GitHub: mahmutelmas06
IRC: mahmutelmas06
In-game: masum

Re: [Mod] Mine It All [1.0] [mine_it_all]

by mahmutelmas06 » Post

viewtopic.php?f=9&t=5262
( There is some alternatives to this mod but i love this one )
This is the mod.

U fill whole square area with the node u place. But if you place once mistakenly there is no take back unless you are not lazy enough to delete more than 100 nodes by punching. :)
We can delete mistakenly placed nodes with your mod.
My Mods:

Beverage

echosa
Member
Posts: 107
Joined: Tue Aug 30, 2016 04:01

Re: [Mod] Mine It All [1.0] [mine_it_all]

by echosa » Post

Oh, you're talking about actually in game. Just don't be sneaking/holding shift. :-) I wanted to allow the vein mining to be set to a specific key press (in Minecraft, I have it so that I have to hold down the ` key), but I didn't see a way to do that.

So: if you want to grab just one block, don't be holding shift down (or whatever your sneak key is set to).

Does that help?

Byakuren
Member
Posts: 818
Joined: Tue Apr 14, 2015 01:59
GitHub: raymoo
IRC: Hijiri
In-game: Raymoo + Clownpiece

Re: [Mod] Mine It All [1.0] [mine_it_all]

by Byakuren » Post

Two notes:
You use the global variable mia_enabled_nodes. Convention is to just use (at most) one global variable with the name being the same as the mod, to prevent global variable collisions.

You could provide a registration function for the whitelist, allowing mods to register which nodes can be mined by what tools.
Every time a mod API is left undocumented, a koala dies.

User avatar
mahmutelmas06
Member
Posts: 367
Joined: Mon Mar 02, 2015 13:10
GitHub: mahmutelmas06
IRC: mahmutelmas06
In-game: masum

Re: [Mod] Mine It All [1.0] [mine_it_all]

by mahmutelmas06 » Post

echosa wrote:Oh, you're talking about actually in game. Just don't be sneaking/holding shift. :-) I wanted to allow the vein mining to be set to a specific key press (in Minecraft, I have it so that I have to hold down the ` key), but I didn't see a way to do that.

So: if you want to grab just one block, don't be holding shift down (or whatever your sneak key is set to).

Does that help?
As i know binding spesific key is not possible with the current minetest api. Only "E" and "Shift" is usable.

All i was saying that adding all nodes to list is a bit tiring. I wanted a universal tool to destroy all same nodes touching without adding to mineable_nodes list.
Just another idea. In additional to nodenames maybe we can configure mod by adding node groups.
So all group:wood will be mined at once using axe :)
My Mods:

Beverage

echosa
Member
Posts: 107
Joined: Tue Aug 30, 2016 04:01

Re: [Mod] Mine It All [1.0] [mine_it_all]

by echosa » Post

I consider all these ideas. I like some of them. If anyone has the ability, I appreciate any help and pull requests you might send my way. :-) Otherwise, I'll see what I can do, when I can do it.

I really do appreciate the feedback, and hope people are finding this mod useful. :-)

echosa
Member
Posts: 107
Joined: Tue Aug 30, 2016 04:01

Re: [Mod] Mine It All [1.0] [mine_it_all]

by echosa » Post

A couple of updates:

1.) I've made some of the refactoring changes that were recommended in my Reddit post for this mod as well as this post. I've pushed those changes to GitHub. However, I have not tagged a new release or released a new version of the mod since no functionality was changed. Anyone who wants it can grab the latest code from GitHub.

2.) I've started documenting things that need to be fixed, changed, or improved in the GitHub issues area of the repo. Please, if you find anything that needs to be fixed, or have any insight into how to fix existing issues, add that to the issues and their comments. Bonus Fake Internet Points to anyone who fixes some of the problems and submits a PR. :-)

3.) There is a pretty major bug in the current version that I can't quite fix. Rather, I can't fix it in a decent way. It's issue #1 in GitHub, but the gist is: the number of blocks vein mined is not limited. If you vein mine sand in a desert, for instance, you're going to have a bad time. :-( I recommend limiting your vein mining to small things like nodes of ore or trees. You can enforce this in mineable_nodes.lua if you want. I don't want to do that, nor do I want to just add a static counter of "you can only mine up to X of anything". Both of those just feel like stopgaps, at best.

I just wanted to send an update so that you all know I'm still trying to work on this mod when I can. Time is limited, but I want to improve this mod as best as I can!

Byakuren
Member
Posts: 818
Joined: Tue Apr 14, 2015 01:59
GitHub: raymoo
IRC: Hijiri
In-game: Raymoo + Clownpiece

Re: [Mod] Mine It All [1.0] [mine_it_all]

by Byakuren » Post

Stopgap for what? If nobody can think of a better solution, then you should just apply the (configurable) count limit, it would at least be better than the current situation. If you want it to look nice you can make your node-finding code do a breadth-first search, then you will mine the closest nodes first.
Every time a mod API is left undocumented, a koala dies.

User avatar
Lord_Vlad
Member
Posts: 112
Joined: Thu Jul 20, 2017 07:58

Re: [Mod] Mine It All [1.0] [mine_it_all]

by Lord_Vlad » Post

Code: Select all

2017-07-24 20:29:36: ACTION[Server]: singleplayer punches object 50: LuaEntitySAO at (33.1222,6.926,-174.791)
2017-07-24 20:29:37: ACTION[Server]: Player singleplayer punched by LuaEntitySAO at (34.4725,6,-172.01), damage 0 HP
2017-07-24 20:29:39: ACTION[Server]: Player singleplayer punched by LuaEntitySAO at (34.4725,6,-172.01), damage 0 HP
2017-07-24 20:29:39: ERROR[Main]: ServerError: AsyncErr: ServerThread::run Lua: Runtime error from mod 'default' in callback luaentity_Step(): /home/william/.minetest/mods/mine_it_all/init.lua:10: attempt to index local 'digger' (a nil value)
2017-07-24 20:29:39: ERROR[Main]: stack traceback:
2017-07-24 20:29:39: ERROR[Main]: 	/home/william/.minetest/mods/mine_it_all/init.lua:10: in function 'is_node_vein_diggable'
2017-07-24 20:29:39: ERROR[Main]: 	/home/william/.minetest/mods/mine_it_all/init.lua:48: in function 'callback'
2017-07-24 20:29:39: ERROR[Main]: 	/usr/share/minetest/builtin/game/falling.lua:103: in function </usr/share/minetest/builtin/game/falling.lua:53>
2017-07-24 20:29:39: ACTION[Main]: [morecommands] Wrote whitelist data into /home/william/.minetest/worlds/dcx fsvd/whitelist.mt.
That is frequent and it crashes Minetest back to menu, you have to disable the mod, relaunch the world, close and reable the mod.

Also it would be great to have basic support for at least some really popular mods. I can even write the files if needed, just ask.

User avatar
Stix
Member
Posts: 1385
Joined: Fri Aug 04, 2017 14:19
IRC: nil
In-game: Stix [+alts]
Location: USA

Re: [Mod] Mine It All [1.0] [mine_it_all]

by Stix » Post

just the mod i needed, thx
Hey, what can i say? I'm the bad guy.

User avatar
Lord_Vlad
Member
Posts: 112
Joined: Thu Jul 20, 2017 07:58

Re: [Mod] Mine It All [1.0] [mine_it_all]

by Lord_Vlad » Post

I really am addicted to that mod, can't live without it.
It's a shame that this bug makes it PERFECTLY UNUSABLE.

Please someone, can you help me fix it (or simply fix it) I'll do anything I can for it.

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

Re: [Mod] Mine It All [1.0] [mine_it_all]

by bell07 » Post

Something is wrong with your copy of this mod. Because the line 10 mentioned in your error message is an empty line.

However, just now I wrote a woodcutting based mod "orecutting" that you can try out: https://github.com/bell07/minetest-orecutting

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

Re: [Mod] Mine It All [1.0] [mine_it_all]

by bell07 » Post

[deleted - double post]
Last edited by bell07 on Tue Aug 15, 2017 20:42, edited 1 time in total.

User avatar
Lord_Vlad
Member
Posts: 112
Joined: Thu Jul 20, 2017 07:58

Re: [Mod] Mine It All [1.0] [mine_it_all]

by Lord_Vlad » Post

Ok, two things : I replaced my version of Mine it all but it did nothing so, the bug must be in line 35 according to my new error message.

Anyways, I switched to Orecutting (also to woodcutting, it's also really neat)
And I found it is for some reason uncompatible with geominer, a WIP mod. Maybe you should look into that. Otherwise, it works great.
Both of them have great compatibility with all the trees and all the tools and all the ores...

Though, for Orecutting it comes a bit as a double edge-sword : you mine one vein of i.e. coal, then next to it (sometimes 2-3 blocks away) it finds an iron vein, digs it, finds silver, gold and diamond... And basically starts to dig out the map for you. ALL the ores of a chunck end up mined out within minutes, feels like cheating. Just fix that and I'll gladly use it.

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

Re: [Mod] Mine It All [1.0] [mine_it_all]

by bell07 » Post

The first thing: you can fix the mine_it_all, just add the

Code: Select all

if not digger then
   return
end
in line 35, between

Code: Select all

minetest.register_on_dignode(function(pos, node, digger)
and

Code: Select all

local current_tool = digger:get_wielded_item():get_name()
The second, you are right, I adjusted the orecutting so the "selected" (first manually digged) ore is processed now automatically. By the way, the orecutting discussion is now at viewtopic.php?f=9&t=18305 Can you describe the geominer complatibility issue in this thread? I do not know geominer

User avatar
TechNolaByte
Member
Posts: 465
Joined: Wed May 10, 2017 21:00
GitHub: TechNolaByte

Re: [Mod] Mine It All [1.0] [mine_it_all]

by TechNolaByte » Post

super broken

using default game + mine it all + unified inventory

https://imgur.com/C68QlV0

9 coal blocks
https://imgur.com/SY4DLmA

gets me 42?
https://imgur.com/T2PXM5u

been broken for me for long time just figured I should finally let you know
The great quest of alchemy neither failed nor attained gold; programmers are those great alchemists who transmute caffeine into code.

User avatar
Joseph16
Member
Posts: 310
Joined: Tue Dec 06, 2016 05:35
In-game: smb3

Re: [Mod] Mine It All [1.0] [mine_it_all]

by Joseph16 » Post

It duplicates ores when you vein mine in minetest 5.0.1
Testin' mines since 1989

ThorfinnS
Member
Posts: 311
Joined: Mon Feb 25, 2019 22:05
GitHub: ThorfinnS

Re: [Mod] Mine It All [1.0] [mine_it_all]

by ThorfinnS » Post

Don't know what that does in Minecraft, but it sounds kind of like

viewtopic.php?f=9&t=18305&hilit=orecutting

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 19 guests