make craft recipe conditional

master
Tai @ Flex 2016-09-30 13:41:48 +01:00
parent 827d69c810
commit 607b2049a7
2 changed files with 11 additions and 8 deletions

View File

@ -10,6 +10,7 @@ spawnstep.maxmobs = 1 -- maxiumum number of mobs to allow in area defined by spa
spawnstep.overmode = false -- whether to look at node above instead of under
spawnstep.remove = false -- whether to remove the node after spawning
spawnstep.removeteller = false -- whether to remove the mob determining node after spawning
spawnstep.craftable = false -- whether the spawn trap is craftable
spawnstep.tiles = { -- define the tiles for the trap node
"default_stone.png^default_mese_crystal.png"

View File

@ -12,14 +12,16 @@ minetest.register_node("spawnstep:spawntrap",{
end
})
core.register_craft({
output="spawnstep:spawntrap",
recipe={
{"","default:mese",""},
{"","default:obsidian",""},
{"default:diamondblock","default:obsidian","default:diamondblock"},
}
})
if spawnstep.craftable == true then
core.register_craft({
output="spawnstep:spawntrap",
recipe={
{"","default:mese",""},
{"","default:obsidian",""},
{"default:diamondblock","default:obsidian","default:diamondblock"},
}
})
end
local count_nearby_mobs = function(pos,radius)