Add Remaining cherry nodes, textures, and cherry particles

This commit is contained in:
PrairieWind 2023-04-30 18:58:10 -06:00 committed by ancientmarinerdev
parent 74742f7fc8
commit 960f9adda8
17 changed files with 174 additions and 6 deletions

View File

@ -1,23 +1,86 @@
-- Crafting -- Crafting
local planks = "mcl_cherry_blossom:cherrywood"
local logs = "mcl_cherry_blossom:cherrytree"
local stripped_logs = "mcl_cherry_blossom:stripped_cherrytree"
minetest.register_craft({ minetest.register_craft({
output = "mcl_cherry_blossom:cherrytree_bark 3", output = "mcl_cherry_blossom:cherrytree_bark 3",
recipe = { recipe = {
{ "mcl_cherry_blossom:cherrytree", "mcl_cherry_blossom:cherrytree" }, { logs, logs },
{ "mcl_cherry_blossom:cherrytree", "mcl_cherry_blossom:cherrytree" }, { logs, logs },
} }
}) })
minetest.register_craft({ minetest.register_craft({
output = "mcl_cherry_blossom:stripped_cherrytree_bark 3", output = "mcl_cherry_blossom:stripped_cherrytree_bark 3",
recipe = { recipe = {
{ "mcl_cherry_blossom:stripped_cherrytree", "mcl_cherry_blossom:stripped_cherrytree" }, { stripped_logs, stripped_logs },
{ "mcl_cherry_blossom:stripped_cherrytree", "mcl_cherry_blossom:stripped_cherrytree" }, { stripped_logs, stripped_logs },
} }
}) })
minetest.register_craft({ minetest.register_craft({
output = "mcl_cherry_blossom:cherrywood 4", output = "mcl_cherry_blossom:cherrywood 4",
recipe = { 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,
})

View File

@ -26,3 +26,31 @@ minetest.register_abm({
mcl_cherry_blossom.generate_cherry_tree(pos) mcl_cherry_blossom.generate_cherry_tree(pos)
end, 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
})

View File

@ -1,3 +1,3 @@
title = mcl_cherry_blossom title = mcl_cherry_blossom
author = PrairieWind author = PrairieWind
depends = mcl_sounds, mcl_util, mcl_core depends = mcl_sounds, mcl_util, mcl_core, mcl_doors, mcl_stairs, mcl_signs, mcl_fences, mesecons_pressureplates, mesecons_button

View File

@ -185,3 +185,80 @@ minetest.register_node("mcl_cherry_blossom:cherrysapling", {
_mcl_blast_resistance = 0, _mcl_blast_resistance = 0,
_mcl_hardness = 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")

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB