-minetest.register_craft({
- output = "xdecor:barrel",
- recipe = {
- {"group:wood", "group:wood", "group:wood"},
- {"default:iron_lump", "", "default:iron_lump"},
- {"group:wood", "group:wood", "group:wood"}
- } })
-
-minetest.register_craftitem("xdecor:brass_ingot", {
- description = "Brass ingot", inventory_image = "xdecor_brass_ingot.png" })
-
-minetest.register_craft({
- type = "shapeless", output = "xdecor:brass_ingot",
- recipe = {"default:copper_ingot", "moreores:tin_ingot"} })
-
-minetest.register_craft({
- output = "xdecor:cabinet",
- recipe = {
- {"group:wood", "group:wood", "group:wood"},
- {"doors:trapdoor", "", "doors:trapdoor"},
- {"group:wood", "group:wood", "group:wood"}
- } })
-
-minetest.register_craft({
- output = "xdecor:cabinet_half 2", recipe = {{"xdecor:cabinet"}} })
-
-minetest.register_craft({
- type = "shapeless", output = "xdecor:candle", recipe = {"default:torch"} })
-
-minetest.register_craft({
- output = "xdecor:cardboard_box",
- recipe = {
- {"default:paper", "default:paper", "default:paper"},
- {"default:paper", "default:paper", "default:paper"}
- } })
-
-minetest.register_craft({
- output = "xdecor:cauldron",
- recipe = {
- {"default:iron_lump", "", "default:iron_lump"},
- {"default:iron_lump", "default:water_source", "default:iron_lump"},
- {"default:iron_lump", "default:iron_lump", "default:iron_lump"}
- } })
-
-minetest.register_craft({
- output = "xdecor:chair",
- recipe = {
- {"group:stick", "", ""},
- {"group:stick", "group:stick", "group:stick"},
- {"group:stick", "", "group:stick"}
- } })
-
-minetest.register_craft({
- output = "xdecor:coalstone_tile 8",
- recipe = {
- {"default:coalblock", "default:stone"},
- {"default:stone", "default:coalblock"}
- } })
-
-minetest.register_craft({
- output = "xdecor:cushion 2", recipe = {{"wool:red", "wool:red", "wool:red"}} })
-
-minetest.register_craft({
- output = "xdecor:fence_brass 2",
- recipe = {
- {"xdecor:brass_ingot", "xdecor:brass_ingot", "xdecor:brass_ingot"},
- {"xdecor:brass_ingot", "xdecor:brass_ingot", "xdecor:brass_ingot"}
- } })
-
-minetest.register_craft({
- output = "xdecor:fence_wrought_iron 2",
- recipe = {
- {"default:iron_lump", "default:iron_lump", "default:iron_lump"},
- {"default:iron_lump", "default:iron_lump", "default:iron_lump"}
- } })
-
-minetest.register_craft({
- type = "shapeless", output = "xdecor:flint_steel",
- recipe = {"default:obsidian_shard", "default:steel_ingot"} })
-
-minetest.register_craft({
- output = "xdecor:frame",
- recipe = {
- {"group:stick", "group:stick", "group:stick"},
- {"group:stick", "default:paper", "group:stick"},
- {"group:stick", "group:stick", "group:stick"},
- } })
-
-minetest.register_craft({
- type = "shapeless", output = "xdecor:moonbrick",
- recipe = {"default:brick", "default:stone"} })
-
-minetest.register_craft({
- output = "xdecor:multishelf",
- recipe = {
- {"group:wood", "group:wood", "group:wood"},
- {"group:vessel", "group:book", "group:vessel"},
- {"group:wood", "group:wood", "group:wood"}
- } })
-
-minetest.register_craft({
- type = "shapeless", output = "xdecor:painting",
- recipe = {"default:sign_wall", "dye:blue"} })
-
-minetest.register_craft({
- output = "xdecor:plant_pot",
- recipe = {
- {"default:clay_lump", "", "default:clay_lump"},
- {"default:clay_lump", "default:dirt", "default:clay_lump"},
- {"default:clay_lump", "default:clay_lump", "default:clay_lump"}
- } })
-
-minetest.register_craft({
- output = "xdecor:rope 2",
- recipe = {
- {"farming:string"},
- {"farming:string"},
- {"farming:string"}
- } })
-
-minetest.register_craft({
- output = "xdecor:table",
- recipe = {
- {"stairs:slab_wood", "stairs:slab_wood", "stairs:slab_wood"},
- {"", "group:stick", ""},
- {"", "group:stick", ""}
- } })
-
-minetest.register_craft({
- output = "xdecor:tv",
- recipe = {
- {"default:steel_ingot", "default:copper_ingot", "default:steel_ingot"},
- {"default:steel_ingot", "default:glass", "default:steel_ingot"},
- {"default:steel_ingot", "default:copper_ingot", "default:steel_ingot"}
- } })
-
-minetest.register_craft({
- output = "xdecor:workbench",
- recipe = {
- {"group:wood", "group:wood", "group:wood"},
- {"default:steel_ingot", "default:steel_ingot", "default:steel_ingot"},
- {"group:wood", "group:wood", "group:wood"}
- } })
-
-minetest.register_craft({
- output = "xdecor:wood_tile 2",
- recipe = {
- {"group:wood", "group:wood"},
- {"group:wood", "group:wood"}
- } })
+minetest.register_craft({ output = "xdecor:candle", recipe = {{"default:torch"}} })
+minetest.register_craft({ output = "xdecor:cabinet_half 2", recipe = {{"xdecor:cabinet"}} })
+minetest.register_craft({ output = "xdecor:cushion 2", recipe = {{"wool:red", "wool:red"}} })
+minetest.register_craft({ output = "xdecor:painting", recipe = {{"default:sign_wall", "dye:blue"}} })
+minetest.register_craft({ output = "xdecor:moonbrick", recipe = {{"default:brick", "default:stone"}} })
+minetest.register_craft({ output = "xdecor:flint_steel", recipe = {{"default:obsidian_shard", "default:steel_ingot"}} })
+
+minetest.register_craft({ output = "xdecor:barrel", recipe = {
+ {"group:wood", "group:wood", "group:wood"},
+ {"default:iron_lump", "", "default:iron_lump"},
+ {"group:wood", "group:wood", "group:wood"} } })
+
+minetest.register_craft({ output = "xdecor:cabinet", recipe = {
+ {"group:wood", "group:wood", "group:wood"},
+ {"doors:trapdoor", "", "doors:trapdoor"},
+ {"group:wood", "group:wood", "group:wood"} } })
+
+minetest.register_craft({ output = "xdecor:cardboard_box", recipe = {
+ {"default:paper", "default:paper", "default:paper"},
+ {"default:paper", "default:paper", "default:paper"} } })
+
+minetest.register_craft({ output = "xdecor:cauldron", recipe = {
+ {"default:iron_lump", "", "default:iron_lump"},
+ {"default:iron_lump", "default:water_source", "default:iron_lump"},
+ {"default:iron_lump", "default:iron_lump", "default:iron_lump"} } })
+
+minetest.register_craft({ output = "xdecor:chair", recipe = {
+ {"group:stick", "", ""},
+ {"group:stick", "group:stick", "group:stick"},
+ {"group:stick", "", "group:stick"} } })
+
+minetest.register_craft({ output = "xdecor:coalstone_tile 8", recipe = {
+ {"default:coalblock", "default:stone"},
+ {"default:stone", "default:coalblock"} } })
+
+minetest.register_craft({ output = "xdecor:fence_wrought_iron 2", recipe = {
+ {"default:iron_lump", "default:iron_lump", "default:iron_lump"},
+ {"default:iron_lump", "default:iron_lump", "default:iron_lump"} } })
+
+minetest.register_craft({ output = "xdecor:frame", recipe = {
+ {"group:stick", "group:stick", "group:stick"},
+ {"group:stick", "default:paper", "group:stick"},
+ {"group:stick", "group:stick", "group:stick"} } })
+
+minetest.register_craft({ output = "xdecor:multishelf", recipe = {
+ {"group:wood", "group:wood", "group:wood"},
+ {"group:vessel", "group:book", "group:vessel"},
+ {"group:wood", "group:wood", "group:wood"} } })
+
+minetest.register_craft({ output = "xdecor:plant_pot", recipe = {
+ {"default:clay_lump", "", "default:clay_lump"},
+ {"default:clay_lump", "default:dirt", "default:clay_lump"},
+ {"default:clay_lump", "default:clay_lump", "default:clay_lump"} } })
+
+minetest.register_craft({ output = "xdecor:rope 2", recipe = {
+ {"farming:string"},
+ {"farming:string"},
+ {"farming:string"} } })
+
+minetest.register_craft({ output = "xdecor:table", recipe = {
+ {"stairs:slab_wood", "stairs:slab_wood", "stairs:slab_wood"},
+ {"", "group:stick", ""},
+ {"", "group:stick", ""} } })
+
+minetest.register_craft({ output = "xdecor:tv", recipe = {
+ {"default:steel_ingot", "default:copper_ingot", "default:steel_ingot"},
+ {"default:steel_ingot", "default:glass", "default:steel_ingot"},
+ {"default:steel_ingot", "default:copper_ingot", "default:steel_ingot"} } })
+
+minetest.register_craft({ output = "xdecor:workbench", recipe = {
+ {"group:wood", "group:wood", "group:wood"},
+ {"default:steel_ingot", "default:steel_ingot", "default:steel_ingot"},
+ {"group:wood", "group:wood", "group:wood"} } })
+
+minetest.register_craft({ output = "xdecor:wood_tile 2", recipe = {
+ {"group:wood", "group:wood"},
+ {"group:wood", "group:wood"} } })
local tmp = {}
screwdriver = screwdriver or {}
-minetest.register_entity("xdecor:f_item",{
+minetest.register_entity("xdecor:f_item", {
hp_max = 1, visual="wielditem", visual_size={x=.33,y=.33},
collisionbox = {0, 0, 0, 0, 0, 0}, physical=false, textures={"air"},
on_activate = function(self, staticdata)
return self.nodename .. ';' .. self.texture
end
return ""
- end,
+ end
})
local remove_item = function(pos, node)
local objs = nil
objs = minetest.get_objects_inside_radius(pos, .5)
-
if objs then
for _, obj in ipairs(objs) do
if obj and obj:get_luaentity() and obj:get_luaentity().name == "xdecor:f_item" then
local update_item = function(pos, node)
remove_item(pos, node)
local meta = minetest.get_meta(pos)
-
if meta:get_string("item") ~= "" then
local posad = facedir[node.param2]
if not posad then return end
pos.z = pos.z + posad.z*6.5/16
tmp.nodename = node.name
tmp.texture = ItemStack(meta:get_string("item")):get_name()
-
local e = minetest.add_entity(pos, "xdecor:f_item")
local yaw = math.pi*2 - node.param2 * math.pi/2
e:setyaw(yaw)
end
xdecor.register("frame", {
- description = "Item frame",
+ description = "Item frame", groups = {snappy=3}, on_rotate = screwdriver.disallow,
node_box = { type = "fixed", fixed = {-0.5, -0.5, 7/16, 0.5, 0.5, 0.5} },
- tiles = {"xdecor_frame.png"},
- inventory_image = "xdecor_frame.png",
- groups = {snappy=3},
- on_rotate = screwdriver.disallow,
+ tiles = {"xdecor_frame.png"}, inventory_image = "xdecor_frame.png",
after_place_node = function(pos, placer, itemstack)
local meta = minetest.get_meta(pos)
meta:set_string("owner", placer:get_player_name())
local meta = minetest.get_meta(pos)
return player:get_player_name() == meta:get_string("owner")
end,
- after_destruct = remove_item,
+ after_destruct = remove_item
})
minetest.register_abm({
- nodenames = {"xdecor:frame"},
- interval = 15,
- chance = 1,
+ nodenames = {"xdecor:frame"}, interval = 15, chance = 1,
action = function(pos, node, active_object_count, active_object_count_wider)
if #minetest.get_objects_inside_radius(pos, 0.5) > 0 then return end
update_item(pos, node)
xdecor.register("barrel", {
- description = "Barrel", infotext = "Barrel", inventory = {size=24},
+ description = "Barrel", inventory = {size=24},
tiles = {"xdecor_barrel_top.png", "xdecor_barrel_sides.png"},
groups = {snappy=3}, sounds = default.node_sound_wood_defaults() })
xdecor.register("cabinet", {
- description = "Cabinet", infotext = "Cabinet", inventory = {size=24},
+ description = "Cabinet", inventory = {size=24},
tiles = {"default_wood.png", "xdecor_cabinet_front.png"},
groups = {snappy=3}, sounds = default.node_sound_wood_defaults() })
xdecor.register("cabinet_half", {
- description = "Cabinet half", infotext = "Cabinet (half)", inventory = {size=8},
+ description = "Half Cabinet", inventory = {size=8},
tiles = {"default_wood.png", "xdecor_cabinet_half_front.png"},
groups = {snappy=3}, sounds = default.node_sound_wood_defaults(),
node_box = {type="fixed", fixed={{-0.5, 0, -0.5, 0.5, 0.5, 0.5}}} })
wall_side={-0.5, -0.35, -0.15, -0.15, 0.4, 0.15}} })
xdecor.register("cardboard_box", {
- description = "Cardboard box", groups = {snappy=3}, inventory = {size=8},
+ description = "Cardboard Box", groups = {snappy=3}, inventory = {size=8},
tiles = {"xdecor_cardbox_top.png", "xdecor_cardbox_top.png", "xdecor_cardbox_sides.png"},
node_box = {type="fixed", fixed={{-0.3125, -0.5, -0.3125, 0.3125, 0, 0.3125}}} })
{0.1875, -0.5, -0.3125, 0.3125, -0.125, -0.1875}, {-0.3125, -0.125, -0.3125, 0.3125, 0, 0.1875}}} })
xdecor.register("coalstone_tile", {
- description = "Coalstone tile", tiles = {"xdecor_coalstone_tile.png"},
+ description = "Coalstone Tile", tiles = {"xdecor_coalstone_tile.png"},
groups = {snappy=3}, sounds = default.node_sound_stone_defaults() })
-local curtaincolors = { {"red", "#ad2323e0:175"} }
+local curtaincolors = { {"red", "#ad2323e0:175"} } -- add more curtains simply here
for c in ipairs(curtaincolors) do
local color = curtaincolors[c][1]
local hue = curtaincolors[c][2]
groups = {snappy=3}, on_place = minetest.rotate_node,
node_box = {type="fixed", fixed={{-0.5, -0.5, -0.5, 0.5, 0, 0.5}}} })
-fencematerial = {"brass", "wrought_iron"}
-for _, m in ipairs(fencematerial) do
-xdecor.register("fence_"..m, {
- description = "Fence ("..m..")", drawtype = "fencelike", tiles = {"xdecor_"..m..".png"},
- inventory_image = "default_fence_overlay.png^xdecor_"..m..".png^default_fence_overlay.png^[makealpha:255,126,126",
- groups = {snappy=3}, sounds = default.node_sound_wood_defaults() })
-end
+xdecor.register("fence_wrought_iron", {
+ description = "Wrought Iron Fence", drawtype = "fencelike", tiles = {"default_stone.png^[colorize:#2a2420:180"},
+ inventory_image = "default_fence_overlay.png^default_stone.png^[colorize:#2a2420:160^default_fence_overlay.png^[makealpha:255,126,126",
+ groups = {snappy=3} })
xdecor.register("fire", {
- description = "Fake fire", light_source = 14, walkable = false,
+ description = "Fake Fire", light_source = 14, walkable = false,
tiles = {{name="xdecor_fire_anim.png", animation={type="vertical_frames", length=1.5}}},
drawtype = "plantlike", damage_per_second = 2, drop = "",
groups = {dig_immediate=3, not_in_creative_inventory=1} })
minetest.register_tool("xdecor:flint_steel", {
- description = "Flint and steel", stack_max = 1, inventory_image = "xdecor_flint_steel.png",
+ description = "Flint & Steel", stack_max = 1, inventory_image = "xdecor_flint_steel.png",
tool_capabilities = {groupcaps={flamable={uses=65, maxlevel=1}}},
on_use = function(itemstack, user, pointed_thing)
if pointed_thing.type == "node" and minetest.get_node(pointed_thing.above).name == "air" then
flowerstype = {"dandelion_white", "dandelion_yellow", "geranium", "rose", "tulip", "viola"}
for _, f in ipairs(flowerstype) do
xdecor.register("potted_"..f, {
- description = "Potted flowers ("..f..")", walkable = false,
+ description = "Potted Flowers ("..f..")", walkable = false,
tiles = {"xdecor_"..f.."_pot.png"}, inventory_image = "xdecor_"..f.."_pot.png",
drawtype = "plantlike", groups = {dig_immediate=3}, sounds = default.node_sound_leaves_defaults() })
groups = {dig_immediate=3, attached_node=1}, sounds = default.node_sound_wood_defaults() })
xdecor.register("plant_pot", {
- description = "Plant pot", groups = {snappy=3},
+ description = "Plant Pot", groups = {snappy=3},
tiles = {"xdecor_plant_pot_top.png", "xdecor_plant_pot_sides.png"} })
xdecor.register("moonbrick", {
groups = {snappy=3}, sounds = default.node_sound_stone_defaults() })
xdecor.register("multishelf", {
- description = "Multishelf", infotext = "Multishelf", inventory = {size=24},
+ description = "Multishelf", inventory = {size=24},
tiles = {"default_wood.png", "xdecor_multishelf.png"},
groups = {snappy=3}, sounds = default.node_sound_wood_defaults() })
local rope_sbox = {type="fixed", fixed={-0.15, -0.5, -0.15, 0.15, 0.5, 0.15}}
xdecor.register("rope", {
- description = "Hanging rope", walkable = false, climbable = true,
+ description = "Rope", walkable = false, climbable = true,
tiles = {"xdecor_rope.png"}, inventory_image = "xdecor_rope_inv.png",
drawtype = "plantlike", groups = {dig_immediate=3}, selection_box = rope_sbox })
xdecor.register("tv", {
description = "Television", light_source = 11, groups = {snappy=3},
- tiles = {"xdecor_television_top.png", "xdecor_television_left.png^[transformR90",
+ tiles = {"xdecor_television_left.png^[transformR270", "xdecor_television_left.png^[transformR90",
"xdecor_television_left.png^[transformFX", "xdecor_television_left.png",
"xdecor_television_back.png", {name="xdecor_television_front_animated.png",
animation = {type="vertical_frames", length=80.0}}} })
xdecor.register("wood_tile", {
- description = "Wood tile", tiles = {"xdecor_wood_tile.png"},
+ description = "Wood Tile", tiles = {"xdecor_wood_tile.png"},
groups = {snappy=3}, sounds = default.node_sound_wood_defaults() })
xdecor.register("workbench", {
- description = "Work table", infotext = "Work bench", inventory = {size=24},
+ description = "Work Bench", inventory = {size=24},
groups = {snappy=3}, sounds = default.node_sound_wood_defaults(),
tiles = {"xdecor_workbench_top.png", "xdecor_workbench_top.png",
"xdecor_workbench_sides.png", "xdecor_workbench_sides.png",