Minetest crafting by group

User avatar
philipbenr
Member
 
Posts: 1665
Joined: Fri Jun 14, 2013 01:56
GitHub: philipbenr
IRC: philipbenr
In-game: WisdomFire or philipbenr

Minetest crafting by group

by philipbenr » Wed Jul 06, 2016 01:48

So, I wanted to have a crafting recipe that accepts all types of stonebrick (forgot obsidian_stonebrick, how silly), and all types of cobble, like so:

Image

However, the issue is in the Minetest code, there are two types of groups. 1 is a simpler stone like natural stone or cobble, whereas 2 is a more complex stone like stonebrick. Using the aforementioned example, is there a way to craft like this:

Group1 | Group2
Group2 | Group1

Or do I have to manually go through and specify the node types in the game, like the stonebrick and cobble like I mentioned earlier? What would be the best way to do this? I know that going through manually would be complete hell, so yeah. XD
 

Byakuren
Member
 
Posts: 441
Joined: Tue Apr 14, 2015 01:59
GitHub: raymoo
IRC: Hijiri

Re: Minetest crafting by group

by Byakuren » Thu Jul 07, 2016 01:30

Wouldn't you just use the groups in your recipe normally like
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
local g1 = "group:group1"
local g2 = "group:group2"

{{g1, g2}
 {g2, g1}}
Every time a mod API is left undocumented, a koala dies.
 


Return to Modding Discussion

Who is online

Users browsing this forum: No registered users and 8 guests

cron