Merge pull request 'Cherry Blossoms' (#3749) from cherry_blossom into master
Reviewed-on: MineClone2/MineClone2#3749 Reviewed-by: ancientmarinerdev <ancientmariner_dev@proton.me>
|
@ -437,9 +437,9 @@ cboat.selectionbox = {-0.7, -0.15, -0.7, 0.7, 0.75, 0.7}
|
|||
minetest.register_entity("mcl_boats:chest_boat", cboat)
|
||||
mcl_entity_invs.register_inv("mcl_boats:chest_boat","Boat",27)
|
||||
|
||||
local boat_ids = { "boat", "boat_spruce", "boat_birch", "boat_jungle", "boat_acacia", "boat_dark_oak", "boat_obsidian", "boat_mangrove", "chest_boat", "chest_boat_spruce", "chest_boat_birch", "chest_boat_jungle", "chest_boat_acacia", "chest_boat_dark_oak", "chest_boat_mangrove" }
|
||||
local names = { S("Oak Boat"), S("Spruce Boat"), S("Birch Boat"), S("Jungle Boat"), S("Acacia Boat"), S("Dark Oak Boat"), S("Obsidian Boat"), S("Mangrove Boat"), S("Oak Chest Boat"), S("Spruce Chest Boat"), S("Birch Chest Boat"), S("Jungle Chest Boat"), S("Acacia Chest Boat"), S("Dark Oak Chest Boat"), S("Mangrove Chest Boat") }
|
||||
local craftstuffs = { "mcl_core:wood", "mcl_core:sprucewood", "mcl_core:birchwood", "mcl_core:junglewood", "mcl_core:acaciawood", "mcl_core:darkwood", "mcl_core:obsidian", "mcl_mangrove:mangrove_wood" }
|
||||
local boat_ids = { "boat", "boat_spruce", "boat_birch", "boat_jungle", "boat_acacia", "boat_dark_oak", "boat_obsidian", "boat_mangrove", "boat_cherry", "chest_boat", "chest_boat_spruce", "chest_boat_birch", "chest_boat_jungle", "chest_boat_acacia", "chest_boat_dark_oak", "chest_boat_mangrove", "chest_boat_cherry" }
|
||||
local names = { S("Oak Boat"), S("Spruce Boat"), S("Birch Boat"), S("Jungle Boat"), S("Acacia Boat"), S("Dark Oak Boat"), S("Obsidian Boat"), S("Mangrove Boat"), S("Cherry Boat"), S("Oak Chest Boat"), S("Spruce Chest Boat"), S("Birch Chest Boat"), S("Jungle Chest Boat"), S("Acacia Chest Boat"), S("Dark Oak Chest Boat"), S("Mangrove Chest Boat"), S("Cherry Chest Boat") }
|
||||
local craftstuffs = { "mcl_core:wood", "mcl_core:sprucewood", "mcl_core:birchwood", "mcl_core:junglewood", "mcl_core:acaciawood", "mcl_core:darkwood", "mcl_core:obsidian", "mcl_mangrove:mangrove_wood", "mcl_cherry_blossom:cherrywood" }
|
||||
|
||||
for b=1, #boat_ids do
|
||||
local itemstring = "mcl_boats:"..boat_ids[b]
|
||||
|
|
|
@ -12,6 +12,7 @@ Water vehicle=
|
|||
Sneak to dismount=
|
||||
Obsidian Boat=
|
||||
Mangrove Boat=
|
||||
Cherry Boat=
|
||||
Oak Chest Boat=
|
||||
Spruce Chest Boat=
|
||||
Birch Chest Boat=
|
||||
|
@ -19,3 +20,4 @@ Jungle Chest Boat=
|
|||
Acacia Chest Boat=
|
||||
Dark Oak Chest Boat=
|
||||
Mangrove Chest Boat=
|
||||
Cherry Chest Boat=
|
|
@ -104,6 +104,14 @@ function mesecon.register_button(basename, description, texture, recipeitem, sou
|
|||
end
|
||||
button_sounds["mesecons_button:button_"..basename.."_off"] = button_sound
|
||||
|
||||
if not longdesc then
|
||||
if groups_off.material_wood ~= 0 then
|
||||
longdesc = 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.")
|
||||
else
|
||||
longdesc = S("A button is a redstone compent which can be pushed to provide redstone power. When pushed, it powers adjacent redstone components for @1 seconds.", button_timer)
|
||||
end
|
||||
end
|
||||
|
||||
if push_by_arrow then
|
||||
groups_off.button_push_by_arrow = 1
|
||||
groups_on.button_push_by_arrow = 1
|
||||
|
@ -252,7 +260,7 @@ for w=1, #woods do
|
|||
{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."),
|
||||
nil,
|
||||
"mesecons_button_push_wood")
|
||||
|
||||
minetest.register_craft({
|
||||
|
|
|
@ -17,3 +17,4 @@ A wooden button is a redstone component made out of wood which can be pushed to
|
|||
Provides redstone power when pushed=
|
||||
Push duration: @1s=
|
||||
Pushable by arrow=
|
||||
A button is a redstone compent which can be pushed to provide redstone power. When pushed, it powers adjacent redstone components for @1 seconds.=
|
||||
|
|
|
@ -153,7 +153,11 @@ function mesecon.register_pressure_plate(basename, description, textures_off, te
|
|||
groups_on.not_in_creative_inventory = 1
|
||||
groups_on.pressure_plate = 2
|
||||
if not longdesc then
|
||||
longdesc = S("A pressure plate is a redstone component which supplies its surrounding blocks with redstone power while someone or something rests on top of it.")
|
||||
if groups_off.material_wood ~= 0 then
|
||||
longdesc = 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.")
|
||||
else
|
||||
longdesc = S("A pressure plate is a redstone component which supplies its surrounding blocks with redstone power while someone or something rests on top of it.")
|
||||
end
|
||||
end
|
||||
local tt = S("Provides redstone power when pushed")
|
||||
if not activated_by then
|
||||
|
@ -238,8 +242,7 @@ for w=1, #woods do
|
|||
{{woods[w][2], woods[w][2]}},
|
||||
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."))
|
||||
nil)
|
||||
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
|
|
|
@ -0,0 +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 = {
|
||||
{ logs, logs },
|
||||
{ logs, logs },
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "mcl_cherry_blossom:stripped_cherrytree_bark 3",
|
||||
recipe = {
|
||||
{ stripped_logs, stripped_logs },
|
||||
{ stripped_logs, stripped_logs },
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "mcl_cherry_blossom:cherrywood 4",
|
||||
recipe = {
|
||||
{ logs },
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "mcl_cherry_blossom:cherry_door 3",
|
||||
recipe = {
|
||||
{planks, planks},
|
||||
{planks, planks},
|
||||
{planks, planks}
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "mcl_cherry_blossom:cherry_trapdoor 2",
|
||||
recipe = {
|
||||
{planks, planks, planks},
|
||||
{planks, planks, planks},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "mcl_cherry_blossom:cherry_fence 3",
|
||||
recipe = {
|
||||
{planks, "mcl_core:stick", planks},
|
||||
{planks, "mcl_core:stick", planks},
|
||||
}
|
||||
})
|
||||
minetest.register_craft({
|
||||
output = "mcl_cherry_blossom: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:cherry_door",
|
||||
burntime = 10,
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "mcl_cherry_blossom:cherry_trapdoor",
|
||||
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,
|
||||
})
|
|
@ -0,0 +1,53 @@
|
|||
-- Tree Growth
|
||||
-- TODO: Use better spawning behavior and wood api when wood api is finished.
|
||||
function mcl_cherry_blossom.generate_cherry_tree(pos)
|
||||
local pr = PseudoRandom(pos.x+pos.y+pos.z)
|
||||
local r = pr:next(1,3)
|
||||
local modpath = minetest.get_modpath("mcl_cherry_blossom")
|
||||
local path = modpath.."/schematics/mcl_cherry_blossom_tree_"..tostring(r)..".mts"
|
||||
if mcl_core.check_growth_width(pos,7,8) then
|
||||
minetest.set_node(pos, {name = "air"})
|
||||
if r == 1 then
|
||||
minetest.place_schematic(vector.offset(pos, -2, 0, -2), path, "random", nil, false)
|
||||
elseif r == 2 then
|
||||
minetest.place_schematic(vector.offset(pos, -2, 0, -2), path, nil, nil, false)
|
||||
elseif r == 3 then
|
||||
minetest.place_schematic(vector.offset(pos, -3, 0, -3), path, nil, nil, false)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
minetest.register_abm({
|
||||
label = "Cherry Tree Growth",
|
||||
nodenames = "mcl_cherry_blossom:cherrysapling",
|
||||
interval = 30,
|
||||
chance = 5,
|
||||
action = function(pos,node)
|
||||
mcl_cherry_blossom.generate_cherry_tree(pos)
|
||||
end,
|
||||
})
|
||||
|
||||
local cherry_particle = {
|
||||
velocity = vector.zero(),
|
||||
acceleration = vector.new(0,-1,0),
|
||||
size = math.random(1.3,2.5),
|
||||
texture = "mcl_cherry_blossom_particle.png",
|
||||
collision_removal = false,
|
||||
collisiondetection = 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.pos = vector.offset(pos,math.random(-0.5,0.5),-0.51,math.random(-0.5,0.5))
|
||||
pt.expirationtime = math.random(1.2,4.5)
|
||||
minetest.add_particle(pt)
|
||||
end)
|
||||
end
|
||||
})
|
|
@ -0,0 +1,6 @@
|
|||
mcl_cherry_blossom = {}
|
||||
local modpath = minetest.get_modpath("mcl_cherry_blossom")
|
||||
|
||||
dofile(modpath.."/nodes.lua") -- Load Nodes
|
||||
dofile(modpath.."/crafting.lua") -- Load Crafting Recipes
|
||||
dofile(modpath.."/growth.lua") -- Load Cherry Blossom Tree Growth
|
|
@ -0,0 +1,24 @@
|
|||
# textdomain: mcl_cherry_blossom
|
||||
Cherry Log=
|
||||
The trunk of a cherry blossom tree.=
|
||||
Stripped Cherry Log=
|
||||
The stripped trunk of a cherry blossom tree.=
|
||||
Cherry Bark=
|
||||
This is a decorative block surrounded by the bark of a tree trunk.=
|
||||
Stripped Cherry Wood=
|
||||
The stripped wood of a cherry blossom tree.=
|
||||
Cherry Wood Planks=
|
||||
Cherry Leaves=
|
||||
Cherry blossom leaves are grown from cherry blossom trees.=
|
||||
Cherry Sapling=
|
||||
Cherry blossom sapling can be planted to grow cherry trees.=
|
||||
Cherry Door=
|
||||
Cherry Trapdoor=
|
||||
Cherry Stairs=
|
||||
Cherry Slab=
|
||||
Double Cherry Slab=
|
||||
Cherry Sign=
|
||||
Cherry Fence=
|
||||
Cherry Gate=
|
||||
Cherry Pressure Plate=
|
||||
Cherry Button=
|
|
@ -0,0 +1,3 @@
|
|||
name = mcl_cherry_blossom
|
||||
author = PrairieWind, Wbjitscool, SmokeyDope
|
||||
depends = mcl_sounds, mcl_util, mcl_core, mcl_doors, mcl_stairs, mcl_signs, mcl_fences, mesecons_pressureplates, mesecons_button, mcl_boats
|
|
@ -0,0 +1,96 @@
|
|||
local S = minetest.get_translator(minetest.get_current_modname())
|
||||
|
||||
-- Logs
|
||||
mcl_core.register_tree_trunk("cherrytree", S("Cherry Log"), S("Cherry Bark"),
|
||||
S("The trunk of a cherry blossom tree."),
|
||||
"mcl_cherry_blossom_log_top.png", "mcl_cherry_blossom_log.png", "mcl_cherry_blossom:stripped_cherrytree")
|
||||
|
||||
-- Stripped
|
||||
mcl_core.register_stripped_trunk("stripped_cherrytree", S("Stripped Cherry Log"), S("Stripped Cherry Wood"),
|
||||
S("The stripped trunk of a cherry blossom tree."), S("The stripped wood of a cherry blossom tree."),
|
||||
"mcl_cherry_blossom_log_top_stripped.png", "mcl_cherry_blossom_log_stripped.png")
|
||||
|
||||
--Planks
|
||||
mcl_core.register_wooden_planks("cherrywood", S("Cherry Wood Planks"), {"mcl_cherry_blossom_planks.png"})
|
||||
|
||||
-- Leaves
|
||||
mcl_core.register_leaves("cherryleaves", S("Cherry Leaves"),
|
||||
S("Cherry blossom leaves are grown from cherry blossom trees."), {"mcl_cherry_blossom_leaves.png"},
|
||||
nil, "none", nil, "mcl_cherry_blossom:cherrysapling", false, {20, 16, 12, 10})
|
||||
|
||||
-- Sapling
|
||||
mcl_core.register_sapling("cherrysapling", S("Cherry Sapling"),
|
||||
S("Cherry blossom sapling can be planted to grow cherry trees."), nil,
|
||||
"mcl_cherry_blossom_sapling.png", {-4/16, -0.5, -4/16, 4/16, 0.25, 4/16})
|
||||
|
||||
-- Door and Trapdoor
|
||||
mcl_doors:register_door("mcl_cherry_blossom:cherry_door", {
|
||||
description = S("Cherry Door"),
|
||||
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",
|
||||
tiles_top = "mcl_cherry_blossom_door_top.png",
|
||||
sounds = mcl_sounds.node_sound_wood_defaults(),
|
||||
})
|
||||
|
||||
mcl_doors:register_trapdoor("mcl_cherry_blossom:cherry_trapdoor", {
|
||||
description = S("Cherry Trapdoor"),
|
||||
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", nil,
|
||||
"mcl_cherry_blossom_sign_inv.png", "mcl_cherry_blossom_sign_inv.png", S("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)
|
||||
|
||||
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,
|
||||
nil,
|
||||
"mesecons_button_push_wood")
|
|
@ -51,8 +51,9 @@ function mcl_core.make_player_leaves(pos)
|
|||
end
|
||||
|
||||
-- Register tree trunk (wood) and bark
|
||||
local function register_tree_trunk(subname, description_trunk, description_bark, longdesc, tile_inner, tile_bark, stripped_variant)
|
||||
minetest.register_node("mcl_core:"..subname, {
|
||||
function mcl_core.register_tree_trunk(subname, description_trunk, description_bark, longdesc, tile_inner, tile_bark, stripped_variant)
|
||||
local mod = minetest.get_current_modname()
|
||||
minetest.register_node(mod..":"..subname, {
|
||||
description = description_trunk,
|
||||
_doc_items_longdesc = longdesc,
|
||||
_doc_items_hidden = false,
|
||||
|
@ -69,7 +70,7 @@ local function register_tree_trunk(subname, description_trunk, description_bark,
|
|||
_mcl_stripped_variant = stripped_variant,
|
||||
})
|
||||
|
||||
minetest.register_node("mcl_core:"..subname.."_bark", {
|
||||
minetest.register_node(mod..":"..subname.."_bark", {
|
||||
description = description_bark,
|
||||
_doc_items_longdesc = S("This is a decorative block surrounded by the bark of a tree trunk."),
|
||||
tiles = {tile_bark},
|
||||
|
@ -86,17 +87,18 @@ local function register_tree_trunk(subname, description_trunk, description_bark,
|
|||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "mcl_core:"..subname.."_bark 3",
|
||||
output = mod..":"..subname.."_bark 3",
|
||||
recipe = {
|
||||
{ "mcl_core:"..subname, "mcl_core:"..subname },
|
||||
{ "mcl_core:"..subname, "mcl_core:"..subname },
|
||||
{ mod..":"..subname, mod..":"..subname },
|
||||
{ mod..":"..subname, mod..":"..subname },
|
||||
}
|
||||
})
|
||||
end
|
||||
|
||||
-- Register stripped trunk and stripped wood
|
||||
local function register_stripped_trunk(subname, description_stripped_trunk, description_stripped_bark, longdesc, longdesc_wood, tile_stripped_inner, tile_stripped_bark)
|
||||
minetest.register_node("mcl_core:"..subname, {
|
||||
function mcl_core.register_stripped_trunk(subname, description_stripped_trunk, description_stripped_bark, longdesc, longdesc_wood, tile_stripped_inner, tile_stripped_bark)
|
||||
local mod = minetest.get_current_modname()
|
||||
minetest.register_node(mod..":"..subname, {
|
||||
description = description_stripped_trunk,
|
||||
_doc_items_longdesc = longdesc,
|
||||
_doc_items_hidden = false,
|
||||
|
@ -111,7 +113,7 @@ local function register_stripped_trunk(subname, description_stripped_trunk, desc
|
|||
_mcl_hardness = 2,
|
||||
})
|
||||
|
||||
minetest.register_node("mcl_core:"..subname.."_bark", {
|
||||
minetest.register_node(mod..":"..subname.."_bark", {
|
||||
description = description_stripped_bark,
|
||||
_doc_items_longdesc = longdesc_wood,
|
||||
tiles = {tile_stripped_bark},
|
||||
|
@ -127,16 +129,17 @@ local function register_stripped_trunk(subname, description_stripped_trunk, desc
|
|||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "mcl_core:"..subname.."_bark 3",
|
||||
output = mod..":"..subname.."_bark 3",
|
||||
recipe = {
|
||||
{ "mcl_core:"..subname, "mcl_core:"..subname },
|
||||
{ "mcl_core:"..subname, "mcl_core:"..subname },
|
||||
{ mod..":"..subname, mod..":"..subname },
|
||||
{ mod..":"..subname, mod..":"..subname },
|
||||
}
|
||||
})
|
||||
end
|
||||
|
||||
local function register_wooden_planks(subname, description, tiles)
|
||||
minetest.register_node("mcl_core:"..subname, {
|
||||
function mcl_core.register_wooden_planks(subname, description, tiles)
|
||||
local mod = minetest.get_current_modname()
|
||||
minetest.register_node(mod..":"..subname, {
|
||||
description = description,
|
||||
_doc_items_longdesc = doc.sub.items.temp.build,
|
||||
_doc_items_hidden = false,
|
||||
|
@ -150,7 +153,8 @@ local function register_wooden_planks(subname, description, tiles)
|
|||
})
|
||||
end
|
||||
|
||||
local function register_leaves(subname, description, longdesc, tiles, color, paramtype2, palette, sapling, drop_apples, sapling_chances, foliage_palette)
|
||||
function mcl_core.register_leaves(subname, description, longdesc, tiles, color, paramtype2, palette, sapling, drop_apples, sapling_chances, foliage_palette)
|
||||
local mod = minetest.get_current_modname()
|
||||
local apple_chances = {200, 180, 160, 120, 40}
|
||||
local stick_chances = {50, 45, 30, 35, 10}
|
||||
|
||||
|
@ -219,20 +223,27 @@ local function register_leaves(subname, description, longdesc, tiles, color, par
|
|||
end,
|
||||
}
|
||||
|
||||
minetest.register_node("mcl_core:" .. subname, l_def)
|
||||
minetest.register_node(mod .. ":" .. subname, l_def)
|
||||
|
||||
local o_def = table.copy(l_def)
|
||||
o_def._doc_items_create_entry = false
|
||||
o_def.groups.not_in_creative_inventory = 1
|
||||
o_def.groups.orphan_leaves = 1
|
||||
o_def._mcl_shears_drop = {"mcl_core:" .. subname}
|
||||
o_def._mcl_silk_touch_drop = {"mcl_core:" .. subname}
|
||||
o_def._mcl_shears_drop = {mod .. ":" .. subname}
|
||||
o_def._mcl_silk_touch_drop = {mod .. ":" .. subname}
|
||||
|
||||
minetest.register_node("mcl_core:" .. subname .. "_orphan", o_def)
|
||||
minetest.register_node(mod .. ":" .. subname .. "_orphan", o_def)
|
||||
end
|
||||
|
||||
local function register_sapling(subname, description, longdesc, tt_help, texture, selbox)
|
||||
minetest.register_node("mcl_core:"..subname, {
|
||||
function mcl_core.register_sapling(subname, description, longdesc, tt_help, texture, selbox)
|
||||
|
||||
local mod = minetest.get_current_modname()
|
||||
|
||||
if not tt_help then
|
||||
tt_help = S("Needs soil and light to grow")
|
||||
end
|
||||
|
||||
minetest.register_node(mod..":"..subname, {
|
||||
description = description,
|
||||
_tt_help = tt_help,
|
||||
_doc_items_longdesc = longdesc,
|
||||
|
@ -277,59 +288,55 @@ end
|
|||
|
||||
---------------------
|
||||
|
||||
register_tree_trunk("tree", S("Oak Wood"), S("Oak Bark"), S("The trunk of an oak tree."), "default_tree_top.png", "default_tree.png", "mcl_core:stripped_oak")
|
||||
register_tree_trunk("darktree", S("Dark Oak Wood"), S("Dark Oak Bark"), S("The trunk of a dark oak tree."), "mcl_core_log_big_oak_top.png", "mcl_core_log_big_oak.png", "mcl_core:stripped_dark_oak")
|
||||
register_tree_trunk("acaciatree", S("Acacia Wood"), S("Acacia Bark"), S("The trunk of an acacia."), "default_acacia_tree_top.png", "default_acacia_tree.png", "mcl_core:stripped_acacia")
|
||||
register_tree_trunk("sprucetree", S("Spruce Wood"), S("Spruce Bark"), S("The trunk of a spruce tree."), "mcl_core_log_spruce_top.png", "mcl_core_log_spruce.png", "mcl_core:stripped_spruce")
|
||||
register_tree_trunk("birchtree", S("Birch Wood"), S("Birch Bark"), S("The trunk of a birch tree."), "mcl_core_log_birch_top.png", "mcl_core_log_birch.png", "mcl_core:stripped_birch")
|
||||
register_tree_trunk("jungletree", S("Jungle Wood"), S("Jungle Bark"), S("The trunk of a jungle tree."), "default_jungletree_top.png", "default_jungletree.png", "mcl_core:stripped_jungle")
|
||||
mcl_core.register_tree_trunk("tree", S("Oak Wood"), S("Oak Bark"), S("The trunk of an oak tree."), "default_tree_top.png", "default_tree.png", "mcl_core:stripped_oak")
|
||||
mcl_core.register_tree_trunk("darktree", S("Dark Oak Wood"), S("Dark Oak Bark"), S("The trunk of a dark oak tree."), "mcl_core_log_big_oak_top.png", "mcl_core_log_big_oak.png", "mcl_core:stripped_dark_oak")
|
||||
mcl_core.register_tree_trunk("acaciatree", S("Acacia Wood"), S("Acacia Bark"), S("The trunk of an acacia."), "default_acacia_tree_top.png", "default_acacia_tree.png", "mcl_core:stripped_acacia")
|
||||
mcl_core.register_tree_trunk("sprucetree", S("Spruce Wood"), S("Spruce Bark"), S("The trunk of a spruce tree."), "mcl_core_log_spruce_top.png", "mcl_core_log_spruce.png", "mcl_core:stripped_spruce")
|
||||
mcl_core.register_tree_trunk("birchtree", S("Birch Wood"), S("Birch Bark"), S("The trunk of a birch tree."), "mcl_core_log_birch_top.png", "mcl_core_log_birch.png", "mcl_core:stripped_birch")
|
||||
mcl_core.register_tree_trunk("jungletree", S("Jungle Wood"), S("Jungle Bark"), S("The trunk of a jungle tree."), "default_jungletree_top.png", "default_jungletree.png", "mcl_core:stripped_jungle")
|
||||
|
||||
register_stripped_trunk("stripped_oak", S("Stripped Oak Log"), S("Stripped Oak Wood"), S("The stripped trunk of an oak tree."), S("The stripped wood of an oak tree."), "mcl_core_stripped_oak_top.png", "mcl_core_stripped_oak_side.png")
|
||||
register_stripped_trunk("stripped_acacia", S("Stripped Acacia Log"), S("Stripped Acacia Wood"), S("The stripped trunk of an acacia tree."), S("The stripped wood of an acacia tree."), "mcl_core_stripped_acacia_top.png", "mcl_core_stripped_acacia_side.png")
|
||||
register_stripped_trunk("stripped_dark_oak", S("Stripped Dark Oak Log"), S("Stripped Dark Oak Wood"), S("The stripped trunk of a dark oak tree."), S("The stripped wood of a dark oak tree."), "mcl_core_stripped_dark_oak_top.png", "mcl_core_stripped_dark_oak_side.png")
|
||||
register_stripped_trunk("stripped_birch", S("Stripped Birch Log"), S("Stripped Birch Wood"), S("The stripped trunk of a birch tree."), S("The stripped wood of a birch tree."), "mcl_core_stripped_birch_top.png", "mcl_core_stripped_birch_side.png")
|
||||
register_stripped_trunk("stripped_spruce", S("Stripped Spruce Log"), S("Stripped Spruce Wood"), S("The stripped trunk of a spruce tree."), S("The stripped wood of a spruce tree."), "mcl_core_stripped_spruce_top.png", "mcl_core_stripped_spruce_side.png")
|
||||
register_stripped_trunk("stripped_jungle", S("Stripped Jungle Log"), S("Stripped Jungle Wood"), S("The stripped trunk of a jungle tree."), S("The stripped wood of a jungle tree."),"mcl_core_stripped_jungle_top.png", "mcl_core_stripped_jungle_side.png")
|
||||
register_wooden_planks("wood", S("Oak Wood Planks"), {"default_wood.png"})
|
||||
register_wooden_planks("darkwood", S("Dark Oak Wood Planks"), {"mcl_core_planks_big_oak.png"})
|
||||
register_wooden_planks("junglewood", S("Jungle Wood Planks"), {"default_junglewood.png"})
|
||||
register_wooden_planks("sprucewood", S("Spruce Wood Planks"), {"mcl_core_planks_spruce.png"})
|
||||
register_wooden_planks("acaciawood", S("Acacia Wood Planks"), {"default_acacia_wood.png"})
|
||||
register_wooden_planks("birchwood", S("Birch Wood Planks"), {"mcl_core_planks_birch.png"})
|
||||
mcl_core.register_stripped_trunk("stripped_oak", S("Stripped Oak Log"), S("Stripped Oak Wood"), S("The stripped trunk of an oak tree."), S("The stripped wood of an oak tree."), "mcl_core_stripped_oak_top.png", "mcl_core_stripped_oak_side.png")
|
||||
mcl_core.register_stripped_trunk("stripped_acacia", S("Stripped Acacia Log"), S("Stripped Acacia Wood"), S("The stripped trunk of an acacia tree."), S("The stripped wood of an acacia tree."), "mcl_core_stripped_acacia_top.png", "mcl_core_stripped_acacia_side.png")
|
||||
mcl_core.register_stripped_trunk("stripped_dark_oak", S("Stripped Dark Oak Log"), S("Stripped Dark Oak Wood"), S("The stripped trunk of a dark oak tree."), S("The stripped wood of a dark oak tree."), "mcl_core_stripped_dark_oak_top.png", "mcl_core_stripped_dark_oak_side.png")
|
||||
mcl_core.register_stripped_trunk("stripped_birch", S("Stripped Birch Log"), S("Stripped Birch Wood"), S("The stripped trunk of a birch tree."), S("The stripped wood of a birch tree."), "mcl_core_stripped_birch_top.png", "mcl_core_stripped_birch_side.png")
|
||||
mcl_core.register_stripped_trunk("stripped_spruce", S("Stripped Spruce Log"), S("Stripped Spruce Wood"), S("The stripped trunk of a spruce tree."), S("The stripped wood of a spruce tree."), "mcl_core_stripped_spruce_top.png", "mcl_core_stripped_spruce_side.png")
|
||||
mcl_core.register_stripped_trunk("stripped_jungle", S("Stripped Jungle Log"), S("Stripped Jungle Wood"), S("The stripped trunk of a jungle tree."), S("The stripped wood of a jungle tree."),"mcl_core_stripped_jungle_top.png", "mcl_core_stripped_jungle_side.png")
|
||||
mcl_core.register_wooden_planks("wood", S("Oak Wood Planks"), {"default_wood.png"})
|
||||
mcl_core.register_wooden_planks("darkwood", S("Dark Oak Wood Planks"), {"mcl_core_planks_big_oak.png"})
|
||||
mcl_core.register_wooden_planks("junglewood", S("Jungle Wood Planks"), {"default_junglewood.png"})
|
||||
mcl_core.register_wooden_planks("sprucewood", S("Spruce Wood Planks"), {"mcl_core_planks_spruce.png"})
|
||||
mcl_core.register_wooden_planks("acaciawood", S("Acacia Wood Planks"), {"default_acacia_wood.png"})
|
||||
mcl_core.register_wooden_planks("birchwood", S("Birch Wood Planks"), {"mcl_core_planks_birch.png"})
|
||||
|
||||
local tt_help_sapling_large = S("Needs soil and light to grow") .. "\n" .. S("2×2 saplings = large tree")
|
||||
|
||||
register_sapling("sapling", S("Oak Sapling"),
|
||||
mcl_core.register_sapling("sapling", S("Oak Sapling"),
|
||||
S("When placed on soil (such as dirt) and exposed to light, an oak sapling will grow into an oak after some time."),
|
||||
S("Needs soil and light to grow"),
|
||||
"default_sapling.png", {-5/16, -0.5, -5/16, 5/16, 0.5, 5/16})
|
||||
register_sapling("darksapling", S("Dark Oak Sapling"),
|
||||
nil, "default_sapling.png", {-5/16, -0.5, -5/16, 5/16, 0.5, 5/16})
|
||||
mcl_core.register_sapling("darksapling", S("Dark Oak Sapling"),
|
||||
S("Dark oak saplings can grow into dark oaks, but only in groups. A lonely dark oak sapling won't grow. A group of four dark oak saplings grows into a dark oak after some time when they are placed on soil (such as dirt) in a 2×2 square and exposed to light."),
|
||||
S("Needs soil and light to grow") .. "\n" .. S("2×2 saplings required"),
|
||||
"mcl_core_sapling_big_oak.png", {-5/16, -0.5, -5/16, 5/16, 7/16, 5/16})
|
||||
register_sapling("junglesapling", S("Jungle Sapling"),
|
||||
mcl_core.register_sapling("junglesapling", S("Jungle Sapling"),
|
||||
S("When placed on soil (such as dirt) and exposed to light, a jungle sapling will grow into a jungle tree after some time. When there are 4 jungle saplings in a 2×2 square, they will grow to a huge jungle tree."),
|
||||
S("Needs soil and light to grow") .. "\n" .. S("2×2 saplings = large tree"),
|
||||
"default_junglesapling.png", {-5/16, -0.5, -5/16, 5/16, 0.5, 5/16})
|
||||
register_sapling("acaciasapling", S("Acacia Sapling"),
|
||||
tt_help_sapling_large, "default_junglesapling.png", {-5/16, -0.5, -5/16, 5/16, 0.5, 5/16})
|
||||
mcl_core.register_sapling("acaciasapling", S("Acacia Sapling"),
|
||||
S("When placed on soil (such as dirt) and exposed to light, an acacia sapling will grow into an acacia after some time."),
|
||||
S("Needs soil and light to grow"),
|
||||
"default_acacia_sapling.png", {-5/16, -0.5, -5/16, 5/16, 4/16, 5/16})
|
||||
register_sapling("sprucesapling", S("Spruce Sapling"),
|
||||
nil, "default_acacia_sapling.png", {-5/16, -0.5, -5/16, 5/16, 4/16, 5/16})
|
||||
mcl_core.register_sapling("sprucesapling", S("Spruce Sapling"),
|
||||
S("When placed on soil (such as dirt) and exposed to light, a spruce sapling will grow into a spruce after some time. When there are 4 spruce saplings in a 2×2 square, they will grow to a huge spruce."),
|
||||
S("Needs soil and light to grow") .. "\n" .. S("2×2 saplings = large tree"),
|
||||
"mcl_core_sapling_spruce.png", {-4/16, -0.5, -4/16, 4/16, 0.5, 4/16})
|
||||
register_sapling("birchsapling", S("Birch Sapling"),
|
||||
tt_help_sapling_large, "mcl_core_sapling_spruce.png", {-4/16, -0.5, -4/16, 4/16, 0.5, 4/16})
|
||||
mcl_core.register_sapling("birchsapling", S("Birch Sapling"),
|
||||
S("When placed on soil (such as dirt) and exposed to light, a birch sapling will grow into a birch after some time."),
|
||||
S("Needs soil and light to grow"),
|
||||
"mcl_core_sapling_birch.png", {-4/16, -0.5, -4/16, 4/16, 0.5, 4/16})
|
||||
nil, "mcl_core_sapling_birch.png", {-4/16, -0.5, -4/16, 4/16, 0.5, 4/16})
|
||||
|
||||
|
||||
register_leaves("leaves", S("Oak Leaves"), S("Oak leaves are grown from oak trees."), {"default_leaves.png"}, "#48B518", "color", "mcl_core_palette_foliage.png", "mcl_core:sapling", true, {20, 16, 12, 10}, 1)
|
||||
register_leaves("darkleaves", S("Dark Oak Leaves"), S("Dark oak leaves are grown from dark oak trees."), {"mcl_core_leaves_big_oak.png"}, "#48B518", "color", "mcl_core_palette_foliage.png", "mcl_core:darksapling", true, {20, 16, 12, 10}, 1)
|
||||
register_leaves("jungleleaves", S("Jungle Leaves"), S("Jungle leaves are grown from jungle trees."), {"default_jungleleaves.png"}, "#48B518", "color", "mcl_core_palette_foliage.png", "mcl_core:junglesapling", false, {40, 26, 32, 24, 10}, 1)
|
||||
register_leaves("acacialeaves", S("Acacia Leaves"), S("Acacia leaves are grown from acacia trees."), {"default_acacia_leaves.png"}, "#48B518", "color", "mcl_core_palette_foliage.png", "mcl_core:acaciasapling", false, {20, 16, 12, 10}, 1)
|
||||
register_leaves("spruceleaves", S("Spruce Leaves"), S("Spruce leaves are grown from spruce trees."), {"mcl_core_leaves_spruce.png"}, "#619961", "none", nil, "mcl_core:sprucesapling", false, {20, 16, 12, 10}, 0)
|
||||
register_leaves("birchleaves", S("Birch Leaves"), S("Birch leaves are grown from birch trees."), {"mcl_core_leaves_birch.png"}, "#80A755", "none", nil, "mcl_core:birchsapling", false, {20, 16, 12, 10}, 0)
|
||||
mcl_core.register_leaves("leaves", S("Oak Leaves"), S("Oak leaves are grown from oak trees."), {"default_leaves.png"}, "#48B518", "color", "mcl_core_palette_foliage.png", "mcl_core:sapling", true, {20, 16, 12, 10}, 1)
|
||||
mcl_core.register_leaves("darkleaves", S("Dark Oak Leaves"), S("Dark oak leaves are grown from dark oak trees."), {"mcl_core_leaves_big_oak.png"}, "#48B518", "color", "mcl_core_palette_foliage.png", "mcl_core:darksapling", true, {20, 16, 12, 10}, 1)
|
||||
mcl_core.register_leaves("jungleleaves", S("Jungle Leaves"), S("Jungle leaves are grown from jungle trees."), {"default_jungleleaves.png"}, "#48B518", "color", "mcl_core_palette_foliage.png", "mcl_core:junglesapling", false, {40, 26, 32, 24, 10}, 1)
|
||||
mcl_core.register_leaves("acacialeaves", S("Acacia Leaves"), S("Acacia leaves are grown from acacia trees."), {"default_acacia_leaves.png"}, "#48B518", "color", "mcl_core_palette_foliage.png", "mcl_core:acaciasapling", false, {20, 16, 12, 10}, 1)
|
||||
mcl_core.register_leaves("spruceleaves", S("Spruce Leaves"), S("Spruce leaves are grown from spruce trees."), {"mcl_core_leaves_spruce.png"}, "#619961", "none", nil, "mcl_core:sprucesapling", false, {20, 16, 12, 10}, 0)
|
||||
mcl_core.register_leaves("birchleaves", S("Birch Leaves"), S("Birch leaves are grown from birch trees."), {"mcl_core_leaves_birch.png"}, "#80A755", "none", nil, "mcl_core:birchsapling", false, {20, 16, 12, 10}, 0)
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -66,9 +66,9 @@ function mcl_doors:register_door(name, def)
|
|||
longdesc = def._doc_items_longdesc
|
||||
if not longdesc then
|
||||
if def.only_redstone_can_open then
|
||||
longdesc = S("This door is a 2-block high barrier which can be opened or closed by hand or by redstone power.")
|
||||
else
|
||||
longdesc = S("This door is a 2-block high barrier which can only be opened by redstone power, not by hand.")
|
||||
else
|
||||
longdesc = S("This door is a 2-block high barrier which can be opened or closed by hand or by redstone power.")
|
||||
end
|
||||
end
|
||||
usagehelp = def._doc_items_usagehelp
|
||||
|
|
|
@ -192,7 +192,11 @@ local function apply_bone_meal(pointed_thing, user)
|
|||
mcl_dye.add_bone_meal_particle(pos)
|
||||
-- Saplings: 45% chance to advance growth stage
|
||||
if math.random(1, 100) <= 45 then
|
||||
return mcl_core.grow_sapling(pos, n)
|
||||
if n.name == "mcl_cherry_blossom:cherrysapling" then
|
||||
return mcl_cherry_blossom.generate_cherry_tree(pos) -- If cherry blossom sapling, run that callback instead.
|
||||
else
|
||||
return mcl_core.grow_sapling(pos, n)
|
||||
end
|
||||
end
|
||||
elseif minetest.get_item_group(n.name, "mushroom") == 1 then
|
||||
mcl_dye.add_bone_meal_particle(pos)
|
||||
|
|
|
@ -18,148 +18,20 @@ local propagule_allowed_nodes = {
|
|||
local propagule_water_nodes = {"mcl_mud:mud","mcl_core:dirt","mcl_core:coarse_dirt","mcl_core:clay"}
|
||||
--"mcl_lush_caves:moss","mcl_lush_caves:rooted_dirt
|
||||
|
||||
local function get_drops(fortune_level)
|
||||
local apple_chances = {200, 180, 160, 120, 40}
|
||||
local stick_chances = {50, 45, 30, 35, 10}
|
||||
local sapling_chances = {20, 16, 12, 10}
|
||||
return {
|
||||
max_items = 1,
|
||||
items = {
|
||||
{
|
||||
items = {"mcl_mangrove:propagule"},
|
||||
rarity = sapling_chances[fortune_level + 1] or sapling_chances[fortune_level]
|
||||
},
|
||||
{
|
||||
items = {"mcl_core:stick 1"},
|
||||
rarity = stick_chances[fortune_level + 1]
|
||||
},
|
||||
{
|
||||
items = {"mcl_core:stick 2"},
|
||||
rarity = stick_chances[fortune_level + 1]
|
||||
},
|
||||
{
|
||||
items = {"mcl_core:apple"},
|
||||
rarity = apple_chances[fortune_level + 1]
|
||||
}
|
||||
}
|
||||
}
|
||||
end
|
||||
mcl_core.register_tree_trunk("mangrove_tree", S("Mangrove Wood"), S("Mangrove Bark"),
|
||||
S("The trunk of a Mangrove tree."),
|
||||
"mcl_mangrove_log_top.png", "mcl_mangrove_log.png", "mcl_mangrove:mangrove_stripped")
|
||||
|
||||
minetest.register_node("mcl_mangrove:mangrove_tree", {
|
||||
description = S("Mangrove Wood"),
|
||||
_doc_items_longdesc = S("The trunk of a Mangrove tree."),
|
||||
_doc_items_hidden = false,
|
||||
tiles = {"mcl_mangrove_log_top.png", "mcl_mangrove_log_top.png", "mcl_mangrove_log.png"},
|
||||
paramtype2 = "facedir",
|
||||
on_place = mcl_util.rotate_axis,
|
||||
after_destruct = mcl_core.update_leaves,
|
||||
groups = {handy=1,axey=1, tree=1, flammable=2, building_block=1, material_wood=1, fire_encouragement=5, fire_flammability=5},
|
||||
sounds = mcl_sounds.node_sound_wood_defaults(),
|
||||
_mcl_blast_resistance = 2,
|
||||
_mcl_hardness = 2,
|
||||
_mcl_stripped_variant = "mcl_mangrove:mangrove_stripped_trunk",
|
||||
})
|
||||
minetest.register_node("mcl_mangrove:mangrove_tree_bark", {
|
||||
description = S("Mangrove Bark"),
|
||||
_doc_items_longdesc = S("The bark of a Mangrove tree."),
|
||||
_doc_items_hidden = false,
|
||||
tiles = {"mcl_mangrove_log.png", "mcl_mangrove_log.png", "mcl_mangrove_log.png"},
|
||||
paramtype2 = "facedir",
|
||||
groups = {handy=1,axey=1, tree=1, flammable=2, building_block=1, material_wood=1, fire_encouragement=5, fire_flammability=5},
|
||||
sounds = mcl_sounds.node_sound_wood_defaults(),
|
||||
on_place = mcl_util.rotate_axis,
|
||||
_mcl_blast_resistance = 2,
|
||||
_mcl_hardness = 2,
|
||||
_mcl_stripped_variant = "mcl_mangrove:mangrove_stripped_bark",
|
||||
})
|
||||
mcl_core.register_wooden_planks("mangrove_wood", S("Mangrove Wood Planks"), {"mcl_mangrove_planks.png"})
|
||||
|
||||
minetest.register_node("mcl_mangrove:mangrove_wood", {
|
||||
description = S("Mangrove Wood Planks"),
|
||||
_doc_items_longdesc = doc.sub.items.temp.build,
|
||||
_doc_items_hidden = false,
|
||||
tiles = {"mcl_mangrove_planks.png"},
|
||||
mcl_core.register_leaves("mangroveleaves", S("Mangrove Leaves"), S("Mangrove leaves are grown from mangrove trees."),
|
||||
{"mcl_mangrove_leaves.png"}, "#48B518", "color", "mcl_core_palette_foliage.png", "mcl_mangrove:propagule", true, {20, 16, 12, 10}, 1)
|
||||
|
||||
is_ground_content = false,
|
||||
groups = {handy=1,axey=1, flammable=3,wood=1,building_block=1, material_wood=1, fire_encouragement=5, fire_flammability=20},
|
||||
sounds = mcl_sounds.node_sound_wood_defaults(),
|
||||
_mcl_blast_resistance = 3,
|
||||
_mcl_hardness = 2,
|
||||
})
|
||||
mcl_core.register_stripped_trunk("mangrove_stripped", S("Stripped Mangrove Log"), S("Stripped Mangrove Wood"),
|
||||
S("The stripped wood of a Mangrove tree"), S("The stripped bark of a Mangrove tree"),
|
||||
"mcl_stripped_mangrove_log_top.png", "mcl_stripped_mangrove_log_side.png")
|
||||
|
||||
local l_def = {
|
||||
description = S("Mangrove Leaves"),
|
||||
_doc_items_longdesc = S("mangrove leaves are grown from mangrove trees."),
|
||||
_doc_items_hidden = false,
|
||||
drawtype = "allfaces_optional",
|
||||
waving = 2,
|
||||
tiles = {"mcl_mangrove_leaves.png"},
|
||||
color = "#48B518",
|
||||
paramtype = "light",
|
||||
paramtype2 = "color",
|
||||
palette = "mcl_core_palette_foliage.png",
|
||||
groups = {
|
||||
handy = 1, hoey = 1, shearsy = 1, swordy = 1, dig_by_piston = 1,
|
||||
flammable = 2, fire_encouragement = 30, fire_flammability = 60,
|
||||
leaves = 1, deco_block = 1, compostability = 30, foliage_palette = 1
|
||||
},
|
||||
drop = get_drops(0),
|
||||
_mcl_shears_drop = true,
|
||||
sounds = mcl_sounds.node_sound_leaves_defaults(),
|
||||
_mcl_blast_resistance = 0.2,
|
||||
_mcl_hardness = 0.2,
|
||||
_mcl_silk_touch_drop = true,
|
||||
_mcl_fortune_drop = { get_drops(1), get_drops(2), get_drops(3), get_drops(4) },
|
||||
on_construct = function(pos)
|
||||
local node = minetest.get_node(pos)
|
||||
if node.param2 == 0 or node.param2 == 1 then -- Check if param2 is 1 as well, since the schematics accidentally have the param2 of mangrove leaves be 1.
|
||||
local new_node = mcl_core.get_foliage_block_type(pos)
|
||||
if new_node.param2 ~= 0 then
|
||||
minetest.swap_node(pos, new_node)
|
||||
end
|
||||
end
|
||||
end,
|
||||
after_place_node = function(pos)
|
||||
mcl_core.make_player_leaves(pos) -- Leaves placed by the player should always be player leaves.
|
||||
end,
|
||||
}
|
||||
|
||||
minetest.register_node("mcl_mangrove:mangroveleaves", l_def)
|
||||
|
||||
local o_def = table.copy(l_def)
|
||||
o_def._doc_items_create_entry = false
|
||||
o_def.groups.not_in_creative_inventory = 1
|
||||
o_def.groups.orphan_leaves = 1
|
||||
o_def._mcl_shears_drop = {"mcl_mangrove:mangroveleaves"}
|
||||
o_def._mcl_silk_touch_drop = {"mcl_mangrove:mangroveleaves"}
|
||||
|
||||
minetest.register_node("mcl_mangrove:mangroveleaves_orphan", o_def)
|
||||
|
||||
minetest.register_node("mcl_mangrove:mangrove_stripped_trunk", {
|
||||
description = S("Stripped Mangrove Wood"),
|
||||
_doc_items_longdesc = S("The stripped wood of a Mangrove tree"),
|
||||
_doc_items_hidden = false,
|
||||
tiles ={"mcl_stripped_mangrove_log_top.png","mcl_stripped_mangrove_log_side.png",},
|
||||
paramtype2 = "facedir",
|
||||
on_place = mcl_util.rotate_axis,
|
||||
groups = {handy=1, axey=1, tree=1, flammable=2, building_block=1, material_wood=1, fire_encouragement=5, fire_flammability=5},
|
||||
sounds = mcl_sounds.node_sound_wood_defaults(),
|
||||
on_rotate = mcl_util.rotate_axis_and_place,
|
||||
_mcl_blast_resistance = 2,
|
||||
_mcl_hardness = 2,
|
||||
})
|
||||
minetest.register_node("mcl_mangrove:mangrove_stripped_bark", {
|
||||
description = S("Stripped Mangrove Bark"),
|
||||
_doc_items_longdesc = S("The stripped bark of a Mangrove tree"),
|
||||
_doc_items_hidden = false,
|
||||
tiles ={"mcl_stripped_mangrove_log_side.png","mcl_stripped_mangrove_log_side.png",},
|
||||
paramtype2 = "facedir",
|
||||
on_place = mcl_util.rotate_axis,
|
||||
groups = {handy=1, axey=1, tree=1, flammable=2, building_block=1, material_wood=1, fire_encouragement=5, fire_flammability=5},
|
||||
sounds = mcl_sounds.node_sound_wood_defaults(),
|
||||
on_rotate = mcl_util.rotate_axis_and_place,
|
||||
_mcl_blast_resistance = 2,
|
||||
_mcl_hardness = 2,
|
||||
})
|
||||
minetest.register_alias("mcl_mangrove:mangrove_stripped_trunk", "mcl_mangrove:mangrove_stripped")
|
||||
|
||||
minetest.register_node("mcl_mangrove:mangrove_roots", {
|
||||
description = S("Mangrove Roots"),
|
||||
|
|
|
@ -5,7 +5,7 @@ Mangrove Bark=Bois de palétuvier
|
|||
The bark of a Mangrove tree.=L'écorce d'un palétuvier.
|
||||
Mangrove Wood Planks=Planches de palétuvier
|
||||
Mangrove Leaves=Feuilles de palétuvier
|
||||
mangrove leaves are grown from mangrove trees.=les feuilles de palétuvier poussent sur les palétuviers.
|
||||
Mangrove leaves are grown from mangrove trees.=les feuilles de palétuvier poussent sur les palétuviers.
|
||||
Stripped Mangrove Wood=Bûche de palétuvier écorcée
|
||||
The stripped wood of a Mangrove tree=La bûche écorcée d'un palétuvier
|
||||
Stripped Mangrove Bark=Bois de palétuvier écorcé
|
||||
|
|
|
@ -5,7 +5,7 @@ Mangrove Bark=マングローブの樹皮
|
|||
The bark of a Mangrove tree.=マングローブの木の樹皮です。
|
||||
Mangrove Wood Planks=マングローブの板材
|
||||
Mangrove Leaves=マングローブの葉
|
||||
mangrove leaves are grown from mangrove trees.=マングローブの葉は、マングローブの木から育ちます。
|
||||
Mangrove leaves are grown from mangrove trees.=マングローブの葉は、マングローブの木から育ちます。
|
||||
Stripped Mangrove Wood=樹皮を剥いだマングローブの木
|
||||
The stripped wood of a Mangrove tree=剥き身となったマングローブの木
|
||||
Stripped Mangrove Bark=剥がされたマングローブの樹皮
|
||||
|
|
|
@ -5,7 +5,7 @@ Mangrove Bark=
|
|||
The bark of a Mangrove tree.=
|
||||
Mangrove Wood Planks=
|
||||
Mangrove Leaves=
|
||||
mangrove leaves are grown from mangrove trees.=
|
||||
Mangrove leaves are grown from mangrove trees.=
|
||||
Stripped Mangrove Wood=
|
||||
The stripped wood of a Mangrove tree=
|
||||
Stripped Mangrove Bark=
|
||||
|
|
|
@ -89,6 +89,7 @@ local loottable =
|
|||
items = {
|
||||
{ itemstring = "mcl_farming:wheat_item", weight = 20, amount_min = 1, amount_max = 4 },
|
||||
{ itemstring = "mcl_farming:bread", weight = 20 },
|
||||
{ itemstring = "mcl_cherry_blossom:cherrysapling", weight = 15, amount_min = 1, amount_max = 4 }, -- FIXME: Remove when cherry blossom map generation is implemented.
|
||||
{ itemstring = "mcl_core:coal_lump", weight = 15, amount_min = 1, amount_max = 4 },
|
||||
{ itemstring = "mesecons:redstone", weight = 15, amount_min = 1, amount_max = 4 },
|
||||
{ itemstring = "mcl_farming:beetroot_seeds", weight = 10, amount_min = 2, amount_max = 4 },
|
||||
|
|
After Width: | Height: | Size: 250 B |
After Width: | Height: | Size: 317 B |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 439 B |
After Width: | Height: | Size: 141 B |
After Width: | Height: | Size: 157 B |
After Width: | Height: | Size: 258 B |
After Width: | Height: | Size: 399 B |
After Width: | Height: | Size: 157 B |
After Width: | Height: | Size: 138 B |
After Width: | Height: | Size: 286 B |
After Width: | Height: | Size: 195 B |
After Width: | Height: | Size: 446 B |
After Width: | Height: | Size: 220 B |
After Width: | Height: | Size: 314 B |
After Width: | Height: | Size: 75 B |
After Width: | Height: | Size: 196 B |
After Width: | Height: | Size: 246 B |
After Width: | Height: | Size: 694 B |
After Width: | Height: | Size: 247 B |
After Width: | Height: | Size: 326 B |
After Width: | Height: | Size: 159 B |