cotton blocks adapted
|
@ -0,0 +1,2 @@
|
||||||
|
dye
|
||||||
|
flowers
|
|
@ -0,0 +1,116 @@
|
||||||
|
|
||||||
|
local CB_NAMES_COLORS = {
|
||||||
|
["white"] = "White cotton block",
|
||||||
|
["light_gray"] = "Light-gray cotton block",
|
||||||
|
["gray"] = "Gray cotton block",
|
||||||
|
["black"] = "Black cotton block",
|
||||||
|
["red"] = "Red cotton block",
|
||||||
|
["orange"] = "Orange cotton block",
|
||||||
|
["yellow"] = "Yellow cotton block",
|
||||||
|
["lime"] = "Lime cotton block",
|
||||||
|
["green"] = "Green cotton block",
|
||||||
|
["light_blue"] = "Light-blue cotton block",
|
||||||
|
["cyan"] = "Cyan cotton block",
|
||||||
|
["blue"] = "Blue cotton block",
|
||||||
|
["purple"] = "Purple cotton block",
|
||||||
|
["magenta"] = "Magenta cotton block",
|
||||||
|
["pink"] = "Pink cotton block",
|
||||||
|
["brown"] = "Brown cotton block",
|
||||||
|
}
|
||||||
|
|
||||||
|
function default.node_sound_cotton_defaults(table)
|
||||||
|
table = table or {}
|
||||||
|
table.footstep = table.footstep or
|
||||||
|
{name="cotton_blocks_cotton_step", gain=0.25}
|
||||||
|
table.dig = table.dig or
|
||||||
|
{name="cotton_blocks_cotton_step", gain=0.6}
|
||||||
|
table.dug = table.dug or
|
||||||
|
{name="", gain=1.0}
|
||||||
|
default.node_sound_defaults(table)
|
||||||
|
return table
|
||||||
|
end
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = 'cotton_blocks:white',
|
||||||
|
recipe = {
|
||||||
|
{'flowers:cotton','flowers:cotton'},
|
||||||
|
{'flowers:cotton','flowers:cotton'},
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
local addCBrecipe = function(new, first, second)
|
||||||
|
minetest.register_craft({
|
||||||
|
output = new,
|
||||||
|
recipe = {
|
||||||
|
{first, "dye:" .. second},
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = new,
|
||||||
|
recipe = {
|
||||||
|
{"dye:".. second, "dye:" .. first},
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = new,
|
||||||
|
recipe = {
|
||||||
|
{first},
|
||||||
|
{"dye:".. second},
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = new,
|
||||||
|
recipe = {
|
||||||
|
{"dye:".. second},
|
||||||
|
{first},
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = new,
|
||||||
|
recipe = {
|
||||||
|
{"dye:".. second,""},
|
||||||
|
{"",first},
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = new,
|
||||||
|
recipe = {
|
||||||
|
{first,""},
|
||||||
|
{"","dye:".. second},
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = new,
|
||||||
|
recipe = {
|
||||||
|
{"","dye:".. second},
|
||||||
|
{first,""},
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = new,
|
||||||
|
recipe = {
|
||||||
|
{"",first},
|
||||||
|
{"dye:".. second,""},
|
||||||
|
}
|
||||||
|
})
|
||||||
|
end
|
||||||
|
for color, name in pairs(CB_NAMES_COLORS) do
|
||||||
|
minetest.register_node("cotton_blocks:" .. color, {
|
||||||
|
description = name,
|
||||||
|
tile_images = {"cb_" .. color .. ".png"},
|
||||||
|
inventory_image = minetest.inventorycube("cb_" .. color .. ".png"),
|
||||||
|
is_ground_content = true,
|
||||||
|
groups = {snappy=3, cotton=1},
|
||||||
|
sounds = default.node_sound_cotton_defaults(),
|
||||||
|
stack_max = 128,
|
||||||
|
})
|
||||||
|
addCBrecipe("cotton_blocks:" .. color,"cotton_blocks:white",color)
|
||||||
|
addCBrecipe("cotton_blocks:white","cotton_blocks:" .. color,"white")
|
||||||
|
end
|
After Width: | Height: | Size: 315 B |
After Width: | Height: | Size: 436 B |
After Width: | Height: | Size: 409 B |
After Width: | Height: | Size: 482 B |
After Width: | Height: | Size: 313 B |
After Width: | Height: | Size: 453 B |
After Width: | Height: | Size: 501 B |
After Width: | Height: | Size: 432 B |
After Width: | Height: | Size: 490 B |
After Width: | Height: | Size: 485 B |
After Width: | Height: | Size: 453 B |
After Width: | Height: | Size: 496 B |
After Width: | Height: | Size: 506 B |
After Width: | Height: | Size: 428 B |
After Width: | Height: | Size: 422 B |
After Width: | Height: | Size: 334 B |