5 {-0.5, -5/16, -0.5, 0.5, 0.06, 0.5},
6 {-0.5, -0.5, -0.5, -5/16, -5/16, -5/16},
7 {0.5, -0.5, -0.5, 5/16, -5/16, -5/16},
10 {-0.5, -5/16, -0.5, 0.5, 0.06, 0.5},
11 {-0.5, -0.5, 0.5, -5/16, -5/16, 5/16},
12 {0.5, -0.5, 0.5, 5/16, -5/16, 5/16},
17 -- { ID, decription, wool, dye }
18 { "red", "Red Bed", "mcl_wool:red", "mcl_dye:red" },
19 { "blue", "Blue Bed", "mcl_wool:blue", "mcl_dye:blue" },
20 { "cyan", "Cyan Bed", "mcl_wool:cyan", "mcl_dye:cyan" },
21 { "grey", "Grey Bed", "mcl_wool:grey", "mcl_dye:dark_grey" },
22 { "silver", "Light Grey Bed", "mcl_wool:silver", "mcl_dye:grey" },
23 { "black", "Black Bed", "mcl_wool:black", "mcl_dye:black" },
24 { "yellow", "Yellow Bed", "mcl_wool:yellow", "mcl_dye:yellow" },
25 { "green", "Green Bed", "mcl_wool:green", "mcl_dye:dark_green" },
26 { "magenta", "Magenta Bed", "mcl_wool:magenta", "mcl_dye:magenta" },
27 { "orange", "Orange Bed", "mcl_wool:orange", "mcl_dye:orange" },
28 { "purple", "Purple Bed", "mcl_wool:purple", "mcl_dye:violet" },
29 { "brown", "Brown Bed", "mcl_wool:brown", "mcl_dye:brown" },
30 { "pink", "Pink Bed", "mcl_wool:pink", "mcl_dye:pink" },
31 { "lime", "Lime Bed", "mcl_wool:lime", "mcl_dye:green" },
32 { "light_blue", "Light Blue Bed", "mcl_wool:light_blue", "mcl_dye:lightblue" },
33 { "white", "White Bed", "mcl_wool:white", "mcl_dye:white" },
37 local colorid
= colors
[c
][1]
39 -- Recoloring recipe for white bed
40 if minetest
.get_modpath("mcl_dye") then
41 minetest
.register_craft({
43 output
= "mcl_beds:bed_"..colorid
.."_bottom",
44 recipe
= { "mcl_beds:bed_white_bottom", colors
[c
][4] },
50 if minetest
.get_modpath("mcl_wool") then
52 {colors
[c
][3], colors
[c
][3], colors
[c
][3]},
53 {"group:wood", "group:wood", "group:wood"}
58 mcl_beds
.register_bed("mcl_beds:bed_"..colorid
, {
59 description
= colors
[c
][2],
60 inventory_image
= "mcl_beds_bed_"..colorid
..".png",
61 wield_image
= "mcl_beds_bed_"..colorid
..".png",
64 "mcl_beds_bed_top_bottom_"..colorid
..".png^[transformR90",
65 "default_wood.png^mcl_beds_bed_bottom_bottom.png",
66 "mcl_beds_bed_side_bottom_r_"..colorid
..".png",
67 "mcl_beds_bed_side_bottom_r_"..colorid
..".png^[transformfx",
68 "mcl_beds_bed_side_top_"..colorid
..".png",
69 "mcl_beds_bed_side_bottom_"..colorid
..".png"
72 "mcl_beds_bed_top_top_"..colorid
..".png^[transformR90",
73 "default_wood.png^mcl_beds_bed_bottom_top.png",
74 "mcl_beds_bed_side_top_r_"..colorid
..".png",
75 "mcl_beds_bed_side_top_r_"..colorid
..".png^[transformfx",
76 "mcl_beds_bed_side_top_"..colorid
..".png",
77 "mcl_beds_bed_side_bottom_"..colorid
..".png"
82 bottom
= {-0.5, -0.5, -0.5, 0.5, 0.06, 0.5},
83 top
= {-0.5, -0.5, -0.5, 0.5, 0.06, 0.5},
85 -- Simplified collision box because Minetest acts weird if we use the nodebox one
87 bottom
= {-0.5, -0.5, -0.5, 0.5, 0.06, 0.5},
88 top
= {-0.5, -0.5, -0.5, 0.5, 0.06, 0.5},
95 minetest
.register_alias("beds:bed_bottom", "mcl_beds:bed_red_bottom")
96 minetest
.register_alias("beds:bed_top", "mcl_beds:bed_red_top")