mirror of
https://github.com/minetest-mods/crafting_bench.git
synced 2025-02-17 18:43:42 +01:00
Fixes for mcl* compatibility (#13)
This commit is contained in:
27
init.lua
27
init.lua
@ -28,10 +28,8 @@ if has_mcl then
|
|||||||
invsize_dst = 1 * 3
|
invsize_dst = 1 * 3
|
||||||
end
|
end
|
||||||
|
|
||||||
local groups
|
local groups, mcl_hardness, mcl_blast_res, sounds
|
||||||
local mcl_hardness
|
local steel_ingot, wood, tree
|
||||||
local mcl_blast_res
|
|
||||||
local sounds
|
|
||||||
|
|
||||||
local formspec
|
local formspec
|
||||||
if has_default then
|
if has_default then
|
||||||
@ -76,9 +74,9 @@ elseif has_mcl then
|
|||||||
'listring[current_player;main]'..
|
'listring[current_player;main]'..
|
||||||
'listring[current_name;src]'..
|
'listring[current_name;src]'..
|
||||||
'listring[current_player;main]'
|
'listring[current_player;main]'
|
||||||
groups = {axey=2, handy=2, flammable=-1, container = 4}
|
groups = {axey=2, handy=1, flammable=-1, container = 4}
|
||||||
sounds = mcl_sounds.node_sound_wood_defaults()
|
sounds = mcl_sounds.node_sound_wood_defaults()
|
||||||
mcl_hardness = 2
|
mcl_hardness = 3
|
||||||
mcl_blast_res = 3
|
mcl_blast_res = 3
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -203,12 +201,23 @@ minetest.register_abm( {
|
|||||||
end
|
end
|
||||||
} )
|
} )
|
||||||
|
|
||||||
|
-- Crafting recipe compatibility.
|
||||||
|
if has_default then
|
||||||
|
steel_ingot = "default:steel_ingot"
|
||||||
|
wood = "default:wood"
|
||||||
|
tree = "default:tree"
|
||||||
|
elseif has_mcl then
|
||||||
|
steel_ingot = "mcl_core:iron_ingot"
|
||||||
|
wood = "mcl_core:wood"
|
||||||
|
tree = "mcl_core:tree"
|
||||||
|
end
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = "crafting_bench:workbench",
|
output = "crafting_bench:workbench",
|
||||||
recipe = {
|
recipe = {
|
||||||
{"default:steel_ingot","default:steel_ingot","default:steel_ingot"},
|
{steel_ingot, steel_ingot, steel_ingot},
|
||||||
{"default:wood", "default:wood","default:steel_ingot"},
|
{wood, wood, steel_ingot},
|
||||||
{"default:tree", "default:tree","default:steel_ingot"},
|
{tree, tree, steel_ingot},
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user