how can i make a furnace with two slots for items to smelt?

User avatar
durtective6
Member
 
Posts: 167
Joined: Sun Aug 12, 2012 14:19
In-game: derplez

how can i make a furnace with two slots for items to smelt?

by durtective6 » Thu Dec 12, 2013 16:35

For my mod techno i would like to make a furnace like technics alloy furnace but have no idea how. Ive made one with the mod crafter but it keeps giving me this error whenever i put things in the fourth slot:

16:19:25: ERROR[main]: ServerError: LuaError: ...8-win32-msvc\minetest-0.4.8\bin\..\mods\crafter\init.lua:91: attempt to index a nil value
16:19:25: ERROR[main]: stack traceback:
16:19:25: ERROR[main]: ...8-win32-msvc\minetest-0.4.8\bin\..\mods\crafter\init.lua:91: in function '_check_craft'
16:19:25: ERROR[main]: ...8-win32-msvc\minetest-0.4.8\bin\..\mods\crafter\init.lua:26: in function 'get_craft_result'
16:19:25: ERROR[main]: ...8-win32-msvc\minetest-0.4.8\bin\..\mods\smelter\init.lua:100: in function <...8-win32-msvc\minetest-0.4.8\bin\..\mods\smelter\init.lua:81>

Anyway back to the subject, how can i make a furnace with two slots to put smeltable items in, probably to combine them (one slot above the other)?
 

User avatar
Krock
Member
 
Posts: 3598
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker

by Krock » Thu Dec 12, 2013 18:40

you need to extend the "src" list, mostly in 'on_constructing' or 'after_place_node'
it's something like this: (and re-place node after the change)
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 inv = meta:get_inventory()
        inv:set_size("src", 3*3) -- space for a crafting grid, 9 stacks

maybe you can take a look into the technic alloy furnaces, they managed it to 'smelt' 2 things into another
Last edited by Krock on Thu Dec 12, 2013 18:40, edited 1 time in total.
Newest Win32 builds - Find a mod - All my mods
ALL YOUR DONATION ARE BELONG TO PARAMAT (Please support him and Minetest)
New DuckDuckGo !bang: !mtmod <keyword here>
 

User avatar
durtective6
Member
 
Posts: 167
Joined: Sun Aug 12, 2012 14:19
In-game: derplez

by durtective6 » Thu Dec 12, 2013 18:57

hmmm :/ it still only gives me one slot
Last edited by durtective6 on Thu Dec 12, 2013 18:57, edited 1 time in total.
 

User avatar
Krock
Member
 
Posts: 3598
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker

by Krock » Thu Dec 12, 2013 18:59

durtective6 wrote:hmmm :/ it still only gives me one slot

'gives'... then edit the formspec! explanation can you find in the dev. wiki of MT.
Newest Win32 builds - Find a mod - All my mods
ALL YOUR DONATION ARE BELONG TO PARAMAT (Please support him and Minetest)
New DuckDuckGo !bang: !mtmod <keyword here>
 


Return to WIP Mods

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 24 guests

cron