Multiple nodes at the same position

User avatar
MirceaKitsune
Member
 
Posts: 809
Joined: Sat May 21, 2011 22:31
GitHub: MirceaKitsune
IRC: Taoki
In-game: MirceaKitsune

Multiple nodes at the same position

by MirceaKitsune » Wed Jul 10, 2013 10:34

I know the answer is probably no since this would require big engine changes. But would it be possible to someday allow multiple nodes at the same position for special types of nodes? This would be useful to place objects made out of multiple pieces in the same spot for instance (eg: flower pots and flowers but both as separate nodes), or naturally hide objects in dirt blocks which you'd have to dig to see first (possibly small nodebox items). This would also fix the "water hole over slabs / stairs" issue since you could have slabs and stairs in the same place as a water node.

This would however require huge changes which I doubt people will make. First of all the world database might need updating, to allow multiple node definitions at one location. Then many Lua functions like minetest.get_node(pos) would need to know which node they return for at that location. Rendering, digging, collisions and selection boxes would also need to account the proper node, so you can see / mine any you are looking at.

Is the idea possible to any extent? Would anyone else find it useful also?
 

User avatar
webdesigner97
Member
 
Posts: 1307
Joined: Mon Jul 30, 2012 19:16
GitHub: webD97
IRC: webdesigner97
In-game: webdesigner97

by webdesigner97 » Wed Jul 10, 2013 12:29

Well, I think it's not possible without nodeboxes bigger than 1 node. But this would be useful for water flowing through fences and open doors.... But I don't think we should implement that...
 

User avatar
Mossmanikin
Member
 
Posts: 599
Joined: Sun May 19, 2013 16:26

by Mossmanikin » Wed Jul 10, 2013 13:13

I've no idea how to do it. But I think it would be possible if the selectionboxes of the two nodes have a different size and/or they can only be selected by different tools.

I definitely would find it useful for
webdesigner97 wrote:water flowing through fences

Noob 4 life!
My stuff
 

User avatar
MirceaKitsune
Member
 
Posts: 809
Joined: Sat May 21, 2011 22:31
GitHub: MirceaKitsune
IRC: Taoki
In-game: MirceaKitsune

by MirceaKitsune » Wed Jul 10, 2013 14:28

webdesigner97 wrote:Well, I think it's not possible without nodeboxes bigger than 1 node. But this would be useful for water flowing through fences and open doors.... But I don't think we should implement that...


It would solve a lot of water issues yes. Water could flow through fences and gates, while fences could be placed underwater without causing holes.

Mossmanikin wrote:I've no idea how to do it. But I think it would be possible if the selectionboxes of the two nodes have a different size and/or they can only be selected by different tools.


That's the idea I had in mind yes. If two different nodebox objects are in the same spot, the one who's nodeboxes you're looking at is highlighted and selected by view. If you mine then that's the one you will be mining.
 

User avatar
sfan5
Member
 
Posts: 3636
Joined: Wed Aug 24, 2011 09:44
GitHub: sfan5
IRC: sfan5

by sfan5 » Wed Jul 10, 2013 15:21

IMO this would be too much work and solve too little issues
Mods: Mesecons | WorldEdit | Nuke
Minetest builds for Windows (32-bit & 64-bit)
 

User avatar
MirceaKitsune
Member
 
Posts: 809
Joined: Sat May 21, 2011 22:31
GitHub: MirceaKitsune
IRC: Taoki
In-game: MirceaKitsune

by MirceaKitsune » Mon Jul 15, 2013 10:37

I found other reasons why this feature would be very useful to add:

One is allowing snow to cover flowers and dirt. You know how when it snows in cold biomes, snow slabs also appear at the surface (or at least that's an obvious intended feature). In Minecraft, snow cannot cover grass and flowers, so they leave a gap. This feature would prevent that, and we wouldn't have to either leave snow gaps where flowers exist or remove flowers to place snow blocks.

Speaking of flowers, this would also allow having flowers and grass in the same spot. Oh... and why not have apples spawn INSIDE leaf nodes? What about being able to place items inside glass blocks... for instance to expose an apple inside a glass case?

Another use is allowing materials with an 'absorption' property to not remove liquids when placed and dug out. So for example: If you'd place dirt in water then dig the dirt out, the water block would still be there intact... but if you'd place stone it would replace the water block. Of course this can easily be done with a script, but this would be a more accurate way.

Anyway, I agree that this would be much work, but not that it would solve too little issues.
 

User avatar
Zeg9
Member
 
Posts: 608
Joined: Fri Sep 21, 2012 11:02

by Zeg9 » Mon Jul 15, 2013 12:29

I have an idea which could solve most of the issues: a special meta string, which would contain the name of a secondary node.
This way nothing much important would be changed in the engine (at least, in the map database), and it would allow having 2 nodes in the same place.
Last edited by Zeg9 on Mon Jul 15, 2013 12:29, edited 1 time in total.
I made a few (a lot of?) mods for minetest: here is a list.
See also the MT-Faithful texture pack (work in progress).
 

User avatar
Calinou
Member
 
Posts: 3124
Joined: Mon Aug 01, 2011 14:26
GitHub: Calinou
IRC: Calinou
In-game: Calinou

by Calinou » Mon Jul 15, 2013 13:54

MirceaKitsune wrote:Oh... and why not have apples spawn INSIDE leaf nodes? What about being able to place items inside glass blocks... for instance to expose an apple inside a glass case?


It would be easy to make a default:leaves_with_apple node that drops an apple and a leaf block when dug.
 


Return to Minetest Features

Who is online

Users browsing this forum: No registered users and 6 guests

cron