diff --git a/mods/ITEMS/mcl_cherry_blossom/crafting.lua b/mods/ITEMS/mcl_cherry_blossom/crafting.lua index df5ae96be..16f4016b2 100644 --- a/mods/ITEMS/mcl_cherry_blossom/crafting.lua +++ b/mods/ITEMS/mcl_cherry_blossom/crafting.lua @@ -1,23 +1,86 @@ -- Crafting +local planks = "mcl_cherry_blossom:cherrywood" +local logs = "mcl_cherry_blossom:cherrytree" +local stripped_logs = "mcl_cherry_blossom:stripped_cherrytree" + minetest.register_craft({ output = "mcl_cherry_blossom:cherrytree_bark 3", recipe = { - { "mcl_cherry_blossom:cherrytree", "mcl_cherry_blossom:cherrytree" }, - { "mcl_cherry_blossom:cherrytree", "mcl_cherry_blossom:cherrytree" }, + { logs, logs }, + { logs, logs }, } }) minetest.register_craft({ output = "mcl_cherry_blossom:stripped_cherrytree_bark 3", recipe = { - { "mcl_cherry_blossom:stripped_cherrytree", "mcl_cherry_blossom:stripped_cherrytree" }, - { "mcl_cherry_blossom:stripped_cherrytree", "mcl_cherry_blossom:stripped_cherrytree" }, + { stripped_logs, stripped_logs }, + { stripped_logs, stripped_logs }, } }) minetest.register_craft({ output = "mcl_cherry_blossom:cherrywood 4", recipe = { - {"mcl_cherry_blossom:cherrytree"}, + { logs }, } }) + +minetest.register_craft({ + output = "mcl_chery_blossom:cherrydoor 3", + recipe = { + {planks, planks}, + {planks, planks}, + {planks, planks} + } +}) + +minetest.register_craft({ + output = "mcl_cherry_blossom:cherrytrapdoor 2", + recipe = { + {planks, planks, planks}, + {planks, planks, planks}, + } +}) + +minetest.register_craft({ + output = "mcl_fences:cherry_fence 3", + recipe = { + {planks, "mcl_core:stick", planks}, + {planks, "mcl_core:stick", planks}, + } +}) +minetest.register_craft({ + output = "mcl_fences:cherry_fence_gate", + recipe = { + {"mcl_core:stick", planks, "mcl_core:stick"}, + {"mcl_core:stick", planks, "mcl_core:stick"}, + } +}) + +mcl_signs.register_sign_craft("mcl_cherry_blossom", "mcl_cherry_blossom:cherrywood", "cherrywood") + +-- Smelting +minetest.register_craft({ + type = "fuel", + recipe = "mcl_cherry_blossom:cherrydoor", + burntime = 10, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "mcl_cherry_blossom:cherrytrapdoor", + burntime = 15, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "mcl_cherry_blossom:pressure_plate_cherrywood_off", + burntime = 15 +}) + +minetest.register_craft({ + type = "fuel", + recipe = "mesecons_button:button_cherrywood_off", + burntime = 5, +}) diff --git a/mods/ITEMS/mcl_cherry_blossom/growth.lua b/mods/ITEMS/mcl_cherry_blossom/growth.lua index fdfdb0da8..def5745ee 100644 --- a/mods/ITEMS/mcl_cherry_blossom/growth.lua +++ b/mods/ITEMS/mcl_cherry_blossom/growth.lua @@ -26,3 +26,31 @@ minetest.register_abm({ mcl_cherry_blossom.generate_cherry_tree(pos) end, }) + +local cherry_particle = { + velocity = vector.new(0,0,0), + size = math.random(1.3,2.5), + texture = "mcl_cherry_blossom_particle.png", + collision_removal = false, +} + + +minetest.register_abm({ + label = "Cherry Blossom Particles", + nodenames = {"mcl_cherry_blossom:cherryleaves"}, + interval = 5, + chance = 10, + action = function(pos, node) + minetest.after(math.random(0.1,1.5),function() + local pt = table.copy(cherry_particle) + pt.acceleration = vector.new(0,0,0) + pt.collisiondetection = false + pt.pos = vector.offset(pos,math.random(-0.5,0.5),-0.51,math.random(-0.5,0.5)) + minetest.add_particle(pt) + pt.acceleration = vector.new(0,-1,0) + pt.collisiondetection = true + pt.expirationtime = math.random(1.2,4.5) + minetest.add_particle(pt) + end) + end +}) diff --git a/mods/ITEMS/mcl_cherry_blossom/mod.conf b/mods/ITEMS/mcl_cherry_blossom/mod.conf index 7b7f3ac3a..2bac9fe34 100644 --- a/mods/ITEMS/mcl_cherry_blossom/mod.conf +++ b/mods/ITEMS/mcl_cherry_blossom/mod.conf @@ -1,3 +1,3 @@ title = mcl_cherry_blossom author = PrairieWind -depends = mcl_sounds, mcl_util, mcl_core \ No newline at end of file +depends = mcl_sounds, mcl_util, mcl_core, mcl_doors, mcl_stairs, mcl_signs, mcl_fences, mesecons_pressureplates, mesecons_button diff --git a/mods/ITEMS/mcl_cherry_blossom/nodes.lua b/mods/ITEMS/mcl_cherry_blossom/nodes.lua index 563869afb..0be759743 100644 --- a/mods/ITEMS/mcl_cherry_blossom/nodes.lua +++ b/mods/ITEMS/mcl_cherry_blossom/nodes.lua @@ -185,3 +185,80 @@ minetest.register_node("mcl_cherry_blossom:cherrysapling", { _mcl_blast_resistance = 0, _mcl_hardness = 0, }) + +-- Door and Trapdoor +mcl_doors:register_door("mcl_cherry_blossom:cherrydoor", { + description = S("Cherry Door"), + _doc_items_longdesc = S("Wooden doors are 2-block high barriers which can be opened or closed by hand and by a redstone signal."), + _doc_items_usagehelp = S("To open or close a wooden door, rightclick it or supply its lower half with a redstone signal."), + inventory_image = "mcl_cherry_blossom_door_inv.png", + groups = {handy=1,axey=1, material_wood=1, flammable=-1}, + _mcl_hardness = 3, + _mcl_blast_resistance = 3, + tiles_bottom = {"mcl_cherry_blossom_door_bottom.png", "mcl_cherry_blossom_door_side_bottom.png"}, + tiles_top = {"mcl_cherry_blossom_door_top.png", "mcl_cherry_blossom_door_side_top.png"}, + sounds = mcl_sounds.node_sound_wood_defaults(), +}) + +mcl_doors:register_trapdoor("mcl_cherry_blossom:cherrytrapdoor", { + description = S("Cherry Trapdoor"), + _doc_items_longdesc = S("Wooden trapdoors are horizontal barriers which can be opened and closed by hand or a redstone signal. They occupy the upper or lower part of a block, depending on how they have been placed. When open, they can be climbed like a ladder."), + _doc_items_usagehelp = S("To open or close the trapdoor, rightclick it or send a redstone signal to it."), + tile_front = "mcl_cherry_blossom_trapdoor.png", + tile_side = "mcl_cherry_blossom_trapdoor_side.png", + wield_image = "mcl_cherry_blossom_trapdoor.png", + groups = {handy=1,axey=1, mesecon_effector_on=1, material_wood=1, flammable=-1}, + _mcl_hardness = 3, + _mcl_blast_resistance = 3, + sounds = mcl_sounds.node_sound_wood_defaults(), +}) + +-- Stairs and Slabs +mcl_stairs.register_stair("cherrywood", "mcl_cherry_blossom:cherrywood", + {handy=1,axey=1, flammable=3,wood_stairs=1, material_wood=1, fire_encouragement=5, fire_flammability=20}, + {"mcl_cherry_blossom_planks.png"}, + S("Cherry Stairs"), + mcl_sounds.node_sound_wood_defaults(), 3, 2, + "woodlike") +mcl_stairs.register_slab("cherrywood", "mcl_cherry_blossom:cherrywood", + {handy=1,axey=1, flammable=3,wood_slab=1, material_wood=1, fire_encouragement=5, fire_flammability=20}, + {"mcl_cherry_blossom_planks.png"}, + S("Cherry Slab"), + mcl_sounds.node_sound_wood_defaults(), 3, 2, + S("Double Cherry Slab")) + +-- Signs +mcl_signs.register_sign_custom("mcl_cherry_blossom", "cherrywood", + "mcl_cherry_blossom_sign.png", "#000000", + "mcl_cherry_blossom_sign_inv.png", "mcl_cherry_blossom_sign_inv.png", "Cherry Sign") + +-- Fences & Gates +mcl_fences.register_fence_and_fence_gate("cherry_fence", S("Cherry Fence"), S("Cherry Gate"), + "mcl_cherry_blossom_planks.png", {handy=1, axey=1, flammable=2, fence_wood=1, fire_encouragement=5, fire_flammability=20}, 2, 15, + {"group:fence_wood"}, mcl_sounds.node_sound_wood_defaults()) + +-- Redstone +mesecon.register_pressure_plate( + "mcl_cherry_blossom:pressure_plate_cherrywood", + S("Cherry Pressure Plate"), + {"mcl_cherry_blossom_planks.png"}, + {"mcl_cherry_blossom_planks.png"}, + "mcl_cherry_blossom_planks.png", + nil, + {{"mcl_cherry_blossom:cherrywood", "mcl_cherry_blossom:cherrywood"}}, + mcl_sounds.node_sound_wood_defaults(), + {axey=1, material_wood=1}, + nil, + S("A wooden pressure plate is a redstone component which supplies its surrounding blocks with redstone power while any movable object (including dropped items, players and mobs) rests on top of it.")) + +mesecon.register_button( + "cherrywood", + S("Cherry Button"), + "mcl_cherry_blossom_planks.png", + "mcl_cherry_blossom:cherrywood", + mcl_sounds.node_sound_wood_defaults(), + {material_wood=1,handy=1,axey=1}, + 1.5, + true, + S("A wooden button is a redstone component made out of wood which can be pushed to provide redstone power. When pushed, it powers adjacent redstone components for 1.5 seconds. Wooden buttons may also be pushed by arrows."), + "mesecons_button_push_wood") diff --git a/textures/mcl_cherry_blossom_boat.png b/textures/mcl_cherry_blossom_boat.png new file mode 100644 index 000000000..9d79a9d87 Binary files /dev/null and b/textures/mcl_cherry_blossom_boat.png differ diff --git a/textures/mcl_cherry_blossom_boat_inv.png b/textures/mcl_cherry_blossom_boat_inv.png new file mode 100644 index 000000000..f19e32ef3 Binary files /dev/null and b/textures/mcl_cherry_blossom_boat_inv.png differ diff --git a/textures/mcl_cherry_blossom_boat_with_chest_inv.png b/textures/mcl_cherry_blossom_boat_with_chest_inv.png new file mode 100644 index 000000000..39f648f5e Binary files /dev/null and b/textures/mcl_cherry_blossom_boat_with_chest_inv.png differ diff --git a/textures/mcl_cherry_blossom_door_bottom.png b/textures/mcl_cherry_blossom_door_bottom.png new file mode 100644 index 000000000..9c99a8ed3 Binary files /dev/null and b/textures/mcl_cherry_blossom_door_bottom.png differ diff --git a/textures/mcl_cherry_blossom_door_inv.png b/textures/mcl_cherry_blossom_door_inv.png new file mode 100644 index 000000000..fec36f0e5 Binary files /dev/null and b/textures/mcl_cherry_blossom_door_inv.png differ diff --git a/textures/mcl_cherry_blossom_door_side_bottom.png b/textures/mcl_cherry_blossom_door_side_bottom.png new file mode 100644 index 000000000..e9972feba Binary files /dev/null and b/textures/mcl_cherry_blossom_door_side_bottom.png differ diff --git a/textures/mcl_cherry_blossom_door_side_top.png b/textures/mcl_cherry_blossom_door_side_top.png new file mode 100644 index 000000000..8381c5fa2 Binary files /dev/null and b/textures/mcl_cherry_blossom_door_side_top.png differ diff --git a/textures/mcl_cherry_blossom_door_top.png b/textures/mcl_cherry_blossom_door_top.png new file mode 100644 index 000000000..4759912c3 Binary files /dev/null and b/textures/mcl_cherry_blossom_door_top.png differ diff --git a/textures/mcl_cherry_blossom_particle.png b/textures/mcl_cherry_blossom_particle.png new file mode 100644 index 000000000..6efebffcf Binary files /dev/null and b/textures/mcl_cherry_blossom_particle.png differ diff --git a/textures/mcl_cherry_blossom_sign.png b/textures/mcl_cherry_blossom_sign.png new file mode 100644 index 000000000..2c1f7e31b Binary files /dev/null and b/textures/mcl_cherry_blossom_sign.png differ diff --git a/textures/mcl_cherry_blossom_sign_inv.png b/textures/mcl_cherry_blossom_sign_inv.png new file mode 100644 index 000000000..9be3e2cb8 Binary files /dev/null and b/textures/mcl_cherry_blossom_sign_inv.png differ diff --git a/textures/mcl_cherry_blossom_trapdoor.png b/textures/mcl_cherry_blossom_trapdoor.png new file mode 100644 index 000000000..9c87be48f Binary files /dev/null and b/textures/mcl_cherry_blossom_trapdoor.png differ diff --git a/textures/mcl_cherry_blossom_trapdoor_side.png b/textures/mcl_cherry_blossom_trapdoor_side.png new file mode 100644 index 000000000..56f5e9fb8 Binary files /dev/null and b/textures/mcl_cherry_blossom_trapdoor_side.png differ