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

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

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

by echosa » Thu Sep 01, 2016 14:14

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: 355
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 » Thu Sep 01, 2016 18:16

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

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
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: 94
Joined: Tue Aug 30, 2016 04:01

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

by echosa » Thu Sep 01, 2016 18:52

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: 355
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 » Thu Sep 01, 2016 20:14

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: 94
Joined: Tue Aug 30, 2016 04:01

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

by echosa » Thu Sep 01, 2016 21:49

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: 441
Joined: Tue Apr 14, 2015 01:59
GitHub: raymoo
IRC: Hijiri

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

by Byakuren » Fri Sep 02, 2016 05:30

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: 355
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 » Fri Sep 02, 2016 11:27

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: 94
Joined: Tue Aug 30, 2016 04:01

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

by echosa » Fri Sep 02, 2016 16:00

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: 94
Joined: Tue Aug 30, 2016 04:01

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

by echosa » Sun Sep 18, 2016 00:03

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: 441
Joined: Tue Apr 14, 2015 01:59
GitHub: raymoo
IRC: Hijiri

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

by Byakuren » Tue Sep 20, 2016 09:14

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.
 


Return to Mod Releases

Who is online

Users browsing this forum: No registered users and 17 guests

cron