I am wanting to make a machine that has a custom crafting definition. I am not sure how to do this. I found the mod Crafter but it has not been updated in over 2 years.
Can someone point me to information and/or a mod that I could go by to do this?
I want a simple 2x2 crafting table with type=splice
Custom Crafting
Custom Crafting
Many of my mods are now a part of Minetest-mods. A place where you know they are maintained!
A list of my mods can be found here
A list of my mods can be found here
Re: Custom Crafting
Would this do: viewtopic.php?id=3546 ?
Re: Custom Crafting
That uses the crafter mod. Both crafter and smelting are made by MasterGollum. The mods are both "work in progress" and have not been updated in a couple years. I was hoping to find something that is newer.4aiman wrote:Would this do: viewtopic.php?id=3546 ?
But thanks for trying. I was really hoping that there might be documentation that I missed.
Many of my mods are now a part of Minetest-mods. A place where you know they are maintained!
A list of my mods can be found here
A list of my mods can be found here
Re: Custom Crafting
Technic has the alloy furnace. That might be what you are looking for and the mod is still being worked on.
viewtopic.php?id=2538
viewtopic.php?id=2538
- Napiophelios
- Member
- Posts: 1035
- Joined: Mon Jul 07, 2014 01:14
- GitHub: Napiophelios
- IRC: Nappi
- In-game: Nappi
Re: Custom Crafting
Ran across this on github,
I dont know if it works or not
I havent tried it.
https://github.com/SmallJoker/custom_crafts
I dont know if it works or not
I havent tried it.
https://github.com/SmallJoker/custom_crafts
Code: Select all
-- Incompatible with MasterGollum's crafter mod
crafter = {}
local all_recipe_types = {}
local all_recipes = {}
function crafter.register_craft_type(name)
table.insert(all_recipe_types, name)
end
function crafter.register_craft(def)
if not def then
return
end
local typ = def.type
if not (def.output and def.recipe and typ) then
return
end
if type(def.recipe) == "string" then
def.recipe = { def.recipe }
end
local recipe = {}
for i, v in ipairs(def.recipe) do
local stack = ItemStack(v)
local name = stack:get_name()
local count = stack:get_count()
if not recipe[name] then
recipe[name] = count
else
recipe[name] = recipe[name] + count
end
end
if not all_recipes[typ] then
all_recipes[typ] = {}
end
table.insert(all_recipes[typ], { def.output, def.recipe })
end
function crafter.get_craft_result(typ, list)
if not (typ and list) then
return
end
--todo
end
minetest.after(5, function()
local test = minetest.get_inventory({type="player", name="singleplayer"})
if test then
test:set_stack("main", 10, "default:torch")
else
print("error")
end
end)
crafter.register_craft_type("12test")
crafter.register_craft({
type = "12test",
output = "default:stick",
recipe = { "default:stick" }
})
Re: Custom Crafting
That's what I needed. Thank you!Napiophelios wrote:Ran across this on github,
I dont know if it works or not
I havent tried it.
https://github.com/SmallJoker/custom_crafts
Code: Select all
-- Incompatible with MasterGollum's crafter mod crafter = {} local all_recipe_types = {} local all_recipes = {} function crafter.register_craft_type(name) table.insert(all_recipe_types, name) end function crafter.register_craft(def) if not def then return end local typ = def.type if not (def.output and def.recipe and typ) then return end if type(def.recipe) == "string" then def.recipe = { def.recipe } end local recipe = {} for i, v in ipairs(def.recipe) do local stack = ItemStack(v) local name = stack:get_name() local count = stack:get_count() if not recipe[name] then recipe[name] = count else recipe[name] = recipe[name] + count end end if not all_recipes[typ] then all_recipes[typ] = {} end table.insert(all_recipes[typ], { def.output, def.recipe }) end function crafter.get_craft_result(typ, list) if not (typ and list) then return end --todo end minetest.after(5, function() local test = minetest.get_inventory({type="player", name="singleplayer"}) if test then test:set_stack("main", 10, "default:torch") else print("error") end end) crafter.register_craft_type("12test") crafter.register_craft({ type = "12test", output = "default:stick", recipe = { "default:stick" } })
Many of my mods are now a part of Minetest-mods. A place where you know they are maintained!
A list of my mods can be found here
A list of my mods can be found here
Re: Custom Crafting
As a newb I get lost really easy in technics code.LionsDen wrote:Technic has the alloy furnace. That might be what you are looking for and the mod is still being worked on.
viewtopic.php?id=2538
Many of my mods are now a part of Minetest-mods. A place where you know they are maintained!
A list of my mods can be found here
A list of my mods can be found here
Who is online
Users browsing this forum: Bing [Bot] and 8 guests