account for Minetest issue 5518

This commit is contained in:
FaceDeer 2017-05-07 11:49:56 -06:00
parent 41405085cf
commit 1b6296cc03

@ -3,17 +3,26 @@ local MP = minetest.get_modpath(minetest.get_current_modname())
local S, NS = dofile(MP.."/intllib.lua") local S, NS = dofile(MP.."/intllib.lua")
if minetest.get_modpath("farming") then if minetest.get_modpath("farming") then
local old_def = minetest.registered_craftitems["farming:cotton"] -- this doesn't work reliably due to side effects of https://github.com/minetest/minetest/issues/5518
if old_def then -- local old_def = minetest.registered_craftitems["farming:cotton"]
old_def.groups["thread"] = 1 -- if old_def then
minetest.override_item("farming:cotton", { -- old_def.groups["thread"] = 1
groups = old_def.groups -- minetest.override_item("farming:cotton", {
}) -- groups = old_def.groups
end -- })
-- end
minetest.register_craft({
output = 'ropes:ropesegment',
recipe = {
{'farming:cotton','farming:cotton'},
{'farming:cotton','farming:cotton'},
{'farming:cotton','farming:cotton'},
}
})
end end
minetest.register_craft({ minetest.register_craft({
output = 'ropes:ropesegment', output = 'ropes:ropesegment',
recipe = { recipe = {
{'group:thread','group:thread'}, {'group:thread','group:thread'},
{'group:thread','group:thread'}, {'group:thread','group:thread'},