Added Birch Tree, minor fixes

This commit is contained in:
MoNTE48 2019-07-10 12:26:20 +02:00
parent c436e587b9
commit dfa7d2df23
25 changed files with 129 additions and 93 deletions

View File

@ -1,8 +1,9 @@
MultiCraft Game mod: bluestone torch MultiCraft Game mod: bluestone torch
==================================== ====================================
Code was derived by sofar and MoNTE48 from the 'torches' mod by License of source code:
BlockMen (LGPLv3.0+) -----------------------
Copyright (C) 2019 MultiCraft Development Team
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by it under the terms of the GNU Lesser General Public License as published by

View File

@ -3,16 +3,16 @@ mesecon.state = {}
mesecon.rules.default = { mesecon.rules.default = {
{x = 0, y = 0, z = -1}, {x = 0, y = 0, z = -1},
{x=1, y=0, z=0}, {x = 1, y = 0, z = 0},
{x=-1, y=0, z=0}, {x = -1, y = 0, z = 0},
{x=0, y=0, z=1}, {x = 0, y = 0, z = 1},
{x=1, y=1, z=0}, {x = 1, y = 1, z = 0},
{x=1, y=-1, z=0}, {x = 1, y = -1, z = 0},
{x=-1, y=1, z=0}, {x = -1, y = 1, z = 0},
{x=-1, y=-1, z=0}, {x = -1, y = -1, z = 0},
{x=0, y=1, z=1}, {x = 0, y = 1, z = 1},
{x=0, y=-1, z=1}, {x = 0, y = -1, z = 1},
{x=0, y=1, z=-1}, {x = 0, y = 1, z = -1},
{x = 0, y = -1, z = -1}, {x = 0, y = -1, z = -1},
} }
@ -22,26 +22,26 @@ mesecon.rules.pplate = mesecon.mergetable(mesecon.rules.floor, {{x = 0, y = -2,
mesecon.rules.buttonlike = { mesecon.rules.buttonlike = {
{x = 1, y = 0, z = 0}, {x = 1, y = 0, z = 0},
{x = 1, y = 1, z = 0}, {x = 1, y = 1, z = 0},
{x = 1, y =-1, z = 0}, {x = 1, y = -1, z = 0},
{x = 1, y =-1, z = 1}, {x = 1, y = -1, z = 1},
{x = 1, y =-1, z =-1}, {x = 1, y = -1, z = -1},
{x = 2, y = 0, z = 0}, {x = 2, y = 0, z = 0},
} }
mesecon.rules.flat = { mesecon.rules.flat = {
{x = 1, y = 0, z = 0}, {x = 1, y = 0, z = 0},
{x =-1, y = 0, z = 0}, {x = -1, y = 0, z = 0},
{x = 0, y = 0, z = 1}, {x = 0, y = 0, z = 1},
{x = 0, y = 0, z = -1}, {x = 0, y = 0, z = -1},
} }
mesecon.rules.alldirs = { mesecon.rules.alldirs = {
{x = 1, y = 0, z = 0}, {x = 1, y = 0, z = 0},
{x=-1, y= 0, z= 0}, {x = -1, y = 0, z = 0},
{x= 0, y= 1, z= 0}, {x = 0, y = 1, z = 0},
{x= 0, y=-1, z= 0}, {x = 0, y = -1, z = 0},
{x= 0, y= 0, z= 1}, {x = 0, y = 0, z = 1},
{x = 0, y = 0, z = -1}, {x = 0, y = 0, z = -1},
} }
@ -75,7 +75,7 @@ end
mesecon.rules.wallmounted_get = function(node) mesecon.rules.wallmounted_get = function(node)
local dir = minetest.wallmounted_to_dir(node.param2) local dir = minetest.wallmounted_to_dir(node.param2)
return rules_from_dir(rules_wallmounted, dir) return rules_from_dir(rules_wallmounted, dir)
end end
mesecon.rules.buttonlike_get = function(node) mesecon.rules.buttonlike_get = function(node)
local dir = minetest.facedir_to_dir(node.param2) local dir = minetest.facedir_to_dir(node.param2)

View File

@ -1,19 +1,3 @@
local lightstone_rules = {
{x=0, y=0, z=-1},
{x=1, y=0, z=0},
{x=-1, y=0, z=0},
{x=0, y=0, z=1},
{x=1, y=1, z=0},
{x=1, y=-1, z=0},
{x=-1, y=1, z=0},
{x=-1, y=-1, z=0},
{x=0, y=1, z=1},
{x=0, y=-1, z=1},
{x=0, y=1, z=-1},
{x=0, y=-1, z=-1},
{x=0, y=-1, z=0},
}
minetest.register_node("mesecons_lightstone:lightstone_off", { minetest.register_node("mesecons_lightstone:lightstone_off", {
tiles = {"jeija_lightstone_gray_off.png"}, tiles = {"jeija_lightstone_gray_off.png"},
is_ground_content = false, is_ground_content = false,
@ -21,12 +5,11 @@ minetest.register_node("mesecons_lightstone:lightstone_off", {
description = "Bluestone Lamp", description = "Bluestone Lamp",
sounds = default.node_sound_glass_defaults(), sounds = default.node_sound_glass_defaults(),
mesecons = {effector = { mesecons = {effector = {
rules = lightstone_rules,
action_on = function (pos, node) action_on = function (pos, node)
minetest.swap_node(pos, {name = "mesecons_lightstone:lightstone_on", param2 = node.param2}) minetest.swap_node(pos, {name = "mesecons_lightstone:lightstone_on", param2 = node.param2})
end, end,
}}, }},
on_blast = mesecon.on_blastnode, on_blast = mesecon.on_blastnode,
}) })
minetest.register_node("mesecons_lightstone:lightstone_on", { minetest.register_node("mesecons_lightstone:lightstone_on", {
@ -37,12 +20,11 @@ minetest.register_node("mesecons_lightstone:lightstone_on", {
light_source = minetest.LIGHT_MAX - 2, light_source = minetest.LIGHT_MAX - 2,
sounds = default.node_sound_glass_defaults(), sounds = default.node_sound_glass_defaults(),
mesecons = {effector = { mesecons = {effector = {
rules = lightstone_rules,
action_off = function (pos, node) action_off = function (pos, node)
minetest.swap_node(pos, {name = "mesecons_lightstone:lightstone_off", param2 = node.param2}) minetest.swap_node(pos, {name = "mesecons_lightstone:lightstone_off", param2 = node.param2})
end, end,
}}, }},
on_blast = mesecon.on_blastnode, on_blast = mesecon.on_blastnode,
}) })
minetest.register_craft({ minetest.register_craft({

View File

@ -7,6 +7,7 @@ Authors of source code
Originally by celeron55, Perttu Ahola <celeron55@gmail.com> (LGPLv3.0+) Originally by celeron55, Perttu Ahola <celeron55@gmail.com> (LGPLv3.0+)
Various Minetest developers and contributors (LGPLv3.0+) Various Minetest developers and contributors (LGPLv3.0+)
MoNTE48, Maksim D. Gamarnik <MoNTE48@mail.ua> (LGPLv3.0+) MoNTE48, Maksim D. Gamarnik <MoNTE48@mail.ua> (LGPLv3.0+)
MultiCraft Development Team (LGPLv3.0+)
The torch code was derived by sofar from the 'torches' mod by The torch code was derived by sofar from the 'torches' mod by
BlockMen (LGPLv3.0+) BlockMen (LGPLv3.0+)
@ -134,8 +135,8 @@ paramat (CC BY-SA 3.0):
acacia_tree_from_sapling.mts acacia_tree_from_sapling.mts
apple_tree.mts apple_tree.mts
apple_tree_from_sapling.mts apple_tree_from_sapling.mts
aspen_tree.mts birch_tree.mts
aspen_tree_from_sapling.mts birch_tree_from_sapling.mts
bush.mts bush.mts
emergent_jungle_tree.mts emergent_jungle_tree.mts
emergent_jungle_tree_from_sapling.mts emergent_jungle_tree_from_sapling.mts
@ -153,7 +154,7 @@ paramat (CC BY-SA 3.0):
Shara RedCat (CC BY-SA 3.0): Shara RedCat (CC BY-SA 3.0):
acacia_log.mts acacia_log.mts
apple_log.mts apple_log.mts
aspen_log.mts birch_log.mts
jungle_log.mts jungle_log.mts
pine_log.mts pine_log.mts

View File

@ -28,6 +28,13 @@ minetest.register_craft({
} }
}) })
minetest.register_craft({
output = "default:birch_wood 4",
recipe = {
{"default:birch_tree"},
}
})
minetest.register_craft({ minetest.register_craft({
output = "default:mossycobble", output = "default:mossycobble",
recipe = { recipe = {

View File

@ -4,6 +4,8 @@ License of source code
GNU Lesser General Public License, version 3.0 GNU Lesser General Public License, version 3.0
Copyright (C) 2011-2018 celeron55, Perttu Ahola <celeron55@gmail.com> Copyright (C) 2011-2018 celeron55, Perttu Ahola <celeron55@gmail.com>
Copyright (C) 2011-2018 Various Minetest developers and contributors Copyright (C) 2011-2018 Various Minetest developers and contributors
Copyright (C) 2014-2019 MoNTE48, Maksim D. Gamarnik <MoNTE48@mail.ua>
Copyright (C) 2014-2019 MultiCraft Development Team
This program is free software; you can redistribute it and/or modify it under the terms This program is free software; you can redistribute it and/or modify it under the terms
of the GNU Lesser General Public License as published by the Free Software Foundation; of the GNU Lesser General Public License as published by the Free Software Foundation;

View File

@ -792,7 +792,6 @@ function default.register_biomes()
depth_filler = 3, depth_filler = 3,
node_riverbed = "default:sand", node_riverbed = "default:sand",
depth_riverbed = 2, depth_riverbed = 2,
y_max = -2, y_max = -2,
y_min = -255, y_min = -255,
heat_point = 89, heat_point = 89,
@ -1173,6 +1172,53 @@ function default.register_decorations()
-- num_spawn_by = 8, -- num_spawn_by = 8,
}) })
-- Birch tree and log
minetest.register_decoration({
name = "default:birch_tree",
deco_type = "schematic",
place_on = {"default:dirt_with_grass"},
sidelen = 16,
noise_params = {
offset = 0.0,
scale = -0.015,
spread = {x = 250, y = 250, z = 250},
seed = 2,
octaves = 3,
persist = 0.66
},
biomes = {"deciduous_forest"},
y_max = 31000,
y_min = 1,
schematic = minetest.get_modpath("default") .. "/schematics/birch_tree.mts",
flags = "place_center_x, place_center_z",
})
minetest.register_decoration({
name = "default:birch_log",
deco_type = "schematic",
place_on = {"default:dirt_with_grass"},
place_offset_y = 1,
sidelen = 16,
noise_params = {
offset = 0.0,
scale = -0.0008,
spread = {x = 250, y = 250, z = 250},
seed = 2,
octaves = 3,
persist = 0.66
},
biomes = {"deciduous_forest"},
y_max = 31000,
y_min = 1,
schematic = minetest.get_modpath("default") .. "/schematics/birch_log.mts",
flags = "place_center_x",
rotation = "random",
spawn_by = "default:dirt_with_grass",
-- num_spawn_by = 8,
})
-- Large cactus -- Large cactus
minetest.register_decoration({ minetest.register_decoration({

View File

@ -639,32 +639,31 @@ minetest.register_node("default:acacia_sapling", {
end, end,
}) })
--[[minetest.register_node("default:aspen_tree", { minetest.register_node("default:birch_tree", {
description = "Aspen Tree", description = "Birch Tree",
tiles = {"default_aspen_tree_top.png", "default_aspen_tree_top.png", tiles = {"default_birch_tree_top.png", "default_birch_tree_top.png",
"default_aspen_tree.png"}, "default_birch_tree.png"},
paramtype2 = "facedir", paramtype2 = "facedir",
is_ground_content = false, is_ground_content = false,
groups = {tree = 1, choppy = 3, oddly_breakable_by_hand = 1, flammable = 3}, groups = {tree = 1, choppy = 3, oddly_breakable_by_hand = 1, flammable = 3},
sounds = default.node_sound_wood_defaults(), sounds = default.node_sound_wood_defaults(),
on_place = minetest.rotate_node on_place = minetest.rotate_node
}) })
minetest.register_node("default:aspen_wood", { minetest.register_node("default:birch_wood", {
description = "Aspen Wood Planks", description = "Birch Wood Planks",
paramtype2 = "facedir", paramtype2 = "facedir",
place_param2 = 0, place_param2 = 0,
tiles = {"default_aspen_wood.png"}, tiles = {"default_birch_wood.png"},
is_ground_content = false, is_ground_content = false,
groups = {choppy = 3, oddly_breakable_by_hand = 2, flammable = 3, wood = 1}, groups = {choppy = 3, oddly_breakable_by_hand = 2, flammable = 3, wood = 1},
sounds = default.node_sound_wood_defaults(), sounds = default.node_sound_wood_defaults()
}) })
minetest.register_node("default:aspen_leaves", { minetest.register_node("default:birch_leaves", {
description = "Aspen Tree Leaves", description = "Birch Tree Leaves",
drawtype = "allfaces_optional", drawtype = "allfaces_optional",
tiles = {"default_aspen_leaves.png"}, tiles = {"default_birch_leaves.png"},
waving = 1, waving = 1,
paramtype = "light", paramtype = "light",
is_ground_content = false, is_ground_content = false,
@ -672,21 +671,20 @@ minetest.register_node("default:aspen_leaves", {
drop = { drop = {
max_items = 1, max_items = 1,
items = { items = {
{items = {"default:aspen_sapling"}, rarity = 20}, {items = {"default:birch_sapling"}, rarity = 20},
{items = {"default:aspen_leaves"}} {items = {"default:birch_leaves"}}
} }
}, },
sounds = default.node_sound_leaves_defaults(), sounds = default.node_sound_leaves_defaults(),
after_place_node = default.after_place_leaves
after_place_node = default.after_place_leaves,
}) })
minetest.register_node("default:aspen_sapling", { minetest.register_node("default:birch_sapling", {
description = "Aspen Tree Sapling", description = "Birch Tree Sapling",
drawtype = "plantlike", drawtype = "plantlike",
tiles = {"default_aspen_sapling.png"}, tiles = {"default_birch_sapling.png"},
inventory_image = "default_aspen_sapling.png", inventory_image = "default_birch_sapling.png",
wield_image = "default_aspen_sapling.png", wield_image = "default_birch_sapling.png",
paramtype = "light", paramtype = "light",
sunlight_propagates = true, sunlight_propagates = true,
walkable = false, walkable = false,
@ -705,7 +703,7 @@ minetest.register_node("default:aspen_sapling", {
on_place = function(itemstack, placer, pointed_thing) on_place = function(itemstack, placer, pointed_thing)
itemstack = default.sapling_on_place(itemstack, placer, pointed_thing, itemstack = default.sapling_on_place(itemstack, placer, pointed_thing,
"default:aspen_sapling", "default:birch_sapling",
-- minp, maxp to be checked, relative to sapling pos -- minp, maxp to be checked, relative to sapling pos
-- minp_relative.y = 1 because sapling pos has been checked -- minp_relative.y = 1 because sapling pos has been checked
{x = -2, y = 1, z = -2}, {x = -2, y = 1, z = -2},
@ -714,8 +712,8 @@ minetest.register_node("default:aspen_sapling", {
4) 4)
return itemstack return itemstack
end, end
})]] })
-- --
-- Ores -- Ores
@ -828,7 +826,7 @@ minetest.register_node("default:stone_with_diamond", {
minetest.register_node("default:diamondblock", { minetest.register_node("default:diamondblock", {
description = "Diamond Block", description = "Diamond Block",
tiles = {"default_diamond_block.png"}, tiles = {"default_diamond_block.png"},
is_ground_content = false, is_ground_content = false,
groups = {cracky = 1, level = 3}, groups = {cracky = 1, level = 3},
sounds = default.node_sound_stone_defaults(), sounds = default.node_sound_stone_defaults(),
}) })
@ -1213,14 +1211,7 @@ minetest.register_node("default:lava_source", {
liquid_renewable = false, liquid_renewable = false,
damage_per_second = 4, damage_per_second = 4,
post_effect_color = {a = 191, r = 255, g = 64, b = 0}, post_effect_color = {a = 191, r = 255, g = 64, b = 0},
groups = {lava = 3, liquid = 2, igniter = 1, not_in_creative_inventory = 1}, groups = {lava = 3, liquid = 2, igniter = 1, not_in_creative_inventory = 1}
on_construct = function(pos)
if not minetest.is_singleplayer() then
if pos.y >= 1 then
minetest.env:remove_node(pos)
end
end
end,
}) })
minetest.register_node("default:lava_flowing", { minetest.register_node("default:lava_flowing", {
@ -1266,8 +1257,7 @@ minetest.register_node("default:lava_flowing", {
liquid_renewable = false, liquid_renewable = false,
damage_per_second = 4, damage_per_second = 4,
post_effect_color = {a = 191, r = 255, g = 64, b = 0}, post_effect_color = {a = 191, r = 255, g = 64, b = 0},
groups = {lava = 3, liquid = 2, igniter = 1, groups = {lava = 3, liquid = 2, igniter = 1, not_in_creative_inventory = 1}
not_in_creative_inventory = 1},
}) })
-- --
@ -1573,3 +1563,9 @@ default.register_leafdecay({
leaves = {"default:acacia_leaves"}, leaves = {"default:acacia_leaves"},
radius = 2, radius = 2,
}) })
default.register_leafdecay({
trunks = {"default:birch_tree"},
leaves = {"default:birch_leaves"},
radius = 3,
})

Binary file not shown.

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 399 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

View File

@ -73,6 +73,10 @@ function default.grow_sapling(pos)
minetest.log("action", "An acacia sapling grows into a tree at ".. minetest.log("action", "An acacia sapling grows into a tree at "..
minetest.pos_to_string(pos)) minetest.pos_to_string(pos))
default.grow_new_acacia_tree(pos) default.grow_new_acacia_tree(pos)
elseif node.name == "default:birch_sapling" then
minetest.log("action", "An birch sapling grows into a tree at "..
minetest.pos_to_string(pos))
default.grow_new_birch_tree(pos)
--[[ elseif node.name == "default:emergent_jungle_sapling" then --[[ elseif node.name == "default:emergent_jungle_sapling" then
minetest.log("action", "An emergent jungle sapling grows into a tree at ".. minetest.log("action", "An emergent jungle sapling grows into a tree at "..
minetest.pos_to_string(pos)) minetest.pos_to_string(pos))
@ -437,11 +441,11 @@ function default.grow_new_acacia_tree(pos)
end end
-- New aspen tree -- New birch tree
function default.grow_new_aspen_tree(pos) function default.grow_new_birch_tree(pos)
local path = minetest.get_modpath("default") .. local path = minetest.get_modpath("default") ..
"/schematics/aspen_tree_from_sapling.mts" "/schematics/birch_tree_from_sapling.mts"
minetest.place_schematic({x = pos.x - 2, y = pos.y - 1, z = pos.z - 2}, minetest.place_schematic({x = pos.x - 2, y = pos.y - 1, z = pos.z - 2},
path, "0", nil, false) path, "0", nil, false)
end end

View File

@ -38,7 +38,6 @@ ts_furniture.sit = function(name, pos)
player_api.set_animation(player, "sit", 30) player_api.set_animation(player, "sit", 30)
end end
end]] end]]
-- end of cozy-code
local furnitures = { local furnitures = {
["chair"] = { ["chair"] = {
@ -176,7 +175,7 @@ function ts_furniture.register_furniture(recipe, description, texture)
end end
end end
--ts_furniture.register_furniture("default:aspen_wood", "Aspen", "default_aspen_wood.png") ts_furniture.register_furniture("default:birch_wood", "Birch", "default_birch_wood.png")
ts_furniture.register_furniture("default:pine_wood", "Pine", "default_pine_wood.png") ts_furniture.register_furniture("default:pine_wood", "Pine", "default_pine_wood.png")
ts_furniture.register_furniture("default:acacia_wood", "Acacia", "default_acacia_wood.png") ts_furniture.register_furniture("default:acacia_wood", "Acacia", "default_acacia_wood.png")
ts_furniture.register_furniture("default:wood", "Wooden", "default_wood.png") ts_furniture.register_furniture("default:wood", "Wooden", "default_wood.png")

View File

@ -14,6 +14,7 @@ mobs:register_mob("mobs_animal:cow", {
makes_footstep_sound = true, makes_footstep_sound = true,
sounds = { sounds = {
random = "mobs_cow", random = "mobs_cow",
attack = "mobs_cow",
}, },
run_velocity = 3, run_velocity = 3,
drops = { drops = {
@ -44,15 +45,12 @@ mobs:register_mob("mobs_animal:cow", {
}, },
fear_height = 2, fear_height = 2,
on_rightclick = function(self, clicker) on_rightclick = function(self, clicker)
-- feed or tame -- feed or tame
if mobs:feed_tame(self, clicker, 8, true, true) then if mobs:feed_tame(self, clicker, 8, true, true) then
-- if fed 7x wheat or grass then cow can be milked again -- if fed 7x wheat or grass then cow can be milked again
if self.food and self.food > 6 then if self.food and self.food > 6 then
self.gotten = false self.gotten = false
end end
return return
end end

View File

@ -41,8 +41,8 @@ mobs:register_mob("mobs_animal:pig", {
punch_end = 110, punch_end = 110,
}, },
on_rightclick = function (self, clicker) on_rightclick = function (self, clicker)
mobs:feed_tame(self, clicker, 8, true, true) mobs:feed_tame(self, clicker, 8, true, true)
--mobs:capture_mob(self, clicker, 0, 5, 50, false, nil) --mobs:capture_mob(self, clicker, 0, 5, 50, false, nil)
end, end,
}) })