make leather backpack conditional on mobs
parent
bbb7241605
commit
479357ed07
86
init.lua
86
init.lua
|
@ -103,46 +103,48 @@ minetest.register_craft({
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
-- Leather backpack
|
if mobs and mobs.redo then
|
||||||
minetest.register_node("backpacks:backpack_leather", {
|
-- Leather backpack
|
||||||
description = "Leather Backpack",
|
minetest.register_node("backpacks:backpack_leather", {
|
||||||
tiles = {
|
description = "Leather Backpack",
|
||||||
"backpacks_leather.png^backpacks_backpack_topbottom.png", -- Top
|
tiles = {
|
||||||
"backpacks_leather.png^backpacks_backpack_topbottom.png", -- Bottom
|
"backpacks_leather.png^backpacks_backpack_topbottom.png", -- Top
|
||||||
"backpacks_leather.png^backpacks_backpack_sides.png", -- Right Side
|
"backpacks_leather.png^backpacks_backpack_topbottom.png", -- Bottom
|
||||||
"backpacks_leather.png^backpacks_backpack_sides.png", -- Left Side
|
"backpacks_leather.png^backpacks_backpack_sides.png", -- Right Side
|
||||||
"backpacks_leather.png^backpacks_backpack_back.png", -- Back
|
"backpacks_leather.png^backpacks_backpack_sides.png", -- Left Side
|
||||||
"backpacks_leather.png^backpacks_backpack_front.png" -- Front
|
"backpacks_leather.png^backpacks_backpack_back.png", -- Back
|
||||||
},
|
"backpacks_leather.png^backpacks_backpack_front.png" -- Front
|
||||||
drawtype = "nodebox",
|
},
|
||||||
paramtype = "light",
|
drawtype = "nodebox",
|
||||||
paramtype2 = "facedir",
|
paramtype = "light",
|
||||||
node_box = {
|
paramtype2 = "facedir",
|
||||||
type = "fixed",
|
node_box = {
|
||||||
fixed = {
|
type = "fixed",
|
||||||
{-0.4375, -0.5, -0.375, 0.4375, 0.5, 0.375},
|
fixed = {
|
||||||
{0.125, -0.375, 0.4375, 0.375, 0.3125, 0.5},
|
{-0.4375, -0.5, -0.375, 0.4375, 0.5, 0.375},
|
||||||
{-0.375, -0.375, 0.4375, -0.125, 0.3125, 0.5},
|
{0.125, -0.375, 0.4375, 0.375, 0.3125, 0.5},
|
||||||
{0.125, 0.1875, 0.375, 0.375, 0.375, 0.4375},
|
{-0.375, -0.375, 0.4375, -0.125, 0.3125, 0.5},
|
||||||
{-0.375, 0.1875, 0.375, -0.125, 0.375, 0.4375},
|
{0.125, 0.1875, 0.375, 0.375, 0.375, 0.4375},
|
||||||
{0.125, -0.375, 0.375, 0.375, -0.25, 0.4375},
|
{-0.375, 0.1875, 0.375, -0.125, 0.375, 0.4375},
|
||||||
{-0.375, -0.375, 0.375, -0.125, -0.25, 0.4375},
|
{0.125, -0.375, 0.375, 0.375, -0.25, 0.4375},
|
||||||
{-0.3125, -0.375, -0.4375, 0.3125, 0.1875, -0.375},
|
{-0.375, -0.375, 0.375, -0.125, -0.25, 0.4375},
|
||||||
{-0.25, -0.3125, -0.5, 0.25, 0.125, -0.4375},
|
{-0.3125, -0.375, -0.4375, 0.3125, 0.1875, -0.375},
|
||||||
|
{-0.25, -0.3125, -0.5, 0.25, 0.125, -0.4375},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
groups = {dig_immediate = 3, oddly_diggable_by_hand = 3},
|
||||||
|
stack_max = 1,
|
||||||
|
on_construct = backpacks.on_construct,
|
||||||
|
after_place_node = backpacks.after_place_node,
|
||||||
|
on_dig = backpacks.on_dig,
|
||||||
|
allow_metadata_inventory_put = backpacks.allow_metadata_inventory_put,
|
||||||
|
})
|
||||||
|
minetest.register_craft({
|
||||||
|
output = "backpacks:backpack_leather",
|
||||||
|
recipe = {
|
||||||
|
{"mobs:leather", "mobs:leather", "mobs:leather"},
|
||||||
|
{"mobs:leather", "", "mobs:leather"},
|
||||||
|
{"mobs:leather", "mobs:leather", "mobs:leather"},
|
||||||
}
|
}
|
||||||
},
|
})
|
||||||
groups = {dig_immediate = 3, oddly_diggable_by_hand = 3},
|
end
|
||||||
stack_max = 1,
|
|
||||||
on_construct = backpacks.on_construct,
|
|
||||||
after_place_node = backpacks.after_place_node,
|
|
||||||
on_dig = backpacks.on_dig,
|
|
||||||
allow_metadata_inventory_put = backpacks.allow_metadata_inventory_put,
|
|
||||||
})
|
|
||||||
minetest.register_craft({
|
|
||||||
output = "backpacks:backpack_leather",
|
|
||||||
recipe = {
|
|
||||||
{"mobs:leather", "mobs:leather", "mobs:leather"},
|
|
||||||
{"mobs:leather", "", "mobs:leather"},
|
|
||||||
{"mobs:leather", "mobs:leather", "mobs:leather"},
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
Loading…
Reference in New Issue