Page 1 of 1

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

PostPosted: Thu Dec 12, 2013 16:35
by durtective6
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)?

PostPosted: Thu Dec 12, 2013 18:40
by Krock
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

PostPosted: Thu Dec 12, 2013 18:57
by durtective6
hmmm :/ it still only gives me one slot

PostPosted: Thu Dec 12, 2013 18:59
by Krock
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.