commit c359784a1f9f88e8725ee3a5680897d4286af844 Author: OldCoder Date: Sun Sep 4 22:00:27 2022 -0700 Imported from trollstream "ContentDB" diff --git a/badland/README.md b/badland/README.md new file mode 100755 index 0000000..f80c032 --- /dev/null +++ b/badland/README.md @@ -0,0 +1,2 @@ +# badland +Adds a Badlands biome with a few more objects. diff --git a/badland/badland.png b/badland/badland.png new file mode 100644 index 0000000..e38c2d7 Binary files /dev/null and b/badland/badland.png differ diff --git a/badland/crafting.lua b/badland/crafting.lua new file mode 100644 index 0000000..0e79f5f --- /dev/null +++ b/badland/crafting.lua @@ -0,0 +1,47 @@ +------------Crafting +minetest.register_craft({ + output = "badland:badland_wood 4", + recipe = { + {"badland:badland_tree"}, + } +}) + +minetest.register_craft({ + output = "badland:bowl 2", + recipe = { + {"group:wood"}, + } +}) + +minetest.register_craft({ + output = "badland:badland_sapling", + recipe = { + {"default:stick", "badland:badland_leaves"}, + {"badland:badland_leaves", "badland:badland_leaves"}, + } +}) + +minetest.register_craft({ + output = "badland:mushroom_bowl 1", + recipe = { + {"flowers:mushroom_brown", "flowers:mushroom_red"}, + {"badland:toadstool", "badland:bowl"}, + } +}) + +minetest.register_craft({ + output = "badland:scarecrow", + recipe = { + {"badland:pumpkin_block", "wool:blue"}, + {"default:stick", "default:stick"}, + } +}) + +minetest.register_craft({ + output = "badland:badland_trapdoor 2", + recipe = { + {"badland:badland_wood", "badland:badland_wood", "badland:badland_wood"}, + {"badland:badland_wood", "badland:badland_wood", "badland:badland_wood"}, + } +}) + diff --git a/badland/flowers.lua b/badland/flowers.lua new file mode 100644 index 0000000..460d97d --- /dev/null +++ b/badland/flowers.lua @@ -0,0 +1,103 @@ +badland = {} +local mpath = minetest.get_modpath("badland") +local pot = minetest.get_modpath("flowerpot") + + + minetest.register_node("badland:toadstool", { + description = "Toadstool", + drawtype = "plantlike", + waving = 1, + on_use = minetest.item_eat(1), + visual_scale = 1, + tiles = {"toadstool.png"}, + inventory_image = "toadstool.png", + wield_image = "toadstool.png", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + buildable_to = true, + groups = {snappy = 3, flower = 1, flora = 1, attached_node = 1, flammable = 1, prairie = 1}, + sounds = default.node_sound_leaves_defaults(), + selection_box = { + type = "fixed", + fixed = box or {-0.15, -0.5, -0.15, 0.15, 0.15, 0.15}, + }, + }) + + minetest.register_node("badland:brown_mushroom_2", { + description = "Brown Mushroom", + drawtype = "plantlike", + waving = 1, + on_use = minetest.item_eat(1), + visual_scale = 1, + tiles = {"brown_mushroom_2.png"}, + inventory_image = "brown_mushroom_2.png", + wield_image = "brown_mushroom_2.png", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + buildable_to = true, + groups = {snappy = 3, flower = 1, flora = 1, attached_node = 1, flammable = 1, prairie = 1}, + sounds = default.node_sound_leaves_defaults(), + selection_box = { + type = "fixed", + fixed = box or {-0.15, -0.5, -0.15, 0.15, 0.15, 0.15}, + }, + }) + + minetest.register_node("badland:brown_mushroom_3", { + description = "Brown Mushroom", + drawtype = "plantlike", + waving = 1, + on_use = minetest.item_eat(1), + visual_scale = 1, + tiles = {"brown_mushroom_3.png"}, + inventory_image = "brown_mushroom_3.png", + wield_image = "brown_mushroom_3.png", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + buildable_to = true, + groups = {snappy = 3, flower = 1, flora = 1, attached_node = 1, flammable = 1, prairie = 1}, + sounds = default.node_sound_leaves_defaults(), + selection_box = { + type = "fixed", + fixed = box or {-0.15, -0.5, -0.15, 0.15, 0.15, 0.15}, + }, + }) + + minetest.register_node("badland:brown_mushroom_4", { + description = "Brown Mushroom", + drawtype = "plantlike", + waving = 1, + on_use = minetest.item_eat(1), + visual_scale = 1, + tiles = {"brown_mushroom_4.png"}, + inventory_image = "brown_mushroom_4.png", + wield_image = "brown_mushroom_4.png", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + buildable_to = true, + groups = {snappy = 3, flower = 1, flora = 1, attached_node = 1, flammable = 1, prairie = 1}, + sounds = default.node_sound_leaves_defaults(), + selection_box = { + type = "fixed", + fixed = box or {-0.15, -0.5, -0.15, 0.15, 0.15, 0.15}, + }, + }) + + + + + +minetest.register_decoration({ + deco_type = "simple", + place_on = {"badland:badland_grass"}, + sidelen = 16, + fill_ratio = 0.01, + biomes = {"badland"}, + decoration = { + "badland:toadstool", "badland:brown_mushroom_4", "badland:brown_mushroom_3", "badland:brown_mushroom_2", + } +}) diff --git a/badland/init.lua b/badland/init.lua new file mode 100644 index 0000000..9c28f26 --- /dev/null +++ b/badland/init.lua @@ -0,0 +1,8 @@ +local default_path = minetest.get_modpath("badland") + +dofile(default_path.."/mapgen.lua") +dofile(default_path.."/nodes.lua") +dofile(default_path.."/flowers.lua") +dofile(default_path.."/crafting.lua") +dofile(default_path.."/item.lua") +dofile(default_path.."/moreblocks.lua") diff --git a/badland/item.lua b/badland/item.lua new file mode 100644 index 0000000..358735d --- /dev/null +++ b/badland/item.lua @@ -0,0 +1,11 @@ +minetest.register_craftitem("badland:mushroom_bowl", { + description = "Mushroom Bowl Cooked", + inventory_image = "badland_mushroom_bowl.png", + on_use = minetest.item_eat(3), + groups = {food_bread = 1, flammable = 2}, +}) + +minetest.register_craftitem("badland:bowl", { + description = "Wooden Bowl", + inventory_image = "badland_bowl.png", +}) diff --git a/badland/license.txt b/badland/license.txt new file mode 100755 index 0000000..af3dc37 --- /dev/null +++ b/badland/license.txt @@ -0,0 +1,18 @@ + License +------------------------------------------------------------------------------------------------------------------------ +Copyright (C) 2021-2022: Atlante - AFL-1.1 +License for code: AFL-1.1 + +Attribution — You must give appropriate credit, provide a link to the license, and +indicate if changes were made. You may do so in any reasonable manner, but not in any way +that suggests the licensor endorses you or your use. + +ShareAlike — If you remix, transform, or build upon the material, you must distribute +your contributions under the same license as the original. + +Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +Anyone can fix the mod. My Discord "Atlante#1952" And my Mail Address "AtlanteEtDocteur@gmail.com" + + diff --git a/badland/mapgen.lua b/badland/mapgen.lua new file mode 100644 index 0000000..9efd023 --- /dev/null +++ b/badland/mapgen.lua @@ -0,0 +1,172 @@ + -- Badland + + minetest.register_biome({ + name = "badland", + node_top = "badland:badland_grass", + depth_top = 1, + node_filler = "default:dirt", + depth_filler = 1, + node_riverbed = "badland:badland_grass", + depth_riverbed = 2, + node_dungeon = "default:cobble", + node_dungeon_alt = "default:mossycobble", + node_dungeon_stair = "stairs:stair_cobble", + y_max = 31000, + y_min = 6, + heat_point = 71, + humidity_point = 84, + }) + + +minetest.register_decoration({ + deco_type = "simple", + place_on = {"badland:badland_grass"}, + sidelen = 16, + fill_ratio = 0.35, + biomes = {"badland"}, + decoration = { + "badland:badland_grass_1", "badland:badland_grass_2", "badland:badland_grass_3", "badland:badland_grass_4", "badland:badland_grass_5", + } +}) + +minetest.register_decoration({ + deco_type = "simple", + place_on = {"badland:badland_grass"}, + sidelen = 16, + fill_ratio = 0.02, + biomes = {"badland"}, + decoration = { + "badland:pumpkin_block", + } +}) +---------------------------------------Bush +minetest.register_decoration({ + name = "badland:badland_brush", + deco_type = "schematic", + place_on = {"badland:badland_grass"}, + place_offset_y = 0, + sidelen = 16, + fill_ratio = 0.008265, + biomes = {"badland"}, + y_max = 31000, + y_min = -20, + schematic = minetest.get_modpath("badland").."/schematics/badland_bush.mts", + flags = "place_center_x, place_center_z", + rotation = "random", +}) +----------------------------------Log 1 +minetest.register_decoration({ + name = "badland:badland_log_1", + deco_type = "schematic", + place_on = {"badland:badland_grass"}, + place_offset_y = 0, + sidelen = 16, + fill_ratio = 0.008265, + biomes = {"badland"}, + y_max = 31000, + y_min = -20, + schematic = minetest.get_modpath("badland").."/schematics/badland_log_1.mts", + flags = "place_center_x, place_center_z", + rotation = "random", +}) +----------------------------------Log 2 +minetest.register_decoration({ + name = "badland:badland_log_2", + deco_type = "schematic", + place_on = {"badland:badland_grass"}, + place_offset_y = 0, + sidelen = 16, + fill_ratio = 0.008265, + biomes = {"badland"}, + y_max = 31000, + y_min = -20, + schematic = minetest.get_modpath("badland").."/schematics/badland_log_2.mts", + flags = "place_center_x, place_center_z", + rotation = "random", +}) +-----------------------Trees +minetest.register_decoration({ + name = "badland:badland_tree_1", + deco_type = "schematic", + place_on = {"badland:badland_grass"}, + place_offset_y = 0, + sidelen = 16, + fill_ratio = 0.002265, + biomes = {"badland"}, + y_max = 31000, + y_min = -20, + schematic = minetest.get_modpath("badland").."/schematics/badland_tree_1.mts", + flags = "place_center_x, place_center_z", + rotation = "random", +}) + +minetest.register_decoration({ + name = "badland:badland_tree_2", + deco_type = "schematic", + place_on = {"badland:badland_grass"}, + place_offset_y = 0, + sidelen = 16, + fill_ratio = 0.002265, + biomes = {"badland"}, + y_max = 31000, + y_min = -20, + schematic = minetest.get_modpath("badland").."/schematics/badland_tree_2.mts", + flags = "place_center_x, place_center_z", + rotation = "random", +}) + +minetest.register_decoration({ + name = "badland:badland_tree_3", + deco_type = "schematic", + place_on = {"badland:badland_grass"}, + place_offset_y = 0, + sidelen = 16, + fill_ratio = 0.002265, + biomes = {"badland"}, + y_max = 31000, + y_min = -20, + schematic = minetest.get_modpath("badland").."/schematics/badland_tree_3.mts", + flags = "place_center_x, place_center_z", + rotation = "random", +}) +---------------------Racine +minetest.register_decoration({ + name = "badland:racine_1", + deco_type = "schematic", + place_on = {"badland:badland_grass"}, + place_offset_y = 0, + sidelen = 16, + fill_ratio = 0.000665, + biomes = {"badland"}, + y_max = 31000, + y_min = -20, + schematic = minetest.get_modpath("badland").."/schematics/racine_1.mts", + flags = "place_center_x, place_center_z", + rotation = "random", +}) +---------------------------Puit +minetest.register_decoration({ + name = "badland:puit_1", + deco_type = "schematic", + place_on = {"badland:badland_grass"}, + place_offset_y = 0, + sidelen = 16, + fill_ratio = 0.000165, + biomes = {"badland"}, + y_max = 31000, + y_min = -20, + schematic = minetest.get_modpath("badland").."/schematics/puit_1.mts", + flags = "place_center_x, place_center_z", + rotation = "random", +}) + +minetest.register_decoration({ + deco_type = "simple", + place_on = {"badland:badland_grass"}, + sidelen = 16, + fill_ratio = 0.02, + biomes = {"badland"}, + decoration = { + "japaneseforest:red_firefly", "japaneseforest:orange_firefly", "default:firefly", + } +}) diff --git a/badland/mod.conf b/badland/mod.conf new file mode 100755 index 0000000..727cde8 --- /dev/null +++ b/badland/mod.conf @@ -0,0 +1,8 @@ + +author = Atlante +name = badland + +description = Adds a Badlands biome with a few more objects. +title = Badlands +depends = default, doors, japaneseforest, flowerpot +optional_depends = flowers, moreblocks diff --git a/badland/models/scarecrow.obj b/badland/models/scarecrow.obj new file mode 100755 index 0000000..f365e68 --- /dev/null +++ b/badland/models/scarecrow.obj @@ -0,0 +1,278 @@ +# Blender v2.78 (sub 0) OBJ File: '' +# www.blender.org +mtllib scarecrow.mtl +o Cube_Cube.001 +v -0.561998 1.323839 0.300580 +v -0.561998 2.981953 0.300579 +v -0.561998 2.981953 -0.300582 +v -0.561998 1.323839 -0.300581 +v 0.563007 2.981953 -0.300580 +v 0.563007 1.323839 -0.300580 +v 0.563007 2.981953 0.300581 +v 0.563007 1.323839 0.300581 +v -0.561998 2.981304 0.562503 +v -0.561998 4.106310 0.562503 +v -0.561998 4.106310 -0.562503 +v -0.561998 2.981304 -0.562504 +v 0.563007 4.106310 -0.562503 +v 0.563007 2.981304 -0.562503 +v 0.563007 4.106310 0.562503 +v 0.563007 2.981304 0.562503 +v 0.139760 -0.287793 0.292342 +v -0.000793 1.318738 0.292342 +v -0.000793 1.318738 -0.292342 +v 0.139761 -0.287793 -0.292342 +v 0.546074 1.366583 -0.292342 +v 0.686627 -0.239948 -0.292342 +v 0.546074 1.366583 0.292342 +v 0.686627 -0.239948 0.292342 +v -0.139991 -0.287924 -0.292342 +v -0.139991 -0.287924 0.292342 +v -0.686857 -0.240079 0.292342 +v -0.686857 -0.240079 -0.292342 +v -0.546304 1.366452 -0.292342 +v 0.000563 1.318607 -0.292342 +v 0.000563 1.318607 0.292342 +v -0.546304 1.366452 0.292342 +v -0.128807 -1.218078 0.129312 +v -0.128807 1.378430 0.129312 +v -0.128807 1.378430 -0.129312 +v -0.128807 -1.218078 -0.129312 +v 0.129816 1.378430 -0.129312 +v 0.129816 -1.218078 -0.129312 +v 0.129816 1.378430 0.129312 +v 0.129816 -1.218078 0.129312 +v -2.627234 2.609297 0.129310 +v 2.628242 2.609298 0.129312 +v 2.628242 2.867920 0.129312 +v -2.627234 2.867920 0.129310 +v 2.628242 2.867921 -0.129311 +v -2.627234 2.867921 -0.129313 +v 2.628242 2.609297 -0.129311 +v -2.627234 2.609297 -0.129313 +v -2.219586 2.414515 0.300579 +v -2.219586 2.414515 -0.300582 +v -0.561471 2.414515 -0.300581 +v -0.561471 2.414515 0.300580 +v -2.219586 2.978941 -0.300582 +v -0.561471 2.978941 -0.300582 +v -2.219586 2.978941 0.300579 +v -0.561471 2.978941 0.300579 +v 2.219980 2.414515 0.300581 +v 0.561866 2.414515 0.300581 +v 0.561866 2.414515 -0.300580 +v 2.219980 2.414515 -0.300580 +v 0.561866 2.978941 -0.300580 +v 2.219980 2.978941 -0.300580 +v 0.561865 2.978941 0.300581 +v 2.219980 2.978941 0.300581 +v -1.668880 2.412450 0.302779 +v -1.668880 2.412450 -0.302782 +v -1.668880 2.981006 -0.302782 +v -1.668880 2.981006 0.302779 +v 1.669274 2.412450 0.302781 +v 1.669274 2.412450 -0.302780 +v 1.669274 2.981006 -0.302779 +v 1.669274 2.981006 0.302782 +vt 0.5000 0.5000 +vt 0.5000 0.6875 +vt 0.4375 0.6875 +vt 0.4375 0.5000 +vt 0.3125 0.6875 +vt 0.3125 0.5000 +vt 0.2500 0.6875 +vt 0.2500 0.5000 +vt 0.6250 0.5000 +vt 0.6250 0.6875 +vt 0.4375 0.6875 +vt 0.5625 0.6875 +vt 0.5625 0.7500 +vt 0.4375 0.7500 +vt 0.4375 0.7500 +vt 0.3125 0.7500 +vt 0.3750 0.7500 +vt 0.3750 0.8750 +vt 0.2500 0.8750 +vt 0.2500 0.7500 +vt 0.1250 0.8750 +vt 0.1250 0.7500 +vt -0.0000 0.8750 +vt -0.0000 0.7500 +vt 0.5000 0.7500 +vt 0.5000 0.8750 +vt 0.2500 0.8750 +vt 0.3750 0.8750 +vt 0.3750 1.0000 +vt 0.2500 1.0000 +vt 0.2500 1.0000 +vt 0.1250 1.0000 +vt 0.1875 0.5000 +vt 0.1875 0.6875 +vt 0.1250 0.6875 +vt 0.1250 0.5000 +vt 0.0625 0.6875 +vt 0.0625 0.5000 +vt -0.0000 0.6875 +vt -0.0000 0.5000 +vt 0.2500 0.5000 +vt 0.2500 0.6875 +vt 0.1250 0.6875 +vt 0.1875 0.6875 +vt 0.1875 0.7500 +vt 0.1250 0.7500 +vt 0.1250 0.7500 +vt 0.0625 0.7500 +vt 0.1250 0.6875 +vt 0.1250 0.7500 +vt 0.1875 0.7500 +vt 0.1875 0.6875 +vt 0.1250 0.5000 +vt 0.0625 0.5000 +vt 0.0625 0.6875 +vt 0.1250 0.6875 +vt 0.1875 0.5000 +vt 0.1875 0.6875 +vt 0.2500 0.5000 +vt 0.2500 0.6875 +vt 0.0625 0.7500 +vt 0.1250 0.7500 +vt -0.0000 0.5000 +vt -0.0000 0.6875 +vt 0.0938 0.1406 +vt 0.0938 0.4688 +vt 0.0625 0.4688 +vt 0.0625 0.1406 +vt 0.0312 0.4688 +vt 0.0312 0.1406 +vt 0.0000 0.4688 +vt -0.0000 0.1406 +vt 0.1250 0.1406 +vt 0.1250 0.4688 +vt 0.0625 0.4688 +vt 0.0938 0.4688 +vt 0.0938 0.5000 +vt 0.0625 0.5000 +vt 0.0625 0.5000 +vt 0.0312 0.5000 +vt 0.9688 0.0000 +vt 0.9688 0.5938 +vt 0.9375 0.5938 +vt 0.9375 0.0000 +vt 0.9062 0.5938 +vt 0.9062 0.0000 +vt 0.8750 0.5938 +vt 0.8750 0.0000 +vt 1.0000 0.0000 +vt 1.0000 0.5938 +vt 0.9375 0.5938 +vt 0.9688 0.5938 +vt 0.9688 0.6250 +vt 0.9375 0.6250 +vt 0.9375 0.6250 +vt 0.9062 0.6250 +vt 0.8125 0.5000 +vt 0.7500 0.5000 +vt 0.7500 0.6875 +vt 0.8125 0.6875 +vt 0.6875 0.5000 +vt 0.6875 0.6875 +vt 0.6250 0.5000 +vt 0.6250 0.6875 +vt 0.8750 0.5000 +vt 0.8750 0.6875 +vt 0.7500 0.6875 +vt 0.7500 0.7500 +vt 0.8125 0.7500 +vt 0.8125 0.6875 +vt 0.6875 0.7500 +vt 0.7500 0.7500 +vt 0.8125 0.5000 +vt 0.8125 0.6875 +vt 0.7500 0.6875 +vt 0.7500 0.5000 +vt 0.6875 0.6875 +vt 0.6875 0.5000 +vt 0.6250 0.6875 +vt 0.6250 0.5000 +vt 0.8750 0.5000 +vt 0.8750 0.6875 +vt 0.7500 0.6875 +vt 0.8125 0.6875 +vt 0.8125 0.7500 +vt 0.7500 0.7500 +vt 0.7500 0.7500 +vt 0.6875 0.7500 +vt 0.7500 0.6875 +vt 0.7500 0.7500 +vt 0.8125 0.7500 +vt 0.8125 0.6875 +vt 0.7500 0.6875 +vt 0.8125 0.6875 +vt 0.8125 0.7500 +vt 0.7500 0.7500 +vn -1.0000 0.0000 0.0000 +vn 0.0000 -0.0000 -1.0000 +vn 1.0000 0.0000 0.0000 +vn -0.0000 0.0000 1.0000 +vn 0.0000 -1.0000 0.0000 +vn 0.0000 1.0000 0.0000 +vn -0.9962 -0.0872 -0.0000 +vn 0.9962 0.0872 0.0000 +vn 0.0872 -0.9962 -0.0000 +vn -0.0872 0.9962 0.0000 +vn -0.0872 -0.9962 -0.0000 +vn 0.9962 -0.0872 -0.0000 +vn 0.0872 0.9962 0.0000 +vn -0.9962 0.0872 0.0000 +usemtl None +s 1 +f 1/1/1 2/2/1 3/3/1 4/4/1 +f 4/4/2 3/3/2 5/5/2 6/6/2 +f 6/6/3 5/5/3 7/7/3 8/8/3 +f 8/9/4 7/10/4 2/2/4 1/1/4 +f 4/11/5 6/12/5 8/13/5 1/14/5 +f 5/5/6 3/3/6 2/15/6 7/16/6 +f 9/17/1 10/18/1 11/19/1 12/20/1 +f 12/20/2 11/19/2 13/21/2 14/22/2 +f 14/22/3 13/21/3 15/23/3 16/24/3 +f 16/25/4 15/26/4 10/18/4 9/17/4 +f 12/27/5 14/28/5 16/29/5 9/30/5 +f 13/21/6 11/19/6 10/31/6 15/32/6 +f 17/33/7 18/34/7 19/35/7 20/36/7 +f 20/36/2 19/35/2 21/37/2 22/38/2 +f 22/38/8 21/37/8 23/39/8 24/40/8 +f 24/41/4 23/42/4 18/34/4 17/33/4 +f 20/43/9 22/44/9 24/45/9 17/46/9 +f 21/37/10 19/35/10 18/47/10 23/48/10 +f 25/49/11 26/50/11 27/51/11 28/52/11 +f 25/53/2 28/54/2 29/55/2 30/56/2 +f 26/57/12 25/53/12 30/56/12 31/58/12 +f 27/59/4 26/57/4 31/58/4 32/60/4 +f 29/55/13 32/61/13 31/62/13 30/56/13 +f 28/54/14 27/63/14 32/64/14 29/55/14 +f 33/65/1 34/66/1 35/67/1 36/68/1 +f 36/68/2 35/67/2 37/69/2 38/70/2 +f 38/70/3 37/69/3 39/71/3 40/72/3 +f 40/73/4 39/74/4 34/66/4 33/65/4 +f 36/75/5 38/76/5 40/77/5 33/78/5 +f 37/69/6 35/67/6 34/79/6 39/80/6 +f 41/81/4 42/82/4 43/83/4 44/84/4 +f 44/84/6 43/83/6 45/85/6 46/86/6 +f 46/86/2 45/85/2 47/87/2 48/88/2 +f 48/89/5 47/90/5 42/82/5 41/81/5 +f 44/91/1 46/92/1 48/93/1 41/94/1 +f 45/85/3 43/83/3 42/95/3 47/96/3 +f 49/97/5 50/98/5 51/99/5 52/100/5 +f 50/98/2 53/101/2 54/102/2 51/99/2 +f 53/101/6 55/103/6 56/104/6 54/102/6 +f 55/105/4 49/97/4 52/100/4 56/106/4 +f 50/107/1 49/108/1 55/109/1 53/110/1 +f 54/102/3 56/111/3 52/112/3 51/99/3 +f 57/113/5 58/114/5 59/115/5 60/116/5 +f 60/116/2 59/115/2 61/117/2 62/118/2 +f 62/118/6 61/117/6 63/119/6 64/120/6 +f 64/121/4 63/122/4 58/114/4 57/113/4 +f 60/123/3 62/124/3 64/125/3 57/126/3 +f 61/117/1 59/115/1 58/127/1 63/128/1 +f 66/129/1 65/130/1 68/131/1 67/132/1 +f 70/133/3 71/134/3 72/135/3 69/136/3 diff --git a/badland/moreblocks.lua b/badland/moreblocks.lua new file mode 100644 index 0000000..785b05b --- /dev/null +++ b/badland/moreblocks.lua @@ -0,0 +1,21 @@ +-----------------Moreblock +if minetest.get_modpath("moreblocks") then + + stairsplus:register_all("badland_wood", "wood", "badland:badland_wood", { + description = "Frost Land Wood", + tiles = {"badland_wood.png"}, + groups = {choppy = 3, oddly_breakable_by_hand = 2, flammable = 3, wood = 1}, + sounds = default.node_sound_wood_defaults(), + }) + + stairsplus:register_all("badland_tree", "tree", "badland:badland_tree", { + description = "Japanese Tree", + tiles = {"badland_tree_top.png", "badland_tree_top.png", + "badland_tree.png"}, + groups = {choppy = 3, oddly_breakable_by_hand = 2, flammable = 3, wood = 1}, + sounds = default.node_sound_wood_defaults(), + }) + + + +end diff --git a/badland/nodes.lua b/badland/nodes.lua new file mode 100644 index 0000000..b3205a7 --- /dev/null +++ b/badland/nodes.lua @@ -0,0 +1,318 @@ +minetest.register_node("badland:badland_grass", { + description = "Badland Grass", + tiles = {"badland_grass.png", "default_dirt.png", + {name = "default_dirt.png^badland_grass_side.png", + tileable_vertical = false}}, + groups = {crumbly = 3, soil = 1, spreading_dirt_type = 1}, + drop = "default:dirt", + sounds = default.node_sound_dirt_defaults({ + footstep = {name = "default_grass_footstep", gain = 0.25}, + }), +}) + +minetest.register_node("badland:badland_leaves", { + description = "Badland Leaves", + drawtype = "allfaces_optional", + waving = 1, + tiles = {"badland_leaves.png"}, + paramtype = "light", + is_ground_content = false, + groups = {snappy = 3, leafdecay = 3, flammable = 2, leaves = 1}, + drop = { + max_items = 1, + items = { + {items = {"badland:badland_sapling"}, rarity = 20}, + {items = {"badland:badland_leaves"}} + } + }, + sounds = default.node_sound_leaves_defaults(), + + after_place_node = after_place_leaves, +}) + +minetest.register_node("badland:badland_leaves_2", { + description = "Badland Leaves", + drawtype = "allfaces_optional", + waving = 1, + tiles = {"badland_leaves_2.png"}, + paramtype = "light", + is_ground_content = false, + groups = {snappy = 3, leafdecay = 3, flammable = 2, leaves = 1}, + drop = { + max_items = 1, + items = { + {items = {"badland:badland_sapling"}, rarity = 20}, + {items = {"badland:badland_leaves_2"}} + } + }, + sounds = default.node_sound_leaves_defaults(), + + after_place_node = after_place_leaves, +}) + +minetest.register_node("badland:badland_leaves_3", { + description = "Badland Leaves", + drawtype = "allfaces_optional", + waving = 1, + tiles = {"badland_leaves_3.png"}, + paramtype = "light", + is_ground_content = false, + groups = {snappy = 3, leafdecay = 3, flammable = 2, leaves = 1}, + drop = { + max_items = 1, + items = { + {items = {"badland:badland_sapling"}, rarity = 20}, + {items = {"badland:badland_leaves_3"}} + } + }, + sounds = default.node_sound_leaves_defaults(), + + after_place_node = after_place_leaves, +}) + +minetest.register_node("badland:badland_tree", { + description = "Badlands Tree", + tiles = {"badland_tree_top.png", "badland_tree_top.png", + "badland_tree.png"}, + paramtype2 = "facedir", + is_ground_content = false, + groups = {tree = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2}, + sounds = default.node_sound_wood_defaults(), + + on_place = minetest.rotate_node +}) + + +minetest.register_node("badland:badland_wood", { + description = "Badlands Tree", + tiles = {"badland_wood.png"}, + paramtype2 = "facedir", + is_ground_content = false, + groups = {tree = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2}, + sounds = default.node_sound_wood_defaults(), + + on_place = minetest.rotate_node +}) + +doors.register_trapdoor("badland:badland_trapdoor", { + description = "Badlands Trapdoor", + inventory_image = "badland_trapdoor.png", + wield_image = "badland_trapdoor.png", + tile_front = "badland_trapdoor.png", + tile_side = "badland_trapdoor_side.png", + gain_open = 0.06, + gain_close = 0.13, + groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2, door = 1}, +}) + + +doors.register("badland_door", { + tiles = {{ name = "doors_badland_door.png", backface_culling = true }}, + description = "Badlands Door", + inventory_image = "doors_item_badland.png", + groups = {node = 1, choppy = 2, oddly_breakable_by_hand = 2, flammable = 2}, + gain_open = 0.06, + gain_close = 0.13, + recipe = { + {"badland:badland_wood", "badland:badland_wood"}, + {"badland:badland_wood", "badland:badland_wood"}, + {"badland:badland_wood", "badland:badland_wood"}, + } +}) + + +doors.register_fencegate("badland:gate_badland", { + description = "Badlands Wood Fence Gate", + texture = "badland_wood_fence.png", + material = "badland:badland_wood", + groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2} +}) + + default.register_fence("badland:fence_badland_wood", { + description = "Badlands Wood Fence", + texture = "badland_wood_fence.png", + inventory_image = "default_fence_overlay.png^badland_wood_fence.png^" .. + "default_fence_overlay.png^[makealpha:255,126,126", + wield_image = "default_fence_overlay.png^badland_wood_fence.png^" .. + "default_fence_overlay.png^[makealpha:255,126,126", + material = "badland:badland_wood", + groups = {choppy = 3, oddly_breakable_by_hand = 2, flammable = 3}, + sounds = default.node_sound_wood_defaults() + }) + + default.register_fence_rail("badland:fence_rail_badland_wood", { + description = "Badlands Wood Fence Rail", + texture = "badland_wood_fence.png", + inventory_image = "default_fence_rail_overlay.png^badland_wood_fence.png^" .. + "default_fence_rail_overlay.png^[makealpha:255,126,126", + wield_image = "default_fence_rail_overlay.png^badland_wood_fence.png^" .. + "default_fence_rail_overlay.png^[makealpha:255,126,126", + material = "badland:badland_wood", + groups = {choppy = 3, oddly_breakable_by_hand = 2, flammable = 3}, + sounds = default.node_sound_wood_defaults() + }) + + + minetest.register_node("badland:badland_grass_1", { + description = "Badland Grass", + drawtype = "plantlike", + waving = 1, + tiles = {"badland_grass_1.png"}, + -- Use texture of a taller grass stage in inventory + inventory_image = "badland_grass_3.png", + wield_image = "badland_grass_3.png", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + buildable_to = true, + groups = {snappy = 3, flora = 1, attached_node = 1, grass = 1, flammable = 1}, + max_items = 1, + items = { + {items = {"farming:seed_wheat"}, rarity = 5}, + {items = {"badland:badland_grass_1"}}, + }, + sounds = default.node_sound_leaves_defaults(), + selection_box = { + type = "fixed", + fixed = {-6 / 16, -0.5, -6 / 16, 6 / 16, -5 / 16, 6 / 16}, + }, + + on_place = function(itemstack, placer, pointed_thing) + -- place a random grass node + local stack = ItemStack("badland:badland_grass_" .. math.random(1,5)) + local ret = minetest.item_place(stack, placer, pointed_thing) + return ItemStack("badland:badland_grass_1 " .. + itemstack:get_count() - (1 - ret:get_count())) + end, + }) + +for i = 2, 5 do + minetest.register_node("badland:badland_grass_" .. i, { + description = "Badland Grass", + drawtype = "plantlike", + waving = 1, + tiles = {"badland_grass_" .. i .. ".png"}, + inventory_image = "badland_grass_" .. i .. ".png", + wield_image = "badland_grass_" .. i .. ".png", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + buildable_to = true, + drop = "badland:badland_grass_1", + groups = {snappy = 3, flora = 1, attached_node = 1, + not_in_creative_inventory = 1, grass = 1, flammable = 1}, + max_items = 1, + items = { + {items = {"farming:seed_wheat"}, rarity = 5}, + {items = {"badland:badland_grass_1"}}, + }, + sounds = default.node_sound_leaves_defaults(), + selection_box = { + type = "fixed", + fixed = {-6 / 16, -0.5, -6 / 16, 6 / 16, -3 / 16, 6 / 16}, + }, + }) +end + +minetest.register_node("badland:scarecrow", { + description = "Scarecrow", + drawtype = "mesh", + mesh = "scarecrow.obj", + paramtype2 = "facedir", + tiles = { + "badland_scarecrow.png", + }, + visual_scale = 0.5, + wield_image = "badland_scarecrow_item.png", + wield_scale = {x=1.0, y=1.0, z=1.0}, + paramtype = "light", + selection_box = { + type = "fixed", + fixed = {-0.3, -0.5, -0.3, 0.3, 1, 0.3} + }, + collision_box = { + type = "fixed", + fixed = {-0.3, -0.5, -0.3, 0.3, 1, 0.3} + }, + inventory_image = "badland_scarecrow_item.png", + groups = {choppy = 1, oddly_breakable_by_hand = 1}, + sounds = default.node_sound_wood_defaults() +}) + +-- Pumpkin +minetest.register_node("badland:pumpkin_block", { + description = "Pumpkin Block", + tiles = {"badland_pumpkin_fruit_top.png", "badland_pumpkin_fruit_top.png", "badland_pumpkin_fruit_side.png", "badland_pumpkin_fruit_side.png", "badland_pumpkin_fruit_side.png", "badland_pumpkin_fruit_side_off.png"}, + paramtype2 = "facedir", + sounds = default.node_sound_wood_defaults(), + is_ground_content = false, + groups = {snappy=3, flammable=4, fall_damage_add_percent=-30}, + on_construct = pumpkin_on_construct +}) + +-- PUMPKIN LANTERN -- from recipe +minetest.register_node("badland:pumpkin_lantern", { + description = "Pumpkin Lantern", + tiles = {"badland_pumpkin_fruit_top.png", "badland_pumpkin_fruit_top.png", "badland_pumpkin_fruit_side.png", "badland_pumpkin_fruit_side.png", "badland_pumpkin_fruit_side.png", "badland_pumpkin_fruit_side_on.png"}, + paramtype = "light", + paramtype2 = "facedir", + sounds = default.node_sound_wood_defaults(), + is_ground_content = false, + light_source = 12, + drop = "badland:pumpkin_lantern", + groups = {snappy=3, flammable=4, fall_damage_add_percent=-30}, + on_construct = pumpkin_on_construct +}) + + minetest.register_node("badland:badland_sapling", { + description = "Badland Sapling", + drawtype = "plantlike", + tiles = {"badland_sapling.png"}, + inventory_image = "badland_sapling.png", + wield_image = "badland_sapling.png", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + on_timer = grow_new_badland_tree, + selection_box = { + type = "fixed", + fixed = {-4 / 16, -0.5, -4 / 16, 4 / 16, 2 / 16, 4 / 16} + }, + groups = {snappy = 2, dig_immediate = 3, flammable = 2, + attached_node = 1, sapling = 1}, + sounds = default.node_sound_leaves_defaults(), + + on_construct = function(pos) + minetest.get_node_timer(pos):start(math.random(300, 1500)) + end, + + on_place = function(itemstack, placer, pointed_thing) + itemstack = default.sapling_on_place(itemstack, placer, pointed_thing, + "badland:badland_sapling", + -- minp, maxp to be checked, relative to sapling pos + {x = -1, y = 0, z = -1}, + {x = 1, y = 1, z = 1}, + -- maximum interval of interior volume check + 2) + + return itemstack + end, + }) + +if minetest.get_modpath("bonemeal") ~= nil then +bonemeal:add_sapling({ + {"badland:badland_sapling", grow_new_badland_tree, "soil"}, +}) +end + + + +local function grow_new_badland_tree(pos) + if not default.can_grow(pos) then + -- try a bit later again + minetest.get_node_timer(pos):start(math.random(300, 1500)) + return + end + minetest.remove_node(pos) + minetest.place_schematic({x = pos.x-1, y = pos.y, z = pos.z-1}, modpath.."/schematics/badland_tree_1.mts", "0", nil, false) +end diff --git a/badland/schematics/badland_bush.mts b/badland/schematics/badland_bush.mts new file mode 100644 index 0000000..2d4d3f5 Binary files /dev/null and b/badland/schematics/badland_bush.mts differ diff --git a/badland/schematics/badland_log_1.mts b/badland/schematics/badland_log_1.mts new file mode 100644 index 0000000..6b1c917 Binary files /dev/null and b/badland/schematics/badland_log_1.mts differ diff --git a/badland/schematics/badland_log_2.mts b/badland/schematics/badland_log_2.mts new file mode 100644 index 0000000..16283b3 Binary files /dev/null and b/badland/schematics/badland_log_2.mts differ diff --git a/badland/schematics/badland_tree_1.mts b/badland/schematics/badland_tree_1.mts new file mode 100644 index 0000000..098faea Binary files /dev/null and b/badland/schematics/badland_tree_1.mts differ diff --git a/badland/schematics/badland_tree_2.mts b/badland/schematics/badland_tree_2.mts new file mode 100644 index 0000000..7e90ec9 Binary files /dev/null and b/badland/schematics/badland_tree_2.mts differ diff --git a/badland/schematics/badland_tree_3.mts b/badland/schematics/badland_tree_3.mts new file mode 100644 index 0000000..7b18e58 Binary files /dev/null and b/badland/schematics/badland_tree_3.mts differ diff --git a/badland/schematics/puit_1.mts b/badland/schematics/puit_1.mts new file mode 100644 index 0000000..a2e3819 Binary files /dev/null and b/badland/schematics/puit_1.mts differ diff --git a/badland/schematics/racine_1.mts b/badland/schematics/racine_1.mts new file mode 100644 index 0000000..8fdc0bf Binary files /dev/null and b/badland/schematics/racine_1.mts differ diff --git a/badland/screenshot.png b/badland/screenshot.png new file mode 100644 index 0000000..f0aea75 Binary files /dev/null and b/badland/screenshot.png differ diff --git a/badland/textures/badland_bowl.png b/badland/textures/badland_bowl.png new file mode 100644 index 0000000..339dc59 Binary files /dev/null and b/badland/textures/badland_bowl.png differ diff --git a/badland/textures/badland_grass.png b/badland/textures/badland_grass.png new file mode 100644 index 0000000..f271573 Binary files /dev/null and b/badland/textures/badland_grass.png differ diff --git a/badland/textures/badland_grass_1.png b/badland/textures/badland_grass_1.png new file mode 100644 index 0000000..e136a6e Binary files /dev/null and b/badland/textures/badland_grass_1.png differ diff --git a/badland/textures/badland_grass_2.png b/badland/textures/badland_grass_2.png new file mode 100644 index 0000000..1e789b4 Binary files /dev/null and b/badland/textures/badland_grass_2.png differ diff --git a/badland/textures/badland_grass_3.png b/badland/textures/badland_grass_3.png new file mode 100644 index 0000000..6bd5f6d Binary files /dev/null and b/badland/textures/badland_grass_3.png differ diff --git a/badland/textures/badland_grass_4.png b/badland/textures/badland_grass_4.png new file mode 100644 index 0000000..ddd0bc0 Binary files /dev/null and b/badland/textures/badland_grass_4.png differ diff --git a/badland/textures/badland_grass_5.png b/badland/textures/badland_grass_5.png new file mode 100644 index 0000000..4c9f353 Binary files /dev/null and b/badland/textures/badland_grass_5.png differ diff --git a/badland/textures/badland_grass_side.png b/badland/textures/badland_grass_side.png new file mode 100644 index 0000000..8710e2f Binary files /dev/null and b/badland/textures/badland_grass_side.png differ diff --git a/badland/textures/badland_leaves.png b/badland/textures/badland_leaves.png new file mode 100644 index 0000000..06a203e Binary files /dev/null and b/badland/textures/badland_leaves.png differ diff --git a/badland/textures/badland_leaves_2.png b/badland/textures/badland_leaves_2.png new file mode 100644 index 0000000..0f47061 Binary files /dev/null and b/badland/textures/badland_leaves_2.png differ diff --git a/badland/textures/badland_leaves_3.png b/badland/textures/badland_leaves_3.png new file mode 100644 index 0000000..fe0a6cd Binary files /dev/null and b/badland/textures/badland_leaves_3.png differ diff --git a/badland/textures/badland_mushroom_bowl.png b/badland/textures/badland_mushroom_bowl.png new file mode 100644 index 0000000..e39f9f6 Binary files /dev/null and b/badland/textures/badland_mushroom_bowl.png differ diff --git a/badland/textures/badland_pumpkin_fruit_side.png b/badland/textures/badland_pumpkin_fruit_side.png new file mode 100644 index 0000000..c429a17 Binary files /dev/null and b/badland/textures/badland_pumpkin_fruit_side.png differ diff --git a/badland/textures/badland_pumpkin_fruit_side_off.png b/badland/textures/badland_pumpkin_fruit_side_off.png new file mode 100644 index 0000000..1159ccf Binary files /dev/null and b/badland/textures/badland_pumpkin_fruit_side_off.png differ diff --git a/badland/textures/badland_pumpkin_fruit_side_on.png b/badland/textures/badland_pumpkin_fruit_side_on.png new file mode 100644 index 0000000..a47c72e Binary files /dev/null and b/badland/textures/badland_pumpkin_fruit_side_on.png differ diff --git a/badland/textures/badland_pumpkin_fruit_top.png b/badland/textures/badland_pumpkin_fruit_top.png new file mode 100644 index 0000000..e4fc9ec Binary files /dev/null and b/badland/textures/badland_pumpkin_fruit_top.png differ diff --git a/badland/textures/badland_sapling.png b/badland/textures/badland_sapling.png new file mode 100644 index 0000000..db3966c Binary files /dev/null and b/badland/textures/badland_sapling.png differ diff --git a/badland/textures/badland_scarecrow.png b/badland/textures/badland_scarecrow.png new file mode 100755 index 0000000..35db654 Binary files /dev/null and b/badland/textures/badland_scarecrow.png differ diff --git a/badland/textures/badland_scarecrow_item.png b/badland/textures/badland_scarecrow_item.png new file mode 100755 index 0000000..b54552e Binary files /dev/null and b/badland/textures/badland_scarecrow_item.png differ diff --git a/badland/textures/badland_trapdoor.png b/badland/textures/badland_trapdoor.png new file mode 100644 index 0000000..5e58d66 Binary files /dev/null and b/badland/textures/badland_trapdoor.png differ diff --git a/badland/textures/badland_trapdoor_side.png b/badland/textures/badland_trapdoor_side.png new file mode 100644 index 0000000..f06e49a Binary files /dev/null and b/badland/textures/badland_trapdoor_side.png differ diff --git a/badland/textures/badland_tree.png b/badland/textures/badland_tree.png new file mode 100644 index 0000000..47035b7 Binary files /dev/null and b/badland/textures/badland_tree.png differ diff --git a/badland/textures/badland_tree_top.png b/badland/textures/badland_tree_top.png new file mode 100644 index 0000000..dfae91a Binary files /dev/null and b/badland/textures/badland_tree_top.png differ diff --git a/badland/textures/badland_wood.png b/badland/textures/badland_wood.png new file mode 100755 index 0000000..2282c8c Binary files /dev/null and b/badland/textures/badland_wood.png differ diff --git a/badland/textures/badland_wood_fence.png b/badland/textures/badland_wood_fence.png new file mode 100755 index 0000000..2282c8c Binary files /dev/null and b/badland/textures/badland_wood_fence.png differ diff --git a/badland/textures/brown_mushroom_2.png b/badland/textures/brown_mushroom_2.png new file mode 100644 index 0000000..1c3ef64 Binary files /dev/null and b/badland/textures/brown_mushroom_2.png differ diff --git a/badland/textures/brown_mushroom_3.png b/badland/textures/brown_mushroom_3.png new file mode 100644 index 0000000..16726fe Binary files /dev/null and b/badland/textures/brown_mushroom_3.png differ diff --git a/badland/textures/brown_mushroom_4.png b/badland/textures/brown_mushroom_4.png new file mode 100644 index 0000000..13cc160 Binary files /dev/null and b/badland/textures/brown_mushroom_4.png differ diff --git a/badland/textures/doors_badland_door.png b/badland/textures/doors_badland_door.png new file mode 100644 index 0000000..858f1a0 Binary files /dev/null and b/badland/textures/doors_badland_door.png differ diff --git a/badland/textures/doors_item_badland.png b/badland/textures/doors_item_badland.png new file mode 100644 index 0000000..4d1cd28 Binary files /dev/null and b/badland/textures/doors_item_badland.png differ diff --git a/badland/textures/jack_o_lantern_bigeyes.png b/badland/textures/jack_o_lantern_bigeyes.png new file mode 100644 index 0000000..e37de8f Binary files /dev/null and b/badland/textures/jack_o_lantern_bigeyes.png differ diff --git a/badland/textures/toadstool.png b/badland/textures/toadstool.png new file mode 100644 index 0000000..c2ed472 Binary files /dev/null and b/badland/textures/toadstool.png differ diff --git a/bambooforest/README.md b/bambooforest/README.md new file mode 100755 index 0000000..09e30cb --- /dev/null +++ b/bambooforest/README.md @@ -0,0 +1,2 @@ +# bambooforest +A simple and pleasant little mod, which adds a bamboo biome with a few more objects. diff --git a/bambooforest/depends.txt b/bambooforest/depends.txt new file mode 100755 index 0000000..441e868 --- /dev/null +++ b/bambooforest/depends.txt @@ -0,0 +1,7 @@ +default +flowers +moreblocks? +walls? +doors +farming +bonemeal? diff --git a/bambooforest/init.lua b/bambooforest/init.lua new file mode 100755 index 0000000..bd807a8 --- /dev/null +++ b/bambooforest/init.lua @@ -0,0 +1,784 @@ + + +-- Bamboo +minetest.register_node("bambooforest:bamboo", { + description = "Bamboo", + drawtype = "plantlike", + tiles = {"bambooforest_bamboo_tree.png"}, + inventory_image = "bambooforest_bamboo_tree.png", + wield_image = "bambooforest_bamboo_tree.png", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + selection_box = { + type = "fixed", + fixed = {-0.10, -0.5, -0.10, 0.10, 0.5, 0.10} + }, + groups = {choppy = 3, oddly_breakable_by_hand = 1, flammable = 2}, + sounds = default.node_sound_leaves_defaults(), + after_dig_node = function(pos, node, metadata, digger) + default.dig_up(pos, node, digger) + end +}) +---------Biome +minetest.register_biome({ + name = "bamboo_forest", + node_top = "bambooforest:dirt_with_bamboo", + depth_top = 1, + node_filler = "default:dirt", + depth_filler = 70, + node_riverbed = "default:sand", + depth_riverbed = 3, + node_dungeon = "default:cobble", + node_dungeon_alt = "default:mossycobble", + node_dungeon_stair = "stairs:stair_cobble", + y_max = 31000, + y_min = 5, + heat_point = 89, + humidity_point = 77, +}) +-------------Sapling +minetest.register_node("bambooforest:bamboo_sapling", { + description = "Bamboo Sapling", + drawtype = "plantlike", + tiles = {"bambooforest_bamboo_sapling.png"}, + inventory_image = "bambooforest_bamboo_sapling.png", + wield_image = "bambooforest_bamboo_sapling.png", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + on_timer = grow_sapling, + selection_box = { + type = "fixed", + fixed = {-4 / 16, -0.5, -4 / 16, 4 / 16, 7 / 16, 4 / 16} + }, + groups = {snappy = 2, dig_immediate = 3, flammable = 2, + attached_node = 1, sapling = 1}, + sounds = default.node_sound_leaves_defaults(), + + on_construct = function(pos) + minetest.get_node_timer(pos):start(math.random(300, 1500)) + end, + + on_place = function(itemstack, placer, pointed_thing) + itemstack = default.sapling_on_place(itemstack, placer, pointed_thing, + "bambooforest:bamboo_sapling", + -- minp, maxp to be checked, relative to sapling pos + -- minp_relative.y = 1 because sapling pos has been checked + {x = -2, y = 1, z = -2}, + {x = 2, y = 15, z = 2}, + -- maximum interval of interior volume check + 4) + + return itemstack + end, +}) +------------Shematics +minetest.register_decoration({ + name = "bambooforest:bamboo_tree_1", + deco_type = "schematic", + place_on = {"bambooforest:dirt_with_bamboo"}, + place_offset_y = 0, + sidelen = 16, + fill_ratio = 0.021565, + biomes = {"bamboo_forest"}, + y_max = 31000, + y_min = -20, + schematic = minetest.get_modpath("bambooforest").."/schematics/bamboo_tree_1.mts", + flags = "place_center_x, place_center_z", + rotation = "random", +}) + +minetest.register_decoration({ + name = "bambooforest:bamboo_tree_2", + deco_type = "schematic", + place_on = {"bambooforest:dirt_with_bamboo"}, + place_offset_y = 0, + sidelen = 16, + fill_ratio = 0.021565, + biomes = {"bamboo_forest"}, + y_max = 31000, + y_min = -20, + schematic = minetest.get_modpath("bambooforest").."/schematics/bamboo_tree_2.mts", + flags = "place_center_x, place_center_z", + rotation = "random", +}) + +minetest.register_decoration({ + name = "bambooforest:bamboo_tree_3", + deco_type = "schematic", + place_on = {"bambooforest:dirt_with_bamboo"}, + place_offset_y = 0, + sidelen = 16, + fill_ratio = 0.021565, + biomes = {"bamboo_forest"}, + y_max = 31000, + y_min = -20, + schematic = minetest.get_modpath("bambooforest").."/schematics/bamboo_tree_3.mts", + flags = "place_center_x, place_center_z", + rotation = "random", +}) + +minetest.register_decoration({ + name = "bambooforest:bamboo_tree_4", + deco_type = "schematic", + place_on = {"bambooforest:dirt_with_bamboo"}, + place_offset_y = 0, + sidelen = 16, + fill_ratio = 0.021565, + biomes = {"bamboo_forest"}, + y_max = 31000, + y_min = -20, + schematic = minetest.get_modpath("bambooforest").."/schematics/bamboo_tree_4.mts", + flags = "place_center_x, place_center_z", + rotation = "random", +}) + +minetest.register_decoration({ + name = "bambooforest:bamboo_tree_5", + deco_type = "schematic", + place_on = {"bambooforest:dirt_with_bamboo"}, + place_offset_y = 0, + sidelen = 16, + fill_ratio = 0.021565, + biomes = {"bamboo_forest"}, + y_max = 31000, + y_min = -20, + schematic = minetest.get_modpath("bambooforest").."/schematics/bamboo_tree_5.mts", + flags = "place_center_x, place_center_z", + rotation = "random", +}) + +minetest.register_decoration({ + name = "bambooforest:bamboo_tree_5", + deco_type = "schematic", + place_on = {"bambooforest:dirt_with_bamboo"}, + place_offset_y = 0, + sidelen = 16, + fill_ratio = 0.021565, + biomes = {"bamboo_forest"}, + y_max = 31000, + y_min = -20, + schematic = minetest.get_modpath("bambooforest").."/schematics/bamboo_tree_5.mts", + flags = "place_center_x, place_center_z", + rotation = "random", +}) + +minetest.register_decoration({ + name = "bambooforest:bamboo_tree_6", + deco_type = "schematic", + place_on = {"bambooforest:dirt_with_bamboo"}, + place_offset_y = 0, + sidelen = 16, + fill_ratio = 0.021565, + biomes = {"bamboo_forest"}, + y_max = 31000, + y_min = -20, + schematic = minetest.get_modpath("bambooforest").."/schematics/bamboo_tree_6.mts", + flags = "place_center_x, place_center_z", + rotation = "random", +}) + +minetest.register_decoration({ + name = "bambooforest:bamboo_tree_7", + deco_type = "schematic", + place_on = {"bambooforest:dirt_with_bamboo"}, + place_offset_y = 0, + sidelen = 16, + fill_ratio = 0.021565, + biomes = {"bamboo_forest"}, + y_max = 31000, + y_min = -20, + schematic = minetest.get_modpath("bambooforest").."/schematics/bamboo_tree_7.mts", + flags = "place_center_x, place_center_z", + rotation = "random", +}) + +minetest.register_decoration({ + name = "bambooforest:bamboo_tree_8", + deco_type = "schematic", + place_on = {"bambooforest:dirt_with_bamboo"}, + place_offset_y = 0, + sidelen = 16, + fill_ratio = 0.021565, + biomes = {"bamboo_forest"}, + y_max = 31000, + y_min = -20, + schematic = minetest.get_modpath("bambooforest").."/schematics/bamboo_tree_8.mts", + flags = "place_center_x, place_center_z", + rotation = "random", +}) + +minetest.register_decoration({ + name = "bambooforest:bamboo_tree_9", + deco_type = "schematic", + place_on = {"bambooforest:dirt_with_bamboo"}, + place_offset_y = 0, + sidelen = 16, + fill_ratio = 0.021565, + biomes = {"bamboo_forest"}, + y_max = 31000, + y_min = -20, + schematic = minetest.get_modpath("bambooforest").."/schematics/bamboo_tree_9.mts", + flags = "place_center_x, place_center_z", + rotation = "random", +}) + +minetest.register_decoration({ + name = "bambooforest:ruins_1", + deco_type = "schematic", + place_on = {"bambooforest:dirt_with_bamboo"}, + place_offset_y = -1, + sidelen = 16, + fill_ratio = 0.000135, + biomes = {"bamboo_forest"}, + y_max = 30, + y_min = 10, + schematic = minetest.get_modpath("bambooforest").."/schematics/ruins_1.mts", + flags = "place_center_x, place_center_z", + rotation = "random", +}) + +minetest.register_decoration({ + name = "bambooforest:jungle_tree", + deco_type = "schematic", + place_on = {"bambooforest:dirt_with_bamboo"}, + place_offset_y = 0, + sidelen = 16, + fill_ratio = 0.021565, + biomes = {"bamboo_forest"}, + y_max = 31000, + y_min = -20, + schematic = minetest.get_modpath("default").."/schematics/jungle_tree.mts", + flags = "place_center_x, place_center_z", + rotation = "random", +}) + + + +--------------Decoration (node) +minetest.register_decoration({ + deco_type = "simple", + place_on = {"bambooforest:dirt_with_bamboo"}, + sidelen = 16, + fill_ratio = 0.1, + biomes = {"bamboo_forest"}, + decoration = { + "default:junglegrass" + } +}) + +minetest.register_decoration({ + deco_type = "simple", + place_on = {"bambooforest:dirt_with_bamboo"}, + sidelen = 16, + fill_ratio = 0.05, + biomes = {"bamboo_forest"}, + decoration = { + "flowers:mushroom_brown", "flowers:mushroom_red" + } +}) + +minetest.register_decoration({ + deco_type = "simple", + place_on = {"bambooforest:dirt_with_bamboo"}, + sidelen = 16, + fill_ratio = 0.05, + biomes = {"bamboo_forest"}, + decoration = { + "bambooforest:melon_block", + } +}) + +minetest.register_decoration({ + deco_type = "simple", + place_on = {"bambooforest:dirt_with_bamboo"}, + sidelen = 16, + fill_ratio = 0.2, + biomes = {"bamboo_forest"}, + decoration = { + "default:grass_1", "default:grass_2", + "default:grass_3", "default:grass_4", + "default:grass_5", + } +}) + +-----Sapling +local function grow_new_bamboo_tree(pos) + if not default.can_grow(pos) then + -- try a bit later again + minetest.get_node_timer(pos):start(math.random(240, 600)) + return + end + + minetest.place_schematic({x = pos.x, y = pos.y, z = pos.z}, modpath.."/schematics/bamboo_tree_1.mts", "0", nil, true) + minetest.place_schematic({x = pos.x, y = pos.y, z = pos.z}, modpath.."/schematics/bamboo_tree_2.mts", "0", nil, true) + minetest.place_schematic({x = pos.x, y = pos.y, z = pos.z}, modpath.."/schematics/bamboo_tree_3.mts", "0", nil, true) + minetest.place_schematic({x = pos.x, y = pos.y, z = pos.z}, modpath.."/schematics/bamboo_tree_4.mts", "0", nil, true) + minetest.place_schematic({x = pos.x, y = pos.y, z = pos.z}, modpath.."/schematics/bamboo_tree_5.mts", "0", nil, true) + minetest.place_schematic({x = pos.x, y = pos.y, z = pos.z}, modpath.."/schematics/bamboo_tree_6.mts", "0", nil, true) + minetest.place_schematic({x = pos.x, y = pos.y, z = pos.z}, modpath.."/schematics/bamboo_tree_7.mts", "0", nil, true) + minetest.place_schematic({x = pos.x, y = pos.y, z = pos.z}, modpath.."/schematics/bamboo_tree_8.mts", "0", nil, true) + minetest.place_schematic({x = pos.x, y = pos.y, z = pos.z}, modpath.."/schematics/bamboo_tree_9.mts", "0", nil, true) +end + +---------------Node +minetest.register_node("bambooforest:bamboo_wood", { + description = "Bamboo Wood", + paramtype2 = "facedir", + place_param2 = 0, + tiles = {"bamboo_wood.png"}, + is_ground_content = false, + groups = {choppy = 3, oddly_breakable_by_hand = 2, flammable = 3, wood = 1}, + sounds = default.node_sound_wood_defaults(), +}) + +minetest.register_node("bambooforest:dirt_with_bamboo", { + description = "Dirt with Bamboo", + tiles = {"bambooforest_bamboo_grass.png", "default_dirt.png", + {name = "default_dirt.png^bambooforest_bamboo_grass_side.png", + tileable_vertical = false}}, + groups = {crumbly = 3, soil = 1, spreading_dirt_type = 1}, + drop = "default:dirt", + sounds = default.node_sound_dirt_defaults({ + footstep = {name = "default_grass_footstep", gain = 0.25}, + }), +}) + +minetest.register_node("bambooforest:bamboo_glass", { + description = "Bamboo Glass", + drawtype = "allfaces", + tiles = {"bamboo_glass.png"}, + use_texture_alpha = true, + paramtype = "light", + is_ground_content = false, + groups = {cracky = 3, oddly_breakable_by_hand = 3}, + sounds = default.node_sound_glass_defaults(), +}) + +minetest.register_node("bambooforest:bamboo_block", { + description = "Bamboo Block", + paramtype2 = "facedir", + place_param2 = 0, + tiles = {"bamboo_block.png"}, + is_ground_content = false, + groups = {choppy = 3, oddly_breakable_by_hand = 2, flammable = 3, wood = 1}, + sounds = default.node_sound_wood_defaults(), +}) + +doors.register_trapdoor("bambooforest:bamboo_trapdoor", { + description = "Bamboo Trapdoor", + inventory_image = "bamboo_trapdoor.png", + wield_image = "bamboo_trapdoor.png", + tile_front = "bamboo_trapdoor.png", + tile_side = "bamboo_trapdoor_side.png", + gain_open = 0.06, + gain_close = 0.13, + groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2, door = 1}, +}) + +doors.register_fencegate("bambooforest:gate_bamboo", { + description = "Bamboo Wood Fence Gate", + texture = "bamboo_wood_fence.png", + material = "bambooforest:bamboo_wood", + groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2} +}) + +doors.register("bamboo_door", { + tiles = {{ name = "doors_bamboo_door.png", backface_culling = true }}, + description = "Bamboo Door", + inventory_image = "doors_item_bamboo.png", + groups = {node = 1, choppy = 2, oddly_breakable_by_hand = 2, flammable = 2}, + gain_open = 0.06, + gain_close = 0.13, + recipe = { + {"bambooforest:fiber_bamboo", "bambooforest:bamboo_wood"}, + {"bambooforest:bamboo_wood", "bambooforest:fiber_bamboo"}, + {"bambooforest:fiber_bamboo", "bambooforest:bamboo_wood"}, + } +}) + +minetest.register_node("bambooforest:granite", { + description = "Granite", + paramtype2 = "facedir", + place_param2 = 0, + tiles = {"granite.png"}, + is_ground_content = false, + groups = {cracky = 3, stone = 2, level = 1}, + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_node("bambooforest:granite_block", { + description = "Granite Block", + paramtype2 = "facedir", + place_param2 = 0, + tiles = {"granite_block.png"}, + is_ground_content = false, + groups = {cracky = 2, stone = 2, level = 1}, + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_node("bambooforest:granite_brick", { + description = "Granite Brick", + paramtype2 = "facedir", + place_param2 = 0, + tiles = {"granite_brick.png"}, + is_ground_content = false, + groups = {cracky = 3, stone = 2, level = 2}, + sounds = default.node_sound_stone_defaults(), +}) + +-------------Item +minetest.register_craftitem("bambooforest:bamboo_cooked", { + description = "Bamboo Cooked", + inventory_image = "bamboo_cooked.png", + on_use = minetest.item_eat(2), + groups = {food_bread = 1}, +}) + +minetest.register_craftitem("bambooforest:fiber_bamboo", { + description = "Bamboo Fiber", + inventory_image = "fibre_bamboo.png", + +}) + +------------Crafting +minetest.register_craft({ + output = "bambooforest:bamboo_wood", + recipe = { + {"bambooforest:bamboo", "bambooforest:bamboo"}, + {"bambooforest:bamboo", "bambooforest:bamboo"}, + } +}) + +minetest.register_craft({ + output = "bambooforest:fiber_bamboo 8", + recipe = { + {"bambooforest:bamboo"}, + } +}) + +minetest.register_craft({ + output = "bambooforest:granite 4", + recipe = { + {"default:sand", "default:silver_sand"}, + {"default:gravel", "default:stone"}, + } +}) + +minetest.register_craft({ + output = "bambooforest:granite_block 9", + recipe = { + {"bambooforest:granite", "bambooforest:granite", "bambooforest:granite"}, + {"bambooforest:granite", "bambooforest:granite", "bambooforest:granite"}, + {"bambooforest:granite", "bambooforest:granite", "bambooforest:granite"}, + } +}) + +minetest.register_craft({ + output = "bambooforest:granite_brick 4", + recipe = { + {"bambooforest:granite_block", "bambooforest:granite_block"}, + {"bambooforest:granite_block", "bambooforest:granite_block"}, + } +}) + +minetest.register_craft({ + output = "bambooforest:bamboo_glass", + recipe = { + {"", "bambooforest:bamboo", ""}, + {"bambooforest:bamboo", "default:glass", "bambooforest:bamboo"}, + {"", "bambooforest:bamboo", ""}, + } +}) + +minetest.register_craft({ + output = "bambooforest:bamboo_block", + recipe = { + {"bambooforest:bamboo_wood", "bambooforest:bamboo", "bambooforest:bamboo_wood"}, + {"bambooforest:bamboo", "bambooforest:bamboo_wood", "bambooforest:bamboo"}, + {"bambooforest:bamboo_wood", "bambooforest:bamboo", "bambooforest:bamboo_wood"}, + } +}) + +minetest.register_craft({ + output = "bambooforest:bamboo_sapling", + recipe = { + {"bambooforest:bamboo", "default:dirt"}, + {"default:dirt", "bambooforest:bamboo"}, + } +}) + +minetest.register_craft({ + output = "bambooforest:bamboo_trapdoor 2", + recipe = { + {"bambooforest:fiber_bamboo", "bambooforest:bamboo_wood", "bambooforest:fiber_bamboo"}, + {"bambooforest:bamboo_wood", "bambooforest:fiber_bamboo", "bambooforest:bamboo_wood"}, + {"", "", ""}, + } +}) + +minetest.register_craft({ + output = "walls:bamboo_block 6", + recipe = { + {"bambooforest:bamboo_block", "bambooforest:bamboo_block", "bambooforest:bamboo_block"}, + {"bambooforest:bamboo_block", "bambooforest:bamboo_block", "bambooforest:bamboo_block"}, + {"", "", ""}, + } +}) + + + +minetest.register_craft({ + output = "bambooforest:melon 4", + recipe = { + {"bambooforest:melon_block"}, + + } +}) + +minetest.register_craft({ + output = "bambooforest:seed_melon 1", + recipe = { + {"bambooforest:melon"}, + } +}) + +minetest.register_craft({ + type = "cooking", + cooktime = 20, + output = "bambooforest:bamboo_cooked", + recipe = "bambooforest:bamboo" +}) + +--------Fence + + default.register_fence("bambooforest:fence_bamboo_wood", { + description = "Bamboo Wood Fence", + texture = "bamboo_wood_fence.png", + inventory_image = "default_fence_overlay.png^bamboo_wood_fence.png^" .. + "default_fence_overlay.png^[makealpha:255,126,126", + wield_image = "default_fence_overlay.png^bamboo_wood_fence.png^" .. + "default_fence_overlay.png^[makealpha:255,126,126", + material = "bambooforest:bamboo_wood", + groups = {choppy = 3, oddly_breakable_by_hand = 2, flammable = 3}, + sounds = default.node_sound_wood_defaults() + }) + + default.register_fence_rail("bambooforest:fence_rail_bamboo_wood", { + description = "Bamboo Wood Fence Rail", + texture = "bamboo_wood_fence.png", + inventory_image = "default_fence_rail_overlay.png^bamboo_wood_fence.png^" .. + "default_fence_rail_overlay.png^[makealpha:255,126,126", + wield_image = "default_fence_rail_overlay.png^bamboo_wood_fence.png^" .. + "default_fence_rail_overlay.png^[makealpha:255,126,126", + material = "bambooforest:bamboo_wood", + groups = {choppy = 3, oddly_breakable_by_hand = 2, flammable = 3}, + sounds = default.node_sound_wood_defaults() + }) +------------------Mapgen + + -- Granite + + minetest.register_ore({ + ore_type = "blob", + ore = "bambooforest:granite", + wherein = {"default:stone"}, + clust_scarcity = 16 * 16 * 16, + clust_size = 5, + y_max = -50, + y_min = -31000, + noise_threshold = 0.0, + noise_params = { + offset = 0.5, + scale = 0.2, + spread = {x = 5, y = 5, z = 5}, + seed = 766, + octaves = 1, + persist = 0.0 + }, + }) + +-----------------Moreblock +if minetest.get_modpath("moreblocks") then + + stairsplus:register_all("bamboo_wood", "wood", "bambooforest:bamboo_wood", { + description = "Bamboo Wood", + tiles = {"bamboo_wood.png"}, + groups = {choppy = 3, oddly_breakable_by_hand = 2, flammable = 3, wood = 1}, + sounds = default.node_sound_wood_defaults(), + }) + + stairsplus:register_all("bamboo_glass", "glass", "bambooforest:bamboo_glass", { + description = "Bamboo Glass", + tiles = {"bamboo_glass.png"}, + groups = {cracky = 3, oddly_breakable_by_hand = 3}, + sounds = default.node_sound_glass_defaults(), + }) + + stairsplus:register_all("bamboo_block", "wood", "bambooforest:bamboo_block", { + description = "Bamboo Block", + tiles = {"bamboo_block.png"}, + groups = {choppy = 3, oddly_breakable_by_hand = 2, flammable = 3, wood = 1}, + sounds = default.node_sound_wood_defaults(), + }) + + stairsplus:register_all("granite", "stone", "bambooforest:granite", { + description = "Granite", + tiles = {"granite.png"}, + groups = {cracky = 3, stone = 2, level = 1}, + sounds = default.node_sound_stone_defaults(), + }) + + stairsplus:register_all("granite_block", "stone", "bambooforest:granite_block", { + description = "Granite Block", + tiles = {"granite_block.png"}, + groups = {cracky = 3, stone = 2, level = 1}, + sounds = default.node_sound_stone_defaults(), + }) + + stairsplus:register_all("granite_brick", "stone", "bambooforest:granite_brick", { + description = "Granite Brick", + tiles = {"granite_brick.png"}, + groups = {cracky = 3, stone = 2, level = 1}, + sounds = default.node_sound_stone_defaults(), + }) + +end + +if minetest.get_modpath("walls") then + + +walls.register(":walls:bamboo_block", "Bamboo Block Wall", "bamboo_block.png", + "bambooforest:bamboo_block", default.node_sound_wood_defaults()) + +walls.register(":walls:granite_brick", "Granite Brick Wall", "granite_brick.png", + "bambooforest:granite_brick", default.node_sound_stone_defaults()) +end + +minetest.register_craft({ + output = "walls:granite_brick 6", + recipe = { + {"bambooforest:granite", "bambooforest:granite", "bambooforest:granite"}, + {"bambooforest:granite", "bambooforest:granite", "bambooforest:granite"}, + {"", "", ""}, + } +}) + + + +-------Melon +farming.register_plant("bambooforest:melon", { + description = "Melon Seed", + inventory_image = "melon_seed.png", + steps = 8, + minlight = 13, + maxlight = default.LIGHT_MAX, + fertility = {"bamboo_forest"}, + groups = {flammable = 4}, + place_param2 = 3, +}) + +-- needed +minetest.register_craftitem("bambooforest:melon", { + description = "Melon", + inventory_image = "melon.png", + on_use = minetest.item_eat(2), + groups = {food_bread = 1, flammable = 2}, +}) + +-- Melon fruit harvest +minetest.register_node("bambooforest:melon_fruit", { + description = "Melon Fruit", + tiles = {"bambooforest_melon_fruit_top.png", "bambooforest_melon_fruit_top.png", "bambooforest_melon_fruit_side.png", "bambooforest_melon_fruit_side.png", "bambooforest_melon_fruit_side.png", "bambooforest_melon_fruit_side.png"}, + sounds = default.node_sound_wood_defaults(), + is_ground_content = false, + groups = {snappy=3, flammable=4, fall_damage_add_percent=-30, not_in_creative_inventory=1}, + drop = { + max_items = 7, -- Maximum number of items to drop. + items = { -- Choose max_items randomly from this list. + { + items = {"bambooforest:melon"}, -- Items to drop. + rarity = 1, -- Probability of dropping is 1 / rarity. + }, + { + items = {"bambooforest:melon"}, -- Items to drop. + rarity = 2, -- Probability of dropping is 1 / rarity. + }, + { + items = {"bambooforest:melon"}, -- Items to drop. + rarity = 2, -- Probability of dropping is 1 / rarity. + }, + { + items = {"bambooforest:melon"}, -- Items to drop. + rarity = 2, -- Probability of dropping is 1 / rarity. + }, + { + items = {"bambooforest:melon"}, -- Items to drop. + rarity = 3, -- Probability of dropping is 1 / rarity. + }, + { + items = {"bambooforest:melon"}, -- Items to drop. + rarity = 3, -- Probability of dropping is 1 / rarity. + }, + { + items = {"bambooforest:melon"}, -- Items to drop. + rarity = 3, -- Probability of dropping is 1 / rarity. + }, + }, + }, + after_dig_node = function(pos, oldnode, oldmetadata, digger) + local parent = oldmetadata.fields.parent + local parent_pos_from_child = minetest.string_to_pos(parent) + local parent_node = nil + + -- make sure we have position + if parent_pos_from_child + and parent_pos_from_child ~= nil then + + parent_node = minetest.get_node(parent_pos_from_child) + end + + -- tick parent if parent stem still exists + if parent_node + and parent_node ~= nil + and parent_node.name == "bambooforest:melon_8" then + + farming.tick(parent_pos_from_child) + end + end +}) + +-- MELON BLOCK - HARVEST from crops +minetest.register_node("bambooforest:melon_block", { + description = "Melon Block", + tiles = {"bambooforest_melon_fruit_top.png", "bambooforest_melon_fruit_top.png", "bambooforest_melon_fruit_side.png", "bambooforest_melon_fruit_side.png", "bambooforest_melon_fruit_side.png", "bambooforest_melon_fruit_side.png"}, + sounds = default.node_sound_wood_defaults(), + is_ground_content = false, + groups = {snappy=3, flammable=4, fall_damage_add_percent=-30} +}) + +-- take over the growth from minetest_game bambooforest from here +minetest.override_item("bambooforest:melon_8", { + next_plant = "bambooforest:melon_block", + on_timer = farming.grow_block +}) + +-- replacement LBM for pre-nodetimer plants +minetest.register_lbm({ + name = "bambooforest:start_nodetimer_melon", + nodenames = {"bambooforest:melon_8"}, + action = function(pos, node) + farming.tick_short(pos) + end, +}) + +if minetest.get_modpath("bonemeal") then + +bonemeal:add_crop({ + {"bambooforest:melon_", 8, "bambooforest:seed_melon"}, +}) + + + +end diff --git a/bambooforest/license.txt b/bambooforest/license.txt new file mode 100755 index 0000000..af3dc37 --- /dev/null +++ b/bambooforest/license.txt @@ -0,0 +1,18 @@ + License +------------------------------------------------------------------------------------------------------------------------ +Copyright (C) 2021-2022: Atlante - AFL-1.1 +License for code: AFL-1.1 + +Attribution — You must give appropriate credit, provide a link to the license, and +indicate if changes were made. You may do so in any reasonable manner, but not in any way +that suggests the licensor endorses you or your use. + +ShareAlike — If you remix, transform, or build upon the material, you must distribute +your contributions under the same license as the original. + +Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +Anyone can fix the mod. My Discord "Atlante#1952" And my Mail Address "AtlanteEtDocteur@gmail.com" + + diff --git a/bambooforest/mod.conf b/bambooforest/mod.conf new file mode 100755 index 0000000..98543ac --- /dev/null +++ b/bambooforest/mod.conf @@ -0,0 +1,6 @@ + +author = Atlante +name = bambooforest + +description = Adds a bamboo biome with a few more objects. +title = Bamboo Forest diff --git a/bambooforest/schematics/bamboo_tree_1.mts b/bambooforest/schematics/bamboo_tree_1.mts new file mode 100644 index 0000000..5882748 Binary files /dev/null and b/bambooforest/schematics/bamboo_tree_1.mts differ diff --git a/bambooforest/schematics/bamboo_tree_2.mts b/bambooforest/schematics/bamboo_tree_2.mts new file mode 100644 index 0000000..0c1641d Binary files /dev/null and b/bambooforest/schematics/bamboo_tree_2.mts differ diff --git a/bambooforest/schematics/bamboo_tree_3.mts b/bambooforest/schematics/bamboo_tree_3.mts new file mode 100644 index 0000000..535b038 Binary files /dev/null and b/bambooforest/schematics/bamboo_tree_3.mts differ diff --git a/bambooforest/schematics/bamboo_tree_4.mts b/bambooforest/schematics/bamboo_tree_4.mts new file mode 100644 index 0000000..40d43cf Binary files /dev/null and b/bambooforest/schematics/bamboo_tree_4.mts differ diff --git a/bambooforest/schematics/bamboo_tree_5.mts b/bambooforest/schematics/bamboo_tree_5.mts new file mode 100644 index 0000000..832314a Binary files /dev/null and b/bambooforest/schematics/bamboo_tree_5.mts differ diff --git a/bambooforest/schematics/bamboo_tree_6.mts b/bambooforest/schematics/bamboo_tree_6.mts new file mode 100644 index 0000000..842140c Binary files /dev/null and b/bambooforest/schematics/bamboo_tree_6.mts differ diff --git a/bambooforest/schematics/bamboo_tree_7.mts b/bambooforest/schematics/bamboo_tree_7.mts new file mode 100644 index 0000000..8eead0d Binary files /dev/null and b/bambooforest/schematics/bamboo_tree_7.mts differ diff --git a/bambooforest/schematics/bamboo_tree_8.mts b/bambooforest/schematics/bamboo_tree_8.mts new file mode 100644 index 0000000..5f10bf4 Binary files /dev/null and b/bambooforest/schematics/bamboo_tree_8.mts differ diff --git a/bambooforest/schematics/bamboo_tree_9.mts b/bambooforest/schematics/bamboo_tree_9.mts new file mode 100644 index 0000000..1d6ec8f Binary files /dev/null and b/bambooforest/schematics/bamboo_tree_9.mts differ diff --git a/bambooforest/schematics/ruins_1.mts b/bambooforest/schematics/ruins_1.mts new file mode 100644 index 0000000..7fa3a60 Binary files /dev/null and b/bambooforest/schematics/ruins_1.mts differ diff --git a/bambooforest/screenshot.png b/bambooforest/screenshot.png new file mode 100644 index 0000000..b18b6ee Binary files /dev/null and b/bambooforest/screenshot.png differ diff --git a/bambooforest/textures/bamboo_block.png b/bambooforest/textures/bamboo_block.png new file mode 100644 index 0000000..a13b2f3 Binary files /dev/null and b/bambooforest/textures/bamboo_block.png differ diff --git a/bambooforest/textures/bamboo_cooked.png b/bambooforest/textures/bamboo_cooked.png new file mode 100644 index 0000000..fbe3359 Binary files /dev/null and b/bambooforest/textures/bamboo_cooked.png differ diff --git a/bambooforest/textures/bamboo_glass.png b/bambooforest/textures/bamboo_glass.png new file mode 100644 index 0000000..2e5e42e Binary files /dev/null and b/bambooforest/textures/bamboo_glass.png differ diff --git a/bambooforest/textures/bamboo_trapdoor.png b/bambooforest/textures/bamboo_trapdoor.png new file mode 100644 index 0000000..70a664c Binary files /dev/null and b/bambooforest/textures/bamboo_trapdoor.png differ diff --git a/bambooforest/textures/bamboo_trapdoor_side.png b/bambooforest/textures/bamboo_trapdoor_side.png new file mode 100644 index 0000000..402d6e6 Binary files /dev/null and b/bambooforest/textures/bamboo_trapdoor_side.png differ diff --git a/bambooforest/textures/bamboo_wood.png b/bambooforest/textures/bamboo_wood.png new file mode 100644 index 0000000..90e00ad Binary files /dev/null and b/bambooforest/textures/bamboo_wood.png differ diff --git a/bambooforest/textures/bamboo_wood_fence.png b/bambooforest/textures/bamboo_wood_fence.png new file mode 100644 index 0000000..3a708e3 Binary files /dev/null and b/bambooforest/textures/bamboo_wood_fence.png differ diff --git a/bambooforest/textures/bambooforest_bamboo_grass.png b/bambooforest/textures/bambooforest_bamboo_grass.png new file mode 100644 index 0000000..97d2471 Binary files /dev/null and b/bambooforest/textures/bambooforest_bamboo_grass.png differ diff --git a/bambooforest/textures/bambooforest_bamboo_grass_side.png b/bambooforest/textures/bambooforest_bamboo_grass_side.png new file mode 100644 index 0000000..8d5d739 Binary files /dev/null and b/bambooforest/textures/bambooforest_bamboo_grass_side.png differ diff --git a/bambooforest/textures/bambooforest_bamboo_sapling.png b/bambooforest/textures/bambooforest_bamboo_sapling.png new file mode 100644 index 0000000..bf03a3a Binary files /dev/null and b/bambooforest/textures/bambooforest_bamboo_sapling.png differ diff --git a/bambooforest/textures/bambooforest_bamboo_tree.png b/bambooforest/textures/bambooforest_bamboo_tree.png new file mode 100644 index 0000000..bd136ab Binary files /dev/null and b/bambooforest/textures/bambooforest_bamboo_tree.png differ diff --git a/bambooforest/textures/bambooforest_melon_1.png b/bambooforest/textures/bambooforest_melon_1.png new file mode 100644 index 0000000..06476dd Binary files /dev/null and b/bambooforest/textures/bambooforest_melon_1.png differ diff --git a/bambooforest/textures/bambooforest_melon_2.png b/bambooforest/textures/bambooforest_melon_2.png new file mode 100644 index 0000000..53156c6 Binary files /dev/null and b/bambooforest/textures/bambooforest_melon_2.png differ diff --git a/bambooforest/textures/bambooforest_melon_3.png b/bambooforest/textures/bambooforest_melon_3.png new file mode 100644 index 0000000..2af95cf Binary files /dev/null and b/bambooforest/textures/bambooforest_melon_3.png differ diff --git a/bambooforest/textures/bambooforest_melon_4.png b/bambooforest/textures/bambooforest_melon_4.png new file mode 100644 index 0000000..1b695b1 Binary files /dev/null and b/bambooforest/textures/bambooforest_melon_4.png differ diff --git a/bambooforest/textures/bambooforest_melon_5.png b/bambooforest/textures/bambooforest_melon_5.png new file mode 100644 index 0000000..bfcebf3 Binary files /dev/null and b/bambooforest/textures/bambooforest_melon_5.png differ diff --git a/bambooforest/textures/bambooforest_melon_6.png b/bambooforest/textures/bambooforest_melon_6.png new file mode 100644 index 0000000..478877c Binary files /dev/null and b/bambooforest/textures/bambooforest_melon_6.png differ diff --git a/bambooforest/textures/bambooforest_melon_7.png b/bambooforest/textures/bambooforest_melon_7.png new file mode 100644 index 0000000..0adb973 Binary files /dev/null and b/bambooforest/textures/bambooforest_melon_7.png differ diff --git a/bambooforest/textures/bambooforest_melon_8.png b/bambooforest/textures/bambooforest_melon_8.png new file mode 100644 index 0000000..26b15ab Binary files /dev/null and b/bambooforest/textures/bambooforest_melon_8.png differ diff --git a/bambooforest/textures/bambooforest_melon_fruit_side.png b/bambooforest/textures/bambooforest_melon_fruit_side.png new file mode 100644 index 0000000..13ed28b Binary files /dev/null and b/bambooforest/textures/bambooforest_melon_fruit_side.png differ diff --git a/bambooforest/textures/bambooforest_melon_fruit_top.png b/bambooforest/textures/bambooforest_melon_fruit_top.png new file mode 100644 index 0000000..243c967 Binary files /dev/null and b/bambooforest/textures/bambooforest_melon_fruit_top.png differ diff --git a/bambooforest/textures/default_dirt.png b/bambooforest/textures/default_dirt.png new file mode 100755 index 0000000..4fd63b1 Binary files /dev/null and b/bambooforest/textures/default_dirt.png differ diff --git a/bambooforest/textures/default_junglegrass.png b/bambooforest/textures/default_junglegrass.png new file mode 100755 index 0000000..33e2826 Binary files /dev/null and b/bambooforest/textures/default_junglegrass.png differ diff --git a/bambooforest/textures/doors_bamboo_door.png b/bambooforest/textures/doors_bamboo_door.png new file mode 100644 index 0000000..0084377 Binary files /dev/null and b/bambooforest/textures/doors_bamboo_door.png differ diff --git a/bambooforest/textures/doors_item_bamboo.png b/bambooforest/textures/doors_item_bamboo.png new file mode 100644 index 0000000..30b09f2 Binary files /dev/null and b/bambooforest/textures/doors_item_bamboo.png differ diff --git a/bambooforest/textures/fibre_bamboo.png b/bambooforest/textures/fibre_bamboo.png new file mode 100644 index 0000000..d68e4a0 Binary files /dev/null and b/bambooforest/textures/fibre_bamboo.png differ diff --git a/bambooforest/textures/granite.png b/bambooforest/textures/granite.png new file mode 100644 index 0000000..f92779c Binary files /dev/null and b/bambooforest/textures/granite.png differ diff --git a/bambooforest/textures/granite_block.png b/bambooforest/textures/granite_block.png new file mode 100644 index 0000000..834c214 Binary files /dev/null and b/bambooforest/textures/granite_block.png differ diff --git a/bambooforest/textures/granite_brick.png b/bambooforest/textures/granite_brick.png new file mode 100644 index 0000000..4fb1f2b Binary files /dev/null and b/bambooforest/textures/granite_brick.png differ diff --git a/bambooforest/textures/marble.png b/bambooforest/textures/marble.png new file mode 100755 index 0000000..7119e4b Binary files /dev/null and b/bambooforest/textures/marble.png differ diff --git a/bambooforest/textures/marble_brick.png b/bambooforest/textures/marble_brick.png new file mode 100755 index 0000000..a305976 Binary files /dev/null and b/bambooforest/textures/marble_brick.png differ diff --git a/bambooforest/textures/melon.png b/bambooforest/textures/melon.png new file mode 100644 index 0000000..43ce27d Binary files /dev/null and b/bambooforest/textures/melon.png differ diff --git a/bambooforest/textures/melon_seed.png b/bambooforest/textures/melon_seed.png new file mode 100644 index 0000000..3d17b41 Binary files /dev/null and b/bambooforest/textures/melon_seed.png differ diff --git a/bambooforest/textures/mud_brick.png b/bambooforest/textures/mud_brick.png new file mode 100644 index 0000000..829a2af Binary files /dev/null and b/bambooforest/textures/mud_brick.png differ diff --git a/bambooforest/textures/old_bricks.png b/bambooforest/textures/old_bricks.png new file mode 100644 index 0000000..c096968 Binary files /dev/null and b/bambooforest/textures/old_bricks.png differ diff --git a/description.txt b/description.txt new file mode 100755 index 0000000..b78ee8a --- /dev/null +++ b/description.txt @@ -0,0 +1 @@ +Add many biomes,trees and decorative block. diff --git a/dorwinion/donjon.png b/dorwinion/donjon.png new file mode 100644 index 0000000..02420b8 Binary files /dev/null and b/dorwinion/donjon.png differ diff --git a/dorwinion/init.lua b/dorwinion/init.lua new file mode 100644 index 0000000..18ccf9c --- /dev/null +++ b/dorwinion/init.lua @@ -0,0 +1,6 @@ +local default_path = minetest.get_modpath("dorwinion") + +dofile(default_path.."/nodes.lua") +dofile(default_path.."/mapgen.lua") +dofile(default_path.."/moreblocks.lua") +dofile(default_path.."/walls.lua") diff --git a/dorwinion/license.txt b/dorwinion/license.txt new file mode 100755 index 0000000..af3dc37 --- /dev/null +++ b/dorwinion/license.txt @@ -0,0 +1,18 @@ + License +------------------------------------------------------------------------------------------------------------------------ +Copyright (C) 2021-2022: Atlante - AFL-1.1 +License for code: AFL-1.1 + +Attribution — You must give appropriate credit, provide a link to the license, and +indicate if changes were made. You may do so in any reasonable manner, but not in any way +that suggests the licensor endorses you or your use. + +ShareAlike — If you remix, transform, or build upon the material, you must distribute +your contributions under the same license as the original. + +Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +Anyone can fix the mod. My Discord "Atlante#1952" And my Mail Address "AtlanteEtDocteur@gmail.com" + + diff --git a/dorwinion/mapgen.lua b/dorwinion/mapgen.lua new file mode 100644 index 0000000..ac61d1f --- /dev/null +++ b/dorwinion/mapgen.lua @@ -0,0 +1,278 @@ + -- Dorwinion + + minetest.register_biome({ + name = "dorwinion", + -- node_dust = "default:snow", + node_top = "dorwinion:dorwinion_grass", + depth_top = 1, + node_filler = "dorwinion:dorwinion", + depth_filler = 150, + node_riverbed = "default:sand", + depth_riverbed = 2, + node_dungeon = "dorwinion:dorwinion_brick", + node_dungeon_alt = "dorwinion:dorwinion_brick_with_moss", + -- node_dungeon_stair = "stairs:stair_cobble", + y_max = 31000, + y_min = 4, + heat_point = 52, + humidity_point = 45, + }) + +minetest.register_decoration({ + name = "dorwinion:tree_1", + deco_type = "schematic", + place_on = {"dorwinion:dorwinion_grass"}, + place_offset_y = 0, + sidelen = 16, + fill_ratio = 0.002265, + biomes = {"dorwinion"}, + y_max = 31000, + y_min = -20, + schematic = minetest.get_modpath("dorwinion").."/schematics/tree_1.mts", + flags = "place_center_x, place_center_z", + rotation = "random", +}) + +minetest.register_decoration({ + name = "dorwinion:tree_2", + deco_type = "schematic", + place_on = {"dorwinion:dorwinion_grass"}, + place_offset_y = 0, + sidelen = 16, + fill_ratio = 0.001225, + biomes = {"dorwinion"}, + y_max = 31000, + y_min = -20, + schematic = minetest.get_modpath("dorwinion").."/schematics/tree_2.mts", + flags = "place_center_x, place_center_z", + rotation = "random", +}) + + + +minetest.register_decoration({ + name = "dorwinion:ruins", + deco_type = "schematic", + place_on = {"dorwinion:dorwinion_grass"}, + place_offset_y = -1, + sidelen = 16, + fill_ratio = 0.000222, + biomes = {"dorwinion"}, + y_max = 31000, + y_min = -20, + schematic = minetest.get_modpath("dorwinion").."/schematics/ruins.mts", + flags = "place_center_x, place_center_z", + rotation = "random", +}) + +minetest.register_decoration({ + name = "dorwinion:bush_1", + deco_type = "schematic", + place_on = {"dorwinion:dorwinion_grass"}, + place_offset_y = 0, + sidelen = 16, + fill_ratio = 0.015265, + biomes = {"dorwinion"}, + y_max = 31000, + y_min = -20, + schematic = minetest.get_modpath("dorwinion").."/schematics/bush_1.mts", + flags = "place_center_x, place_center_z", + rotation = "random", +}) + +minetest.register_decoration({ + name = "dorwinion:tree_3", + deco_type = "schematic", + place_on = {"dorwinion:dorwinion_grass"}, + place_offset_y = 0, + sidelen = 16, + fill_ratio = 0.001265, + biomes = {"dorwinion"}, + y_max = 31000, + y_min = -20, + schematic = minetest.get_modpath("dorwinion").."/schematics/tree_3.mts", + flags = "place_center_x, place_center_z", + rotation = "random", +}) + +minetest.register_decoration({ + name = "dorwinion:tree_4", + deco_type = "schematic", + place_on = {"dorwinion:dorwinion_grass"}, + place_offset_y = 0, + sidelen = 16, + fill_ratio = 0.002265, + biomes = {"dorwinion"}, + y_max = 31000, + y_min = -20, + schematic = minetest.get_modpath("dorwinion").."/schematics/tree_4.mts", + flags = "place_center_x, place_center_z", + rotation = "random", +}) + +minetest.register_decoration({ + name = "dorwinion:tree_5", + deco_type = "schematic", + place_on = {"dorwinion:dorwinion_grass"}, + place_offset_y = 0, + sidelen = 16, + fill_ratio = 0.002265, + biomes = {"dorwinion"}, + y_max = 31000, + y_min = -20, + schematic = minetest.get_modpath("dorwinion").."/schematics/tree_5.mts", + flags = "place_center_x, place_center_z", + rotation = "random", +}) + +minetest.register_decoration({ + name = "dorwinion:aspen_tree", + deco_type = "schematic", + place_on = {"dorwinion:dorwinion_grass"}, + place_offset_y = 0, + sidelen = 16, + fill_ratio = 0.002265, + biomes = {"dorwinion"}, + y_max = 31000, + y_min = -20, + schematic = minetest.get_modpath("default").."/schematics/aspen_tree.mts", + flags = "place_center_x, place_center_z", + rotation = "random", +}) + +minetest.register_decoration({ + deco_type = "simple", + place_on = {"dorwinion:dorwinion_grass"}, + sidelen = 16, + fill_ratio = 0.3, + biomes = {"dorwinion"}, + decoration = { + "default:grass_1", "default:grass_2", + "default:grass_3", "default:grass_4", + "default:grass_5", + } +}) + +minetest.register_decoration({ + deco_type = "simple", + place_on = {"dorwinion:dorwinion_grass"}, + sidelen = 16, + fill_ratio = 0.05, + biomes = {"dorwinion"}, + decoration = { + "flowers:rose", "flowers:dandelion_yellow", + "flowers:dandelion_white", "flowers:chryssanthemum_green", + "flowers:mushroom_brown", + } +}) + +minetest.register_decoration({ + deco_type = "simple", + place_on = {"dorwinion:dorwinion_grass"}, + sidelen = 16, + fill_ratio = 0.05, + biomes = {"dorwinion"}, + decoration = { +"flowers:dandelion_yellow", + } +}) + +minetest.register_decoration({ + deco_type = "simple", + place_on = {"dorwinion:dorwinion_grass"}, + sidelen = 16, + fill_ratio = 0.05, + biomes = {"dorwinion"}, + decoration = { + "flowers:dandelion_white", + } +}) + +minetest.register_decoration({ + deco_type = "simple", + place_on = {"dorwinion:dorwinion_grass"}, + sidelen = 16, + fill_ratio = 0.05, + biomes = {"dorwinion"}, + decoration = { +"flowers:chryssanthemum_green", + + } +}) + +minetest.register_decoration({ + deco_type = "simple", + place_on = {"dorwinion:dorwinion_grass"}, + sidelen = 16, + fill_ratio = 0.01, + biomes = {"dorwinion"}, + decoration = { + "flowers:mushroom_brown", + } +}) + +minetest.register_decoration({ + deco_type = "simple", + place_on = {"dorwinion:dorwinion_grass"}, + sidelen = 16, + fill_ratio = 0.08, + biomes = {"dorwinion"}, + decoration = { + "dorwinion:dorwinion_leaves", + } +}) + +minetest.register_decoration({ + deco_type = "simple", + place_on = {"dorwinion:dorwinion_grass"}, + sidelen = 16, + fill_ratio = 0.05, + biomes = {"dorwinion"}, + decoration = { +"butterflies:butterfly_white", "butterflies:butterfly_red", "butterflies:butterfly_violet", + } +}) + +minetest.register_decoration({ + deco_type = "simple", + place_on = {"dorwinion:dorwinion_grass"}, + sidelen = 16, + fill_ratio = 0.02, + biomes = {"dorwinion"}, + decoration = { +"japaneseforest:red_firefly", "japaneseforest:green_firefly", "fireflies:firefly", + } +}) + +minetest.register_decoration({ + deco_type = "simple", + place_on = {"dorwinion:dorwinion_grass", "default:aspen_tree"}, + sidelen = 16, + fill_ratio = 0.02, + biomes = {"dorwinion"}, + decoration = { +"dorwinion:dorwinion_glow_leaves", + } +}) + + -- dorwinion + + minetest.register_ore({ + ore_type = "blob", + ore = "dorwinion:dorwinion", + wherein = {"default:dirt"}, + clust_scarcity = 16 * 16 * 16, + clust_size = 5, + y_max = -50, + y_min = -31000, + noise_threshold = 0.0, + noise_params = { + offset = 0.5, + biomes = {"dorwinion"}, + scale = 0.2, + spread = {x = 5, y = 5, z = 5}, + seed = 766, + octaves = 1, + persist = 0.0 + }, + }) diff --git a/dorwinion/mod.conf b/dorwinion/mod.conf new file mode 100755 index 0000000..eb642c5 --- /dev/null +++ b/dorwinion/mod.conf @@ -0,0 +1,6 @@ + +author = Atlante +name = dorwinion +description = Adds a Dorwinion biome with a few more objects. +title = Dorwinion +depends = default, japaneseforest diff --git a/dorwinion/moreblocks.lua b/dorwinion/moreblocks.lua new file mode 100644 index 0000000..d8ad56a --- /dev/null +++ b/dorwinion/moreblocks.lua @@ -0,0 +1,50 @@ +-----------------Moreblock +if minetest.get_modpath("moreblocks") then + + stairsplus:register_all("dorwinion_brick", "stone", "dorwinion:dorwinion_brick", { + description = "Dorwinion Brick", + tiles = {"dorwinion_brick.png"}, + groups = {cracky = 2, flammable = 2, stone = 1, level = 1}, + sounds = default.node_sound_stone_defaults(), + }) + + stairsplus:register_all("dorwinion", "stone", "dorwinion:dorwinion", { + description = "Dorwinion", + tiles = {"dorwinion.png"}, + groups = {cracky = 2, flammable = 2, stone = 1, level = 1}, + sounds = default.node_sound_stone_defaults(), + }) + + stairsplus:register_all("dorwinion_carved", "stone", "dorwinion:dorwinion_carved", { + description = "Dorwinion Carved", + tiles = {"dorwinion_carved.png"}, + groups = {cracky = 2, flammable = 2, stone = 1, level = 1}, + sounds = default.node_sound_stone_defaults(), + }) + + stairsplus:register_all("dorwinion_brick_cracked", "stone", "dorwinion:dorwinion_brick_cracked", { + description = "Dorwinion Brick Cracked", + tiles = {"dorwinion_brick_cracked.png"}, + groups = {cracky = 2, flammable = 2, stone = 1, level = 1}, + sounds = default.node_sound_stone_defaults(), + }) + + stairsplus:register_all("dorwinion_brick_with_flowers", "stone", "dorwinion:dorwinion_brick_with_flowers", { + description = "Dorwinion Brick With Flowers", + tiles = {"dorwinion_brick_with_flowers.png"}, + groups = {cracky = 2, flammable = 2, stone = 1, level = 1}, + sounds = default.node_sound_stone_defaults(), + }) + + stairsplus:register_all("dorwinion_brick_with_moss", "stone", "dorwinion:dorwinion_brick_with_moss", { + description = "Dorwinion Brick With Moss", + tiles = {"dorwinion_brick_with_moss.png"}, + groups = {cracky = 2, flammable = 2, stone = 1, level = 1}, + sounds = default.node_sound_stone_defaults(), + }) + + + + + +end diff --git a/dorwinion/nodes.lua b/dorwinion/nodes.lua new file mode 100644 index 0000000..7ed844a --- /dev/null +++ b/dorwinion/nodes.lua @@ -0,0 +1,150 @@ +minetest.register_node("dorwinion:dorwinion_brick", { + description = "Dorwninion Brick", + paramtype2 = "facedir", + place_param2 = 0, + tiles = {"dorwinion_brick.png"}, + is_ground_content = false, + groups = {cracky = 2, flammable = 2, stone = 1, level = 1}, + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_craft({ + output = "dorwinion:dorwinion_brick 4", + recipe = { + {"dorwinion:dorwinion", "dorwinion:dorwinion"}, + {"dorwinion:dorwinion", "dorwinion:dorwinion"}, + } +}) +minetest.register_node("dorwinion:dorwinion_brick_with_flowers", { + description = "Dorwninion Brick With Flowers", + paramtype2 = "facedir", + place_param2 = 0, + tiles = {"dorwinion_brick_with_flowers.png"}, + is_ground_content = false, + groups = {cracky = 2, flammable = 2, stone = 1, level = 1}, + sounds = default.node_sound_stone_defaults(), +}) +minetest.register_craft({ + output = "dorwinion:dorwinion_brick_with_flowers 2", + recipe = { + {"dorwinion:dorwinion_brick", "flowers:rose"}, + {"dorwinion:dorwinion_brick", "flowers:rose"}, + } +}) + +minetest.register_node("dorwinion:dorwinion_brick_with_moss", { + description = "Dorwninion Brick With Moss", + paramtype2 = "facedir", + place_param2 = 0, + tiles = {"dorwinion_brick_with_moss.png"}, + is_ground_content = false, + groups = {cracky = 2, flammable = 2, stone = 1, level = 1}, + sounds = default.node_sound_stone_defaults(), +}) +minetest.register_craft({ + output = "dorwinion:dorwinion_brick_with_moss 3", + recipe = { + {"dorwinion:dorwinion_brick", "bucket:bucket_water"}, + {"dorwinion:dorwinion_brick", "dorwinion:dorwinion_brick"}, + } +}) + +minetest.register_node("dorwinion:dorwinion_carved", { + description = "Dorwninion Carved", + paramtype2 = "facedir", + place_param2 = 0, + tiles = {"dorwinion_carved.png"}, + is_ground_content = false, + groups = {cracky = 2, flammable = 2, stone = 1, level = 1}, + sounds = default.node_sound_stone_defaults(), +}) +minetest.register_craft({ + output = "dorwinion:dorwinion_carved 4", + recipe = { + {"dorwinion:dorwinion_brick", "dorwinion:dorwinion_brick_cracked"}, + {"dorwinion:dorwinion_brick_cracked", "dorwinion:dorwinion_brick"}, + } +}) + +minetest.register_node("dorwinion:dorwinion_brick_cracked", { + description = "Dorwninion Brick Cracked", + paramtype2 = "facedir", + place_param2 = 0, + tiles = {"dorwinion_brick_cracked.png"}, + is_ground_content = false, + groups = {cracky = 2, flammable = 2, stone = 1, level = 1}, + sounds = default.node_sound_stone_defaults(), +}) +minetest.register_craft({ + output = "dorwinion:dorwinion_brick_cracked 4", + recipe = { + {"dorwinion:dorwinion_brick", "dorwinion:dorwinion_brick"}, + {"dorwinion:dorwinion_brick", "dorwinion:dorwinion_brick"}, + } +}) + +minetest.register_node("dorwinion:dorwinion", { + description = "Dorwninion", + paramtype2 = "facedir", + place_param2 = 0, + tiles = {"dorwinion.png"}, + is_ground_content = false, + groups = {cracky = 2, flammable = 2, stone = 1, level = 1}, + sounds = default.node_sound_stone_defaults(), +}) + + +minetest.register_node("dorwinion:dorwinion_leaves", { + description = "Dorwinion Leaves", + drawtype = "allfaces_optional", + waving = 1, + tiles = {"dorwinion_leaves.png"}, + paramtype = "light", + is_ground_content = false, + groups = {snappy = 3, leafdecay = 3, flammable = 2, leaves = 1}, + drop = { + max_items = 1, + items = { + {items = {""}, rarity = 20}, + {items = {"dorwinion:dorwinion_leaves"}} + } + }, + sounds = default.node_sound_leaves_defaults(), + + after_place_node = after_place_leaves, +}) + +minetest.register_node("dorwinion:dorwinion_glow_leaves", { + description = "Dorwinion Glowing Leaves", + drawtype = "allfaces_optional", + waving = 1, + tiles = {"dorwinion_glow_leaves.png"}, + paramtype = "light", + light_source = 10, + is_ground_content = false, + groups = {snappy = 3, leafdecay = 3, flammable = 2, leaves = 1}, + drop = { + max_items = 1, + items = { + {items = {""}, rarity = 20}, + {items = {"dorwinion:dorwinion_glow_leaves"}} + } + }, + sounds = default.node_sound_leaves_defaults(), + + after_place_node = after_place_leaves, +}) + +minetest.register_node("dorwinion:dorwinion_grass", { + description = "Dorwinion Grass", + tiles = {"dorwinion_grass.png", "dorwinion.png", + {name = "dorwinion.png^dorwinion_grass_side.png", + tileable_vertical = false}}, + groups = {crumbly = 3, soil = 1, spreading_dirt_type = 1}, + drop = "default:dirt", + sounds = default.node_sound_dirt_defaults({ + footstep = {name = "default_dirt_footstep", gain = 0.25}, + }), +}) + + diff --git a/dorwinion/schematics/bush_1.mts b/dorwinion/schematics/bush_1.mts new file mode 100644 index 0000000..5c63278 Binary files /dev/null and b/dorwinion/schematics/bush_1.mts differ diff --git a/dorwinion/schematics/dorwinion.mts b/dorwinion/schematics/dorwinion.mts new file mode 100644 index 0000000..ea9ab02 Binary files /dev/null and b/dorwinion/schematics/dorwinion.mts differ diff --git a/dorwinion/schematics/ruins.mts b/dorwinion/schematics/ruins.mts new file mode 100644 index 0000000..77b0a9e Binary files /dev/null and b/dorwinion/schematics/ruins.mts differ diff --git a/dorwinion/schematics/tree_1.mts b/dorwinion/schematics/tree_1.mts new file mode 100644 index 0000000..a8b59db Binary files /dev/null and b/dorwinion/schematics/tree_1.mts differ diff --git a/dorwinion/schematics/tree_2.mts b/dorwinion/schematics/tree_2.mts new file mode 100644 index 0000000..118b137 Binary files /dev/null and b/dorwinion/schematics/tree_2.mts differ diff --git a/dorwinion/schematics/tree_3.mts b/dorwinion/schematics/tree_3.mts new file mode 100644 index 0000000..45d896e Binary files /dev/null and b/dorwinion/schematics/tree_3.mts differ diff --git a/dorwinion/schematics/tree_4.mts b/dorwinion/schematics/tree_4.mts new file mode 100644 index 0000000..9401f45 Binary files /dev/null and b/dorwinion/schematics/tree_4.mts differ diff --git a/dorwinion/schematics/tree_5.mts b/dorwinion/schematics/tree_5.mts new file mode 100644 index 0000000..4bb9b56 Binary files /dev/null and b/dorwinion/schematics/tree_5.mts differ diff --git a/dorwinion/screenshot.png b/dorwinion/screenshot.png new file mode 100644 index 0000000..4fedbb5 Binary files /dev/null and b/dorwinion/screenshot.png differ diff --git a/dorwinion/textures/default_aspen_leaves.png b/dorwinion/textures/default_aspen_leaves.png new file mode 100755 index 0000000..b0ad6c2 Binary files /dev/null and b/dorwinion/textures/default_aspen_leaves.png differ diff --git a/dorwinion/textures/default_aspen_sapling.png b/dorwinion/textures/default_aspen_sapling.png new file mode 100755 index 0000000..665629d Binary files /dev/null and b/dorwinion/textures/default_aspen_sapling.png differ diff --git a/dorwinion/textures/default_aspen_tree.png b/dorwinion/textures/default_aspen_tree.png new file mode 100755 index 0000000..6779a63 Binary files /dev/null and b/dorwinion/textures/default_aspen_tree.png differ diff --git a/dorwinion/textures/default_aspen_tree_top.png b/dorwinion/textures/default_aspen_tree_top.png new file mode 100755 index 0000000..9f9dfc1 Binary files /dev/null and b/dorwinion/textures/default_aspen_tree_top.png differ diff --git a/dorwinion/textures/default_aspen_wood.png b/dorwinion/textures/default_aspen_wood.png new file mode 100755 index 0000000..1b2797f Binary files /dev/null and b/dorwinion/textures/default_aspen_wood.png differ diff --git a/dorwinion/textures/default_fence_aspen_wood.png b/dorwinion/textures/default_fence_aspen_wood.png new file mode 100755 index 0000000..1b2797f Binary files /dev/null and b/dorwinion/textures/default_fence_aspen_wood.png differ diff --git a/dorwinion/textures/default_fence_rail_aspen_wood.png b/dorwinion/textures/default_fence_rail_aspen_wood.png new file mode 100755 index 0000000..cbbad28 Binary files /dev/null and b/dorwinion/textures/default_fence_rail_aspen_wood.png differ diff --git a/dorwinion/textures/default_fence_rail_wood.png b/dorwinion/textures/default_fence_rail_wood.png new file mode 100755 index 0000000..8913dac Binary files /dev/null and b/dorwinion/textures/default_fence_rail_wood.png differ diff --git a/dorwinion/textures/default_fence_wood.png b/dorwinion/textures/default_fence_wood.png new file mode 100755 index 0000000..a8752a1 Binary files /dev/null and b/dorwinion/textures/default_fence_wood.png differ diff --git a/dorwinion/textures/default_tree.png b/dorwinion/textures/default_tree.png new file mode 100755 index 0000000..4c1d371 Binary files /dev/null and b/dorwinion/textures/default_tree.png differ diff --git a/dorwinion/textures/default_tree_top.png b/dorwinion/textures/default_tree_top.png new file mode 100755 index 0000000..a4d391b Binary files /dev/null and b/dorwinion/textures/default_tree_top.png differ diff --git a/dorwinion/textures/default_wood.png b/dorwinion/textures/default_wood.png new file mode 100755 index 0000000..a8752a1 Binary files /dev/null and b/dorwinion/textures/default_wood.png differ diff --git a/dorwinion/textures/dorwinion.png b/dorwinion/textures/dorwinion.png new file mode 100644 index 0000000..3bf246b Binary files /dev/null and b/dorwinion/textures/dorwinion.png differ diff --git a/dorwinion/textures/dorwinion_brick.png b/dorwinion/textures/dorwinion_brick.png new file mode 100644 index 0000000..34d0d8f Binary files /dev/null and b/dorwinion/textures/dorwinion_brick.png differ diff --git a/dorwinion/textures/dorwinion_brick_cracked.png b/dorwinion/textures/dorwinion_brick_cracked.png new file mode 100644 index 0000000..0eb6149 Binary files /dev/null and b/dorwinion/textures/dorwinion_brick_cracked.png differ diff --git a/dorwinion/textures/dorwinion_brick_with_flowers.png b/dorwinion/textures/dorwinion_brick_with_flowers.png new file mode 100644 index 0000000..09ea03f Binary files /dev/null and b/dorwinion/textures/dorwinion_brick_with_flowers.png differ diff --git a/dorwinion/textures/dorwinion_brick_with_moss.png b/dorwinion/textures/dorwinion_brick_with_moss.png new file mode 100644 index 0000000..6e2e071 Binary files /dev/null and b/dorwinion/textures/dorwinion_brick_with_moss.png differ diff --git a/dorwinion/textures/dorwinion_carved.png b/dorwinion/textures/dorwinion_carved.png new file mode 100644 index 0000000..94c4989 Binary files /dev/null and b/dorwinion/textures/dorwinion_carved.png differ diff --git a/dorwinion/textures/dorwinion_glow_leaves.png b/dorwinion/textures/dorwinion_glow_leaves.png new file mode 100644 index 0000000..dc5a858 Binary files /dev/null and b/dorwinion/textures/dorwinion_glow_leaves.png differ diff --git a/dorwinion/textures/dorwinion_grass.png b/dorwinion/textures/dorwinion_grass.png new file mode 100644 index 0000000..3f0d609 Binary files /dev/null and b/dorwinion/textures/dorwinion_grass.png differ diff --git a/dorwinion/textures/dorwinion_grass_side.png b/dorwinion/textures/dorwinion_grass_side.png new file mode 100644 index 0000000..038fa69 Binary files /dev/null and b/dorwinion/textures/dorwinion_grass_side.png differ diff --git a/dorwinion/textures/dorwinion_leaves.png b/dorwinion/textures/dorwinion_leaves.png new file mode 100644 index 0000000..0127872 Binary files /dev/null and b/dorwinion/textures/dorwinion_leaves.png differ diff --git a/dorwinion/walls.lua b/dorwinion/walls.lua new file mode 100644 index 0000000..a7b90cb --- /dev/null +++ b/dorwinion/walls.lua @@ -0,0 +1,43 @@ +if minetest.get_modpath("walls") then + + +walls.register(":walls:dorwinion_brick", "Dorwinion Brick Wall", "dorwinion_brick.png", + "dorwinion:dorwinion_brick", default.node_sound_stone_defaults()) + +walls.register(":walls:dorwinion_carved", "Dorwinion Carved Wall", "dorwinion_carved.png", + "dorwinion:dorwinion_carved", default.node_sound_stone_defaults()) + +walls.register(":walls:dorwinion_brick_with_moss", "Dorwinion Brick With Moss Wall", "dorwinion_brick_with_moss.png", + "dorwinion:dorwinion_brick_with_moss", default.node_sound_stone_defaults()) + + +end + +minetest.register_craft({ + output = "walls:dorwinion_brick 6", + recipe = { + {"dorwinion:dorwinion_brick", "dorwinion:dorwinion_brick", "dorwinion:dorwinion_brick"}, + {"dorwinion:dorwinion_brick", "dorwinion:dorwinion_brick", "dorwinion:dorwinion_brick"}, + {"", "", ""}, + } +}) + +minetest.register_craft({ + output = "walls:dorwinion_carved 6", + recipe = { + {"dorwinion:dorwinion_carved", "dorwinion:dorwinion_carved", "dorwinion:dorwinion_carved"}, + {"dorwinion:dorwinion_carved", "dorwinion:dorwinion_carved", "dorwinion:dorwinion_carved"}, + {"", "", ""}, + } +}) + +minetest.register_craft({ + output = "walls:dorwinion_brick_with_moss 6", + recipe = { + {"dorwinion:dorwinion_brick_with_moss", "dorwinion:dorwinion_brick_with_moss", "dorwinion:dorwinion_brick_with_moss"}, + {"dorwinion:dorwinion_brick_with_moss", "dorwinion:dorwinion_brick_with_moss", "dorwinion:dorwinion_brick_with_moss"}, + {"", "", ""}, + } +}) + + diff --git a/frost_land/README.md b/frost_land/README.md new file mode 100755 index 0000000..35d2723 --- /dev/null +++ b/frost_land/README.md @@ -0,0 +1,2 @@ +# frost_land +A simple and pleasant little mod, which adds a Frost Land biome with a few more objects. diff --git a/frost_land/crafting.lua b/frost_land/crafting.lua new file mode 100644 index 0000000..adff020 --- /dev/null +++ b/frost_land/crafting.lua @@ -0,0 +1,17 @@ +------------Crafting +minetest.register_craft({ + output = "frost_land:frost_land_wood 4", + recipe = { + {"frost_land:frost_land_tree"}, + } +}) + + +minetest.register_craft({ + output = "frost_land:frost_land_sapling", + recipe = { + {"default:stick", "frost_land:frost_land_leaves_1"}, + {"frost_land:frost_land_leaves_1", "frost_land:frost_land_leaves_2"}, + } +}) + diff --git a/frost_land/depends.txt b/frost_land/depends.txt new file mode 100644 index 0000000..9ef3c37 --- /dev/null +++ b/frost_land/depends.txt @@ -0,0 +1,3 @@ +default +moreblocks? +bonemeal? diff --git a/frost_land/fireflies.lua b/frost_land/fireflies.lua new file mode 100644 index 0000000..dbd09dd --- /dev/null +++ b/frost_land/fireflies.lua @@ -0,0 +1,343 @@ + +-------------------------------------------------------------------------------------------------------------------------------- +minetest.register_node("frost_land:blue_firefly", { + description = "Blue Firefly", + drawtype = "plantlike", + tiles = {{ + name = "frost_land_blue_firefly_animated.png", + animation = { + type = "vertical_frames", + aspect_w = 16, + aspect_h = 16, + length = 1.5 + }, + }}, + inventory_image = "frost_land_blue_firefly.png", + wield_image = "frost_land_blue_firefly.png", + waving = 1, + paramtype = "light", + sunlight_propagates = true, + buildable_to = true, + walkable = false, + groups = {catchable = 1}, + selection_box = { + type = "fixed", + fixed = {-0.1, -0.1, -0.1, 0.1, 0.1, 0.1}, + }, + light_source = 6, + floodable = true, + on_place = function(itemstack, placer, pointed_thing) + local player_name = placer:get_player_name() + local pos = pointed_thing.above + + if not minetest.is_protected(pos, player_name) and + not minetest.is_protected(pointed_thing.under, player_name) and + minetest.get_node(pos).name == "air" then + minetest.set_node(pos, {name = "frost_land:blue_firefly"}) + minetest.get_node_timer(pos):start(1) + itemstack:take_item() + end + return itemstack + end, + on_timer = function(pos, elapsed) + if minetest.get_node_light(pos) > 11 then + minetest.set_node(pos, {name = "frost_land:hidden_blue_firefly"}) + end + minetest.get_node_timer(pos):start(30) + end +}) + +minetest.register_node("frost_land:hidden_blue_firefly", { + description = "Hidden Blue Firefly", + drawtype = "airlike", + inventory_image = "frost_land_blue_firefly.png^default_invisible_node_overlay.png", + wield_image = "frost_land_blue_firefly.png^default_invisible_node_overlay.png", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + pointable = false, + diggable = false, + buildable_to = true, + drop = "", + groups = {not_in_creative_inventory = 1}, + floodable = true, + on_place = function(itemstack, placer, pointed_thing) + local player_name = placer:get_player_name() + local pos = pointed_thing.above + + if not minetest.is_protected(pos, player_name) and + not minetest.is_protected(pointed_thing.under, player_name) and + minetest.get_node(pos).name == "air" then + minetest.set_node(pos, {name = "frost_land:hidden_blue_firefly"}) + minetest.get_node_timer(pos):start(1) + itemstack:take_item() + end + return itemstack + end, + on_timer = function(pos, elapsed) + if minetest.get_node_light(pos) <= 11 then + minetest.set_node(pos, {name = "frost_land:blue_firefly"}) + end + minetest.get_node_timer(pos):start(30) + end +}) + +------------------------------------------------------------------------------------------------------------------------------- +minetest.register_node("frost_land:pink_firefly", { + description = "Pink Firefly", + drawtype = "plantlike", + tiles = {{ + name = "frost_land_pink_firefly_animated.png", + animation = { + type = "vertical_frames", + aspect_w = 16, + aspect_h = 16, + length = 1.5 + }, + }}, + inventory_image = "frost_land_pink_firefly.png", + wield_image = "frost_land_pink_firefly.png", + waving = 1, + paramtype = "light", + sunlight_propagates = true, + buildable_to = true, + walkable = false, + groups = {catchable = 1}, + selection_box = { + type = "fixed", + fixed = {-0.1, -0.1, -0.1, 0.1, 0.1, 0.1}, + }, + light_source = 6, + floodable = true, + on_place = function(itemstack, placer, pointed_thing) + local player_name = placer:get_player_name() + local pos = pointed_thing.above + + if not minetest.is_protected(pos, player_name) and + not minetest.is_protected(pointed_thing.under, player_name) and + minetest.get_node(pos).name == "air" then + minetest.set_node(pos, {name = "frost_land:pink_firefly"}) + minetest.get_node_timer(pos):start(1) + itemstack:take_item() + end + return itemstack + end, + on_timer = function(pos, elapsed) + if minetest.get_node_light(pos) > 11 then + minetest.set_node(pos, {name = "frost_land:hidden_pink_firefly"}) + end + minetest.get_node_timer(pos):start(30) + end +}) + +minetest.register_node("frost_land:hidden_pink_firefly", { + description = "Hidden Pink Firefly", + drawtype = "airlike", + inventory_image = "frost_land_pink_firefly.png^default_invisible_node_overlay.png", + wield_image = "frost_land_pink_firefly.png^default_invisible_node_overlay.png", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + pointable = false, + diggable = false, + buildable_to = true, + drop = "", + groups = {not_in_creative_inventory = 1}, + floodable = true, + on_place = function(itemstack, placer, pointed_thing) + local player_name = placer:get_player_name() + local pos = pointed_thing.above + + if not minetest.is_protected(pos, player_name) and + not minetest.is_protected(pointed_thing.under, player_name) and + minetest.get_node(pos).name == "air" then + minetest.set_node(pos, {name = "frost_land:hidden_pink_firefly"}) + minetest.get_node_timer(pos):start(1) + itemstack:take_item() + end + return itemstack + end, + on_timer = function(pos, elapsed) + if minetest.get_node_light(pos) <= 11 then + minetest.set_node(pos, {name = "frost_land:pink_firefly"}) + end + minetest.get_node_timer(pos):start(30) + end +}) + +------------------------------------------------------------------------------------------------------------------------------- +minetest.register_node("frost_land:cyan_firefly", { + description = "Cyan Firefly", + drawtype = "plantlike", + tiles = {{ + name = "frost_land_cyan_firefly_animated.png", + animation = { + type = "vertical_frames", + aspect_w = 16, + aspect_h = 16, + length = 1.5 + }, + }}, + inventory_image = "frost_land_cyan_firefly.png", + wield_image = "frost_land_cyan_firefly.png", + waving = 1, + paramtype = "light", + sunlight_propagates = true, + buildable_to = true, + walkable = false, + groups = {catchable = 1}, + selection_box = { + type = "fixed", + fixed = {-0.1, -0.1, -0.1, 0.1, 0.1, 0.1}, + }, + light_source = 6, + floodable = true, + on_place = function(itemstack, placer, pointed_thing) + local player_name = placer:get_player_name() + local pos = pointed_thing.above + + if not minetest.is_protected(pos, player_name) and + not minetest.is_protected(pointed_thing.under, player_name) and + minetest.get_node(pos).name == "air" then + minetest.set_node(pos, {name = "frost_land:cyan_firefly"}) + minetest.get_node_timer(pos):start(1) + itemstack:take_item() + end + return itemstack + end, + on_timer = function(pos, elapsed) + if minetest.get_node_light(pos) > 11 then + minetest.set_node(pos, {name = "frost_land:hidden_cyan_firefly"}) + end + minetest.get_node_timer(pos):start(30) + end +}) + +minetest.register_node("frost_land:hidden_cyan_firefly", { + description = "Hidden Cyan Firefly", + drawtype = "airlike", + inventory_image = "frost_land_cyan_firefly.png^default_invisible_node_overlay.png", + wield_image = "frost_land_cyan_firefly.png^default_invisible_node_overlay.png", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + pointable = false, + diggable = false, + buildable_to = true, + drop = "", + groups = {not_in_creative_inventory = 1}, + floodable = true, + on_place = function(itemstack, placer, pointed_thing) + local player_name = placer:get_player_name() + local pos = pointed_thing.above + + if not minetest.is_protected(pos, player_name) and + not minetest.is_protected(pointed_thing.under, player_name) and + minetest.get_node(pos).name == "air" then + minetest.set_node(pos, {name = "frost_land:hidden_cyan_firefly"}) + minetest.get_node_timer(pos):start(1) + itemstack:take_item() + end + return itemstack + end, + on_timer = function(pos, elapsed) + if minetest.get_node_light(pos) <= 11 then + minetest.set_node(pos, {name = "frost_land:cyan_firefly"}) + end + minetest.get_node_timer(pos):start(30) + end +}) + +------------------------------------------------------------------------------------------------------------------------------ +minetest.register_node("frost_land:white_firefly", { + description = "White Firefly", + drawtype = "plantlike", + tiles = {{ + name = "frost_land_white_firefly_animated.png", + animation = { + type = "vertical_frames", + aspect_w = 16, + aspect_h = 16, + length = 1.5 + }, + }}, + inventory_image = "frost_land_white_firefly.png", + wield_image = "frost_land_white_firefly.png", + waving = 1, + paramtype = "light", + sunlight_propagates = true, + buildable_to = true, + walkable = false, + groups = {catchable = 1}, + selection_box = { + type = "fixed", + fixed = {-0.1, -0.1, -0.1, 0.1, 0.1, 0.1}, + }, + light_source = 6, + floodable = true, + on_place = function(itemstack, placer, pointed_thing) + local player_name = placer:get_player_name() + local pos = pointed_thing.above + + if not minetest.is_protected(pos, player_name) and + not minetest.is_protected(pointed_thing.under, player_name) and + minetest.get_node(pos).name == "air" then + minetest.set_node(pos, {name = "frost_land:white_firefly"}) + minetest.get_node_timer(pos):start(1) + itemstack:take_item() + end + return itemstack + end, + on_timer = function(pos, elapsed) + if minetest.get_node_light(pos) > 11 then + minetest.set_node(pos, {name = "frost_land:hidden_white_firefly"}) + end + minetest.get_node_timer(pos):start(30) + end +}) + +minetest.register_node("frost_land:hidden_white_firefly", { + description = "Hidden White Firefly", + drawtype = "airlike", + inventory_image = "frost_land_white_firefly.png^default_invisible_node_overlay.png", + wield_image = "frost_land_white_firefly.png^default_invisible_node_overlay.png", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + pointable = false, + diggable = false, + buildable_to = true, + drop = "", + groups = {not_in_creative_inventory = 1}, + floodable = true, + on_place = function(itemstack, placer, pointed_thing) + local player_name = placer:get_player_name() + local pos = pointed_thing.above + + if not minetest.is_protected(pos, player_name) and + not minetest.is_protected(pointed_thing.under, player_name) and + minetest.get_node(pos).name == "air" then + minetest.set_node(pos, {name = "frost_land:hidden_white_firefly"}) + minetest.get_node_timer(pos):start(1) + itemstack:take_item() + end + return itemstack + end, + on_timer = function(pos, elapsed) + if minetest.get_node_light(pos) <= 11 then + minetest.set_node(pos, {name = "frost_land:white_firefly"}) + end + minetest.get_node_timer(pos):start(30) + end +}) + +minetest.register_decoration({ + deco_type = "simple", + place_on = {"default:snow"}, + sidelen = 16, + fill_ratio = 0.02, + biomes = {"frost_land"}, + decoration = { + "frost_land:white_firefly", "frost_land:cyan_firefly", "frost_land:blue_firefly", "frost_land:pink_firefly", + } +}) diff --git a/frost_land/frost_land.png b/frost_land/frost_land.png new file mode 100644 index 0000000..480cfff Binary files /dev/null and b/frost_land/frost_land.png differ diff --git a/frost_land/init.lua b/frost_land/init.lua new file mode 100644 index 0000000..6932dcb --- /dev/null +++ b/frost_land/init.lua @@ -0,0 +1,7 @@ +local default_path = minetest.get_modpath("frost_land") + +dofile(default_path.."/nodes.lua") +dofile(default_path.."/mapgen.lua") +dofile(default_path.."/fireflies.lua") +dofile(default_path.."/moreblocks.lua") +dofile(default_path.."/crafting.lua") diff --git a/frost_land/license.txt b/frost_land/license.txt new file mode 100755 index 0000000..af3dc37 --- /dev/null +++ b/frost_land/license.txt @@ -0,0 +1,18 @@ + License +------------------------------------------------------------------------------------------------------------------------ +Copyright (C) 2021-2022: Atlante - AFL-1.1 +License for code: AFL-1.1 + +Attribution — You must give appropriate credit, provide a link to the license, and +indicate if changes were made. You may do so in any reasonable manner, but not in any way +that suggests the licensor endorses you or your use. + +ShareAlike — If you remix, transform, or build upon the material, you must distribute +your contributions under the same license as the original. + +Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +Anyone can fix the mod. My Discord "Atlante#1952" And my Mail Address "AtlanteEtDocteur@gmail.com" + + diff --git a/frost_land/mapgen.lua b/frost_land/mapgen.lua new file mode 100644 index 0000000..bb179ac --- /dev/null +++ b/frost_land/mapgen.lua @@ -0,0 +1,174 @@ + -- Frost Land + + minetest.register_biome({ + name = "frost_land", + node_dust = "default:snow", + node_top = "frost_land:frost_land_grass", + depth_top = 1, + node_filler = "default:dirt", + depth_filler = 3, + node_riverbed = "default:snowblock", + depth_riverbed = 2, + node_dungeon = "default:cobble", + node_dungeon_alt = "default:mossycobble", + node_dungeon_stair = "stairs:stair_cobble", + y_max = 31000, + y_min = 4, + heat_point = 2, + humidity_point = 89, + }) + +minetest.register_decoration({ + name = "frost_land:frost_tree_1", + deco_type = "schematic", + place_on = {"frost_land:frost_land_grass"}, + place_offset_y = 0, + sidelen = 16, + fill_ratio = 0.001265, + biomes = {"frost_land"}, + y_max = 31000, + y_min = -20, + schematic = minetest.get_modpath("frost_land").."/schematics/frost_tree_1.mts", + flags = "place_center_x, place_center_z", + rotation = "random", +}) + +minetest.register_decoration({ + name = "frost_land:frost_tree_2", + deco_type = "schematic", + place_on = {"frost_land:frost_land_grass"}, + place_offset_y = 0, + sidelen = 16, + fill_ratio = 0.001265, + biomes = {"frost_land"}, + y_max = 31000, + y_min = -20, + schematic = minetest.get_modpath("frost_land").."/schematics/frost_tree_2.mts", + flags = "place_center_x, place_center_z", + rotation = "random", +}) + +minetest.register_decoration({ + name = "frost_land:frost_tree_3", + deco_type = "schematic", + place_on = {"frost_land:frost_land_grass"}, + place_offset_y = 0, + sidelen = 16, + fill_ratio = 0.001265, + biomes = {"frost_land"}, + y_max = 31000, + y_min = -20, + schematic = minetest.get_modpath("frost_land").."/schematics/frost_tree_3.mts", + flags = "place_center_x, place_center_z", + rotation = "random", +}) + + + +minetest.register_decoration({ + name = "frost_land:ice_1", + deco_type = "schematic", + place_on = {"frost_land:frost_land_grass"}, + place_offset_y = 0, + sidelen = 16, + fill_ratio = 0.002265, + biomes = {"frost_land"}, + y_max = 31000, + y_min = -20, + schematic = minetest.get_modpath("frost_land").."/schematics/ice_1.mts", + flags = "place_center_x, place_center_z", + rotation = "random", +}) + +minetest.register_decoration({ + name = "frost_land:ice_2", + deco_type = "schematic", + place_on = {"frost_land:frost_land_grass"}, + place_offset_y = 0, + sidelen = 16, + fill_ratio = 0.002265, + biomes = {"frost_land"}, + y_max = 31000, + y_min = -20, + schematic = minetest.get_modpath("frost_land").."/schematics/ice_2.mts", + flags = "place_center_x, place_center_z", + rotation = "random", +}) + +minetest.register_decoration({ + name = "frost_land:ice_3", + deco_type = "schematic", + place_on = {"frost_land:frost_land_grass"}, + place_offset_y = 0, + sidelen = 16, + fill_ratio = 0.002265, + biomes = {"frost_land"}, + y_max = 31000, + y_min = -20, + schematic = minetest.get_modpath("frost_land").."/schematics/ice_3.mts", + flags = "place_center_x, place_center_z", + rotation = "random", +}) + +minetest.register_decoration({ + name = "frost_land:tree_4", + deco_type = "schematic", + place_on = {"frost_land:frost_land_grass"}, + place_offset_y = 0, + sidelen = 16, + fill_ratio = 0.002265, + biomes = {"frost_land"}, + y_max = 31000, + y_min = -20, + schematic = minetest.get_modpath("frost_land").."/schematics/tree_4.mts", + flags = "place_center_x, place_center_z", + rotation = "random", +}) + +minetest.register_decoration({ + name = "frost_land:tree_5", + deco_type = "schematic", + place_on = {"frost_land:frost_land_grass"}, + place_offset_y = 0, + sidelen = 16, + fill_ratio = 0.002265, + biomes = {"frost_land"}, + y_max = 31000, + y_min = -20, + schematic = minetest.get_modpath("frost_land").."/schematics/tree_5.mts", + flags = "place_center_x, place_center_z", + rotation = "random", +}) + +minetest.register_decoration({ + name = "frost_land:igloo", + deco_type = "schematic", + place_on = {"frost_land:frost_land_grass"}, + place_offset_y = -2, + sidelen = 16, + fill_ratio = 0.000165, + biomes = {"frost_land"}, + y_max = 31000, + y_min = -20, + schematic = minetest.get_modpath("frost_land").."/schematics/igloo.mts", + flags = "place_center_x, place_center_z", + rotation = "random", +}) + +minetest.register_decoration({ + name = "frost_land:bush", + deco_type = "schematic", + place_on = {"frost_land:frost_land_grass"}, + place_offset_y = 0, + sidelen = 16, + fill_ratio = 0.002165, + biomes = {"frost_land"}, + y_max = 31000, + y_min = -20, + schematic = minetest.get_modpath("frost_land").."/schematics/bush.mts", + flags = "place_center_x, place_center_z", + rotation = "random", +}) + + + diff --git a/frost_land/mod.conf b/frost_land/mod.conf new file mode 100755 index 0000000..ad9e341 --- /dev/null +++ b/frost_land/mod.conf @@ -0,0 +1,6 @@ + +author = Atlante +name = frost_land + +description = Adds a frost_land biome with a few more objects. +title = Frost Land diff --git a/frost_land/moreblocks.lua b/frost_land/moreblocks.lua new file mode 100644 index 0000000..7217382 --- /dev/null +++ b/frost_land/moreblocks.lua @@ -0,0 +1,21 @@ +-----------------Moreblock +if minetest.get_modpath("moreblocks") then + + stairsplus:register_all("frost_land_wood", "wood", "frost_land:frost_land_wood", { + description = "Frost Land Wood", + tiles = {"frost_land_wood.png"}, + groups = {choppy = 3, oddly_breakable_by_hand = 2, flammable = 3, wood = 1}, + sounds = default.node_sound_wood_defaults(), + }) + + stairsplus:register_all("frost_land_tree", "tree", "frost_land:frost_land_tree", { + description = "Japanese Tree", + tiles = {"frost_land_tree_top.png", "frost_land_tree_top.png", + "frost_land_tree.png"}, + groups = {choppy = 3, oddly_breakable_by_hand = 2, flammable = 3, wood = 1}, + sounds = default.node_sound_wood_defaults(), + }) + + + +end diff --git a/frost_land/nodes.lua b/frost_land/nodes.lua new file mode 100644 index 0000000..e6e4bfb --- /dev/null +++ b/frost_land/nodes.lua @@ -0,0 +1,126 @@ +minetest.register_node("frost_land:frost_land_leaves_1", { + description = "frost_land Blue Leaves", + drawtype = "allfaces_optional", + waving = 1, + tiles = {"frost_leaves_1.png"}, + paramtype = "light", + is_ground_content = false, + groups = {snappy = 3, leafdecay = 3, flammable = 2, leaves = 1}, + drop = { + max_items = 1, + items = { + {items = {""}, rarity = 20}, + {items = {"frost_land:frost_land_leaves_1"}} + } + }, + sounds = default.node_sound_leaves_defaults(), + + after_place_node = after_place_leaves, +}) + +minetest.register_node("frost_land:frost_land_leaves_2", { + description = "frost_land Yellow Leaves", + drawtype = "allfaces_optional", + waving = 1, + tiles = {"frost_leaves_2.png"}, + paramtype = "light", + is_ground_content = false, + groups = {snappy = 3, leafdecay = 3, flammable = 2, leaves = 1}, + drop = { + max_items = 1, + items = { + {items = {""}, rarity = 20}, + {items = {"frost_land:frost_land_leaves_2"}} + } + }, + sounds = default.node_sound_leaves_defaults(), + + after_place_node = after_place_leaves, +}) + +minetest.register_node("frost_land:frost_land_grass", { + description = "Frost Land Grass", + tiles = {"frost_land_grass.png", "default_dirt.png", + {name = "default_dirt.png^frost_land_grass_side.png", + tileable_vertical = false}}, + groups = {crumbly = 3, soil = 1, spreading_dirt_type = 1}, + drop = "default:dirt", + sounds = default.node_sound_dirt_defaults({ + footstep = {name = "default_snow_footstep", gain = 0.25}, + }), +}) + +minetest.register_node("frost_land:frost_land_wood", { + description = "Frost Land Wood", + paramtype2 = "facedir", + place_param2 = 0, + tiles = {"frost_land_wood.png"}, + is_ground_content = false, + groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2, wood = 1}, + sounds = default.node_sound_wood_defaults(), +}) + +minetest.register_node("frost_land:frost_land_tree", { + description = "Frost Land Tree", + tiles = {"frost_land_tree_top.png", "frost_land_tree_top.png", + "frost_land_tree.png"}, + paramtype2 = "facedir", + is_ground_content = false, + groups = {tree = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2}, + sounds = default.node_sound_wood_defaults(), + + on_place = minetest.rotate_node +}) + + minetest.register_node("frost_land:frost_land_sapling", { + description = "Frost Land Sapling", + drawtype = "plantlike", + tiles = {"frost_land_sapling.png"}, + inventory_image = "frost_land_sapling.png", + wield_image = "frost_land_sapling.png", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + on_timer = grow_new_frost_land_tree, + selection_box = { + type = "fixed", + fixed = {-4 / 16, -0.5, -4 / 16, 4 / 16, 2 / 16, 4 / 16} + }, + groups = {snappy = 2, dig_immediate = 3, flammable = 2, + attached_node = 1, sapling = 1}, + sounds = default.node_sound_leaves_defaults(), + + on_construct = function(pos) + minetest.get_node_timer(pos):start(math.random(300, 1500)) + end, + + on_place = function(itemstack, placer, pointed_thing) + itemstack = default.sapling_on_place(itemstack, placer, pointed_thing, + "frost_land:frost_land_sapling", + -- minp, maxp to be checked, relative to sapling pos + {x = -1, y = 0, z = -1}, + {x = 1, y = 1, z = 1}, + -- maximum interval of interior volume check + 2) + + return itemstack + end, + }) + +if minetest.get_modpath("bonemeal") ~= nil then +bonemeal:add_sapling({ + {"frost_land:frost_land_sapling", grow_new_frost_land_tree, "soil"}, +}) +end + + + +local function grow_new_frost_land_tree(pos) + if not default.can_grow(pos) then + -- try a bit later again + minetest.get_node_timer(pos):start(math.random(300, 1500)) + return + end + minetest.remove_node(pos) + minetest.place_schematic({x = pos.x-1, y = pos.y, z = pos.z-1}, modpath.."/schematics/frost_tree_1.mts", "0", nil, false) +end diff --git a/frost_land/schematics/bush.mts b/frost_land/schematics/bush.mts new file mode 100644 index 0000000..f2cb8cf Binary files /dev/null and b/frost_land/schematics/bush.mts differ diff --git a/frost_land/schematics/frost_tree_1.mts b/frost_land/schematics/frost_tree_1.mts new file mode 100644 index 0000000..c2a6802 Binary files /dev/null and b/frost_land/schematics/frost_tree_1.mts differ diff --git a/frost_land/schematics/frost_tree_2.mts b/frost_land/schematics/frost_tree_2.mts new file mode 100644 index 0000000..2fbe3c8 Binary files /dev/null and b/frost_land/schematics/frost_tree_2.mts differ diff --git a/frost_land/schematics/frost_tree_3.mts b/frost_land/schematics/frost_tree_3.mts new file mode 100644 index 0000000..a710338 Binary files /dev/null and b/frost_land/schematics/frost_tree_3.mts differ diff --git a/frost_land/schematics/ice_1.mts b/frost_land/schematics/ice_1.mts new file mode 100644 index 0000000..fb7dc7a Binary files /dev/null and b/frost_land/schematics/ice_1.mts differ diff --git a/frost_land/schematics/ice_2.mts b/frost_land/schematics/ice_2.mts new file mode 100644 index 0000000..459be3d Binary files /dev/null and b/frost_land/schematics/ice_2.mts differ diff --git a/frost_land/schematics/ice_3.mts b/frost_land/schematics/ice_3.mts new file mode 100644 index 0000000..a5aac59 Binary files /dev/null and b/frost_land/schematics/ice_3.mts differ diff --git a/frost_land/schematics/igloo.mts b/frost_land/schematics/igloo.mts new file mode 100644 index 0000000..0765d58 Binary files /dev/null and b/frost_land/schematics/igloo.mts differ diff --git a/frost_land/schematics/tree_4.mts b/frost_land/schematics/tree_4.mts new file mode 100644 index 0000000..3797baa Binary files /dev/null and b/frost_land/schematics/tree_4.mts differ diff --git a/frost_land/schematics/tree_5.mts b/frost_land/schematics/tree_5.mts new file mode 100644 index 0000000..ae6a572 Binary files /dev/null and b/frost_land/schematics/tree_5.mts differ diff --git a/frost_land/screenshot (copie).png b/frost_land/screenshot (copie).png new file mode 100644 index 0000000..e2bd235 Binary files /dev/null and b/frost_land/screenshot (copie).png differ diff --git a/frost_land/screenshot.png b/frost_land/screenshot.png new file mode 100644 index 0000000..e2bd235 Binary files /dev/null and b/frost_land/screenshot.png differ diff --git a/frost_land/textures/default_dirt.png b/frost_land/textures/default_dirt.png new file mode 100755 index 0000000..4fd63b1 Binary files /dev/null and b/frost_land/textures/default_dirt.png differ diff --git a/frost_land/textures/default_ice.png b/frost_land/textures/default_ice.png new file mode 100755 index 0000000..51eefad Binary files /dev/null and b/frost_land/textures/default_ice.png differ diff --git a/frost_land/textures/frost_land_blue_firefly.png b/frost_land/textures/frost_land_blue_firefly.png new file mode 100644 index 0000000..20ddbdc Binary files /dev/null and b/frost_land/textures/frost_land_blue_firefly.png differ diff --git a/frost_land/textures/frost_land_blue_firefly_animated.png b/frost_land/textures/frost_land_blue_firefly_animated.png new file mode 100644 index 0000000..6495697 Binary files /dev/null and b/frost_land/textures/frost_land_blue_firefly_animated.png differ diff --git a/frost_land/textures/frost_land_cyan_firefly.png b/frost_land/textures/frost_land_cyan_firefly.png new file mode 100644 index 0000000..b9dc98c Binary files /dev/null and b/frost_land/textures/frost_land_cyan_firefly.png differ diff --git a/frost_land/textures/frost_land_cyan_firefly_animated.png b/frost_land/textures/frost_land_cyan_firefly_animated.png new file mode 100644 index 0000000..ffb20a7 Binary files /dev/null and b/frost_land/textures/frost_land_cyan_firefly_animated.png differ diff --git a/frost_land/textures/frost_land_grass.png b/frost_land/textures/frost_land_grass.png new file mode 100644 index 0000000..2fc1fae Binary files /dev/null and b/frost_land/textures/frost_land_grass.png differ diff --git a/frost_land/textures/frost_land_grass_side.png b/frost_land/textures/frost_land_grass_side.png new file mode 100644 index 0000000..ae66f9a Binary files /dev/null and b/frost_land/textures/frost_land_grass_side.png differ diff --git a/frost_land/textures/frost_land_pink_firefly.png b/frost_land/textures/frost_land_pink_firefly.png new file mode 100644 index 0000000..8dc8285 Binary files /dev/null and b/frost_land/textures/frost_land_pink_firefly.png differ diff --git a/frost_land/textures/frost_land_pink_firefly_animated.png b/frost_land/textures/frost_land_pink_firefly_animated.png new file mode 100644 index 0000000..360f42b Binary files /dev/null and b/frost_land/textures/frost_land_pink_firefly_animated.png differ diff --git a/frost_land/textures/frost_land_sapling.png b/frost_land/textures/frost_land_sapling.png new file mode 100644 index 0000000..2e07c65 Binary files /dev/null and b/frost_land/textures/frost_land_sapling.png differ diff --git a/frost_land/textures/frost_land_tree.png b/frost_land/textures/frost_land_tree.png new file mode 100644 index 0000000..8136895 Binary files /dev/null and b/frost_land/textures/frost_land_tree.png differ diff --git a/frost_land/textures/frost_land_tree_top.png b/frost_land/textures/frost_land_tree_top.png new file mode 100644 index 0000000..05a6025 Binary files /dev/null and b/frost_land/textures/frost_land_tree_top.png differ diff --git a/frost_land/textures/frost_land_white_firefly.png b/frost_land/textures/frost_land_white_firefly.png new file mode 100644 index 0000000..4cf54b7 Binary files /dev/null and b/frost_land/textures/frost_land_white_firefly.png differ diff --git a/frost_land/textures/frost_land_white_firefly_animated.png b/frost_land/textures/frost_land_white_firefly_animated.png new file mode 100644 index 0000000..43f8b92 Binary files /dev/null and b/frost_land/textures/frost_land_white_firefly_animated.png differ diff --git a/frost_land/textures/frost_land_wood.png b/frost_land/textures/frost_land_wood.png new file mode 100644 index 0000000..d1434c7 Binary files /dev/null and b/frost_land/textures/frost_land_wood.png differ diff --git a/frost_land/textures/frost_leaves_1.png b/frost_land/textures/frost_leaves_1.png new file mode 100644 index 0000000..2b050e3 Binary files /dev/null and b/frost_land/textures/frost_leaves_1.png differ diff --git a/frost_land/textures/frost_leaves_2.png b/frost_land/textures/frost_leaves_2.png new file mode 100644 index 0000000..e4ec0cb Binary files /dev/null and b/frost_land/textures/frost_leaves_2.png differ diff --git a/island.png b/island.png new file mode 100644 index 0000000..b08b42c Binary files /dev/null and b/island.png differ diff --git a/japaneseforest/README.md b/japaneseforest/README.md new file mode 100755 index 0000000..15a795b --- /dev/null +++ b/japaneseforest/README.md @@ -0,0 +1,2 @@ +# japaneseforest +A simple and pleasant little mod, which adds a japanese biome with a few more objects. And 3 new tree diff --git a/japaneseforest/biomes.lua b/japaneseforest/biomes.lua new file mode 100644 index 0000000..a397f7f --- /dev/null +++ b/japaneseforest/biomes.lua @@ -0,0 +1,16 @@ +minetest.register_biome({ + name = "japanese_forest", + node_top = "japaneseforest:japanese_dirt_with_grass", + depth_top = 1, + node_filler = "default:dirt", + depth_filler = 4, + node_riverbed = "default:sand", + depth_riverbed = 3, + node_dungeon = "default:cobble", + node_dungeon_alt = "default:mossycobble", + node_dungeon_stair = "stairs:stair_cobble", + y_max = 31000, + y_min = 5, + heat_point = 80, + humidity_point = 85, +}) diff --git a/japaneseforest/bonemeal.lua b/japaneseforest/bonemeal.lua new file mode 100644 index 0000000..a5ffaa3 --- /dev/null +++ b/japaneseforest/bonemeal.lua @@ -0,0 +1,12 @@ +if minetest.get_modpath("bonemeal") then + +bonemeal:add_crop({ + {"japaneseforest:sashimi_", 8, "japaneseforest:seed_sashimi"}, +}) +bonemeal:add_sapling({ + {"japaneseforest:japanese_sapling", grow_new_japanese_tree_2, "soil"}, +}) + bonemeal:add_deco({ + {"japaneseforest:japanese_dirt_with_grass", {"default:grass_1", "default:grass_2", "default:grass_3", "default:grass_4", "default:grass_5"}, {}} + }) +end diff --git a/japaneseforest/crafting.lua b/japaneseforest/crafting.lua new file mode 100644 index 0000000..b4df445 --- /dev/null +++ b/japaneseforest/crafting.lua @@ -0,0 +1,131 @@ +------------Crafting +minetest.register_craft({ + output = "japaneseforest:japanese_wood 4", + recipe = { + {"japaneseforest:japanese_tree"}, + } +}) + +minetest.register_craft({ + output = "japaneseforest:japanese_wood 4", + recipe = { + {"japaneseforest:japanese_tree"}, + } +}) + +minetest.register_craft({ + output = "japaneseforest:japanese_tatami 2", + recipe = { + {"japaneseforest:mud", "bambooforest:fiber_bamboo"}, + {"japaneseforest:japanese_wood", "bambooforest:fiber_bamboo"}, + } +}) + +minetest.register_craft({ + output = "japaneseforest:sashimi_brick 2", + recipe = { + {"default:brick", "japaneseforest:sashimi_cooked"}, + {"japaneseforest:sashimi_cooked", "japaneseforest:sashimi_cooked"}, + } +}) + +minetest.register_craft({ + output = "japaneseforest:tatami_simple 2", + recipe = { + {"japaneseforest:mud", "bambooforest:fiber_bamboo"}, + {"japaneseforest:japanese_wood", "japaneseforest:japanese_wood"}, + } +}) + +minetest.register_craft({ + output = "japaneseforest:japanese_thin_wall 2", + recipe = { + {"japaneseforest:japanese_wood", "bambooforest:fiber_bamboo"}, + {"bambooforest:fiber_bamboo", "bambooforest:fiber_bamboo"}, + } +}) + +minetest.register_craft({ + output = "japaneseforest:japanese_sapling", + recipe = { + {"japaneseforest:racine"}, + + } +}) + +minetest.register_craft({ + output = "japaneseforest:japanese_trapdoor 2", + recipe = { + {"bambooforest:fiber_bamboo", "japaneseforest:japanese_wood", "bambooforest:fiber_bamboo"}, + {"japaneseforest:japanese_wood", "bambooforest:fiber_bamboo", "japaneseforest:japanese_wood"}, + {"", "", ""}, + } +}) + +minetest.register_craft({ + type = "cooking", + cooktime = 3, + output = "japaneseforest:sashimi_cooked", + recipe = "japaneseforest:sashimi" +}) +minetest.register_craft({ + type = "cooking", + cooktime = 3, + output = "japaneseforest:racine_cooked", + recipe = "japaneseforest:racine" +}) + +minetest.register_craft({ + type = "cooking", + cooktime = 20, + output = "japaneseforest:dark_brick_cooked 2", + recipe = "japaneseforest:dark_brick" +}) + +minetest.register_craft({ + output = "japaneseforest:dark_brick 2", + recipe = { + {"default:brick", "default:coal_lump"}, + {"dye:black", "default:brick"}, + } +}) + +minetest.register_craft({ + output = "japaneseforest:mud 2", + recipe = { + {"japaneseforest:sashimi", "default:sandstone"}, + {"japaneseforest:sashimi", "japaneseforest:sashimi"}, + } +}) + +minetest.register_craft({ + output = "japaneseforest:mud_block 4", + recipe = { + {"japaneseforest:mud", "japaneseforest:mud"}, + {"japaneseforest:mud", "japaneseforest:mud"}, + } +}) + +minetest.register_craft({ + output = "japaneseforest:mud_brick 4", + recipe = { + {"japaneseforest:mud", "default:brick"}, + {"japaneseforest:mud", "japaneseforest:mud"}, + } +}) + +minetest.register_craft({ + output = "japaneseforest:japanese_lamp 2", + recipe = { + {"bambooforest:fiber_bamboo", "japaneseforest:japanese_wood"}, + {"default:paper", "default:torch"}, + } +}) + +minetest.register_craft({ + output = "japaneseforest:truel", + recipe = { + {"japaneseforest:dark_brick_cooked", "default:brick"}, + {"japaneseforest:dark_brick_cooked", "japaneseforest:dark_brick_cooked"}, + } +}) diff --git a/japaneseforest/depends.txt b/japaneseforest/depends.txt new file mode 100644 index 0000000..8cf4ade --- /dev/null +++ b/japaneseforest/depends.txt @@ -0,0 +1,5 @@ +default +doors +bambooforest +moreblocks? +bonemeal? diff --git a/japaneseforest/farm.lua b/japaneseforest/farm.lua new file mode 100644 index 0000000..6421d79 --- /dev/null +++ b/japaneseforest/farm.lua @@ -0,0 +1,11 @@ +farming.register_plant("japaneseforest:sashimi", { + description = "Sashimi Seed", + inventory_image = "seed_sashimi.png", + steps = 8, + on_use = minetest.item_eat(2), + minlight = 13, + maxlight = default.LIGHT_MAX, + fertility = {"japanese_forest", "bamboo_forest"}, + groups = {flammable = 4, food_bread = 1}, + place_param2 = 3, +}) diff --git a/japaneseforest/fireflies.lua b/japaneseforest/fireflies.lua new file mode 100644 index 0000000..a4105d2 --- /dev/null +++ b/japaneseforest/fireflies.lua @@ -0,0 +1,755 @@ +minetest.register_node("japaneseforest:red_firefly", { + description = "Red Firefly", + drawtype = "plantlike", + tiles = {{ + name = "japaneseforest_red_firefly_animated.png", + animation = { + type = "vertical_frames", + aspect_w = 16, + aspect_h = 16, + length = 1.5 + }, + }}, + inventory_image = "japaneseforest_red_firefly.png", + wield_image = "japaneseforest_red_firefly.png", + waving = 1, + paramtype = "light", + sunlight_propagates = true, + buildable_to = true, + walkable = false, + groups = {catchable = 1}, + selection_box = { + type = "fixed", + fixed = {-0.1, -0.1, -0.1, 0.1, 0.1, 0.1}, + }, + light_source = 6, + floodable = true, + on_place = function(itemstack, placer, pointed_thing) + local player_name = placer:get_player_name() + local pos = pointed_thing.above + + if not minetest.is_protected(pos, player_name) and + not minetest.is_protected(pointed_thing.under, player_name) and + minetest.get_node(pos).name == "air" then + minetest.set_node(pos, {name = "japaneseforest:red_firefly"}) + minetest.get_node_timer(pos):start(1) + itemstack:take_item() + end + return itemstack + end, + on_timer = function(pos, elapsed) + if minetest.get_node_light(pos) > 11 then + minetest.set_node(pos, {name = "japaneseforest:hidden_red_firefly"}) + end + minetest.get_node_timer(pos):start(30) + end +}) + +minetest.register_node("japaneseforest:hidden_red_firefly", { + description = "Hidden Red Firefly", + drawtype = "airlike", + inventory_image = "japaneseforest_red_firefly.png^default_invisible_node_overlay.png", + wield_image = "japaneseforest_red_firefly.png^default_invisible_node_overlay.png", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + pointable = false, + diggable = false, + buildable_to = true, + drop = "", + groups = {not_in_creative_inventory = 1}, + floodable = true, + on_place = function(itemstack, placer, pointed_thing) + local player_name = placer:get_player_name() + local pos = pointed_thing.above + + if not minetest.is_protected(pos, player_name) and + not minetest.is_protected(pointed_thing.under, player_name) and + minetest.get_node(pos).name == "air" then + minetest.set_node(pos, {name = "japaneseforest:hidden_red_firefly"}) + minetest.get_node_timer(pos):start(1) + itemstack:take_item() + end + return itemstack + end, + on_timer = function(pos, elapsed) + if minetest.get_node_light(pos) <= 11 then + minetest.set_node(pos, {name = "japaneseforest:red_firefly"}) + end + minetest.get_node_timer(pos):start(30) + end +}) +-------------------------------------------------------------------------------------------------------------------------------- +minetest.register_node("japaneseforest:blue_firefly", { + description = "Blue Firefly", + drawtype = "plantlike", + tiles = {{ + name = "japaneseforest_blue_firefly_animated.png", + animation = { + type = "vertical_frames", + aspect_w = 16, + aspect_h = 16, + length = 1.5 + }, + }}, + inventory_image = "japaneseforest_blue_firefly.png", + wield_image = "japaneseforest_blue_firefly.png", + waving = 1, + paramtype = "light", + sunlight_propagates = true, + buildable_to = true, + walkable = false, + groups = {catchable = 1}, + selection_box = { + type = "fixed", + fixed = {-0.1, -0.1, -0.1, 0.1, 0.1, 0.1}, + }, + light_source = 6, + floodable = true, + on_place = function(itemstack, placer, pointed_thing) + local player_name = placer:get_player_name() + local pos = pointed_thing.above + + if not minetest.is_protected(pos, player_name) and + not minetest.is_protected(pointed_thing.under, player_name) and + minetest.get_node(pos).name == "air" then + minetest.set_node(pos, {name = "japaneseforest:blue_firefly"}) + minetest.get_node_timer(pos):start(1) + itemstack:take_item() + end + return itemstack + end, + on_timer = function(pos, elapsed) + if minetest.get_node_light(pos) > 11 then + minetest.set_node(pos, {name = "japaneseforest:hidden_blue_firefly"}) + end + minetest.get_node_timer(pos):start(30) + end +}) + +minetest.register_node("japaneseforest:hidden_blue_firefly", { + description = "Hidden Blue Firefly", + drawtype = "airlike", + inventory_image = "japaneseforest_blue_firefly.png^default_invisible_node_overlay.png", + wield_image = "japaneseforest_blue_firefly.png^default_invisible_node_overlay.png", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + pointable = false, + diggable = false, + buildable_to = true, + drop = "", + groups = {not_in_creative_inventory = 1}, + floodable = true, + on_place = function(itemstack, placer, pointed_thing) + local player_name = placer:get_player_name() + local pos = pointed_thing.above + + if not minetest.is_protected(pos, player_name) and + not minetest.is_protected(pointed_thing.under, player_name) and + minetest.get_node(pos).name == "air" then + minetest.set_node(pos, {name = "japaneseforest:hidden_blue_firefly"}) + minetest.get_node_timer(pos):start(1) + itemstack:take_item() + end + return itemstack + end, + on_timer = function(pos, elapsed) + if minetest.get_node_light(pos) <= 11 then + minetest.set_node(pos, {name = "japaneseforest:blue_firefly"}) + end + minetest.get_node_timer(pos):start(30) + end +}) + +-------------------------------------------------------------------------------------------------------------------------------- +minetest.register_node("japaneseforest:green_firefly", { + description = "Green Firefly", + drawtype = "plantlike", + tiles = {{ + name = "japaneseforest_green_firefly_animated.png", + animation = { + type = "vertical_frames", + aspect_w = 16, + aspect_h = 16, + length = 1.5 + }, + }}, + inventory_image = "japaneseforest_green_firefly.png", + wield_image = "japaneseforest_green_firefly.png", + waving = 1, + paramtype = "light", + sunlight_propagates = true, + buildable_to = true, + walkable = false, + groups = {catchable = 1}, + selection_box = { + type = "fixed", + fixed = {-0.1, -0.1, -0.1, 0.1, 0.1, 0.1}, + }, + light_source = 6, + floodable = true, + on_place = function(itemstack, placer, pointed_thing) + local player_name = placer:get_player_name() + local pos = pointed_thing.above + + if not minetest.is_protected(pos, player_name) and + not minetest.is_protected(pointed_thing.under, player_name) and + minetest.get_node(pos).name == "air" then + minetest.set_node(pos, {name = "japaneseforest:green_firefly"}) + minetest.get_node_timer(pos):start(1) + itemstack:take_item() + end + return itemstack + end, + on_timer = function(pos, elapsed) + if minetest.get_node_light(pos) > 11 then + minetest.set_node(pos, {name = "japaneseforest:hidden_green_firefly"}) + end + minetest.get_node_timer(pos):start(30) + end +}) + +minetest.register_node("japaneseforest:hidden_green_firefly", { + description = "Hidden Green Firefly", + drawtype = "airlike", + inventory_image = "japaneseforest_green_firefly.png^default_invisible_node_overlay.png", + wield_image = "japaneseforest_green_firefly.png^default_invisible_node_overlay.png", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + pointable = false, + diggable = false, + buildable_to = true, + drop = "", + groups = {not_in_creative_inventory = 1}, + floodable = true, + on_place = function(itemstack, placer, pointed_thing) + local player_name = placer:get_player_name() + local pos = pointed_thing.above + + if not minetest.is_protected(pos, player_name) and + not minetest.is_protected(pointed_thing.under, player_name) and + minetest.get_node(pos).name == "air" then + minetest.set_node(pos, {name = "japaneseforest:hidden_green_firefly"}) + minetest.get_node_timer(pos):start(1) + itemstack:take_item() + end + return itemstack + end, + on_timer = function(pos, elapsed) + if minetest.get_node_light(pos) <= 11 then + minetest.set_node(pos, {name = "japaneseforest:green_firefly"}) + end + minetest.get_node_timer(pos):start(30) + end +}) + +-------------------------------------------------------------------------------------------------------------------------------- +minetest.register_node("japaneseforest:violet_firefly", { + description = "Violet Firefly", + drawtype = "plantlike", + tiles = {{ + name = "japaneseforest_violet_firefly_animated.png", + animation = { + type = "vertical_frames", + aspect_w = 16, + aspect_h = 16, + length = 1.5 + }, + }}, + inventory_image = "japaneseforest_violet_firefly.png", + wield_image = "japaneseforest_violet_firefly.png", + waving = 1, + paramtype = "light", + sunlight_propagates = true, + buildable_to = true, + walkable = false, + groups = {catchable = 1}, + selection_box = { + type = "fixed", + fixed = {-0.1, -0.1, -0.1, 0.1, 0.1, 0.1}, + }, + light_source = 6, + floodable = true, + on_place = function(itemstack, placer, pointed_thing) + local player_name = placer:get_player_name() + local pos = pointed_thing.above + + if not minetest.is_protected(pos, player_name) and + not minetest.is_protected(pointed_thing.under, player_name) and + minetest.get_node(pos).name == "air" then + minetest.set_node(pos, {name = "japaneseforest:violet_firefly"}) + minetest.get_node_timer(pos):start(1) + itemstack:take_item() + end + return itemstack + end, + on_timer = function(pos, elapsed) + if minetest.get_node_light(pos) > 11 then + minetest.set_node(pos, {name = "japaneseforest:hidden_violet_firefly"}) + end + minetest.get_node_timer(pos):start(30) + end +}) + +minetest.register_node("japaneseforest:hidden_violet_firefly", { + description = "Hidden Violet Firefly", + drawtype = "airlike", + inventory_image = "japaneseforest_violet_firefly.png^default_invisible_node_overlay.png", + wield_image = "japaneseforest_violet_firefly.png^default_invisible_node_overlay.png", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + pointable = false, + diggable = false, + buildable_to = true, + drop = "", + groups = {not_in_creative_inventory = 1}, + floodable = true, + on_place = function(itemstack, placer, pointed_thing) + local player_name = placer:get_player_name() + local pos = pointed_thing.above + + if not minetest.is_protected(pos, player_name) and + not minetest.is_protected(pointed_thing.under, player_name) and + minetest.get_node(pos).name == "air" then + minetest.set_node(pos, {name = "japaneseforest:hidden_violet_firefly"}) + minetest.get_node_timer(pos):start(1) + itemstack:take_item() + end + return itemstack + end, + on_timer = function(pos, elapsed) + if minetest.get_node_light(pos) <= 11 then + minetest.set_node(pos, {name = "japaneseforest:violet_firefly"}) + end + minetest.get_node_timer(pos):start(30) + end +}) +-------------------------------------------------------------------------------------------------------------------------------- +minetest.register_node("japaneseforest:orange_firefly", { + description = "Orange Firefly", + drawtype = "plantlike", + tiles = {{ + name = "japaneseforest_orange_firefly_animated.png", + animation = { + type = "vertical_frames", + aspect_w = 16, + aspect_h = 16, + length = 1.5 + }, + }}, + inventory_image = "japaneseforest_orange_firefly.png", + wield_image = "japaneseforest_orange_firefly.png", + waving = 1, + paramtype = "light", + sunlight_propagates = true, + buildable_to = true, + walkable = false, + groups = {catchable = 1}, + selection_box = { + type = "fixed", + fixed = {-0.1, -0.1, -0.1, 0.1, 0.1, 0.1}, + }, + light_source = 6, + floodable = true, + on_place = function(itemstack, placer, pointed_thing) + local player_name = placer:get_player_name() + local pos = pointed_thing.above + + if not minetest.is_protected(pos, player_name) and + not minetest.is_protected(pointed_thing.under, player_name) and + minetest.get_node(pos).name == "air" then + minetest.set_node(pos, {name = "japaneseforest:orange_firefly"}) + minetest.get_node_timer(pos):start(1) + itemstack:take_item() + end + return itemstack + end, + on_timer = function(pos, elapsed) + if minetest.get_node_light(pos) > 11 then + minetest.set_node(pos, {name = "japaneseforest:hidden_orange_firefly"}) + end + minetest.get_node_timer(pos):start(30) + end +}) + +minetest.register_node("japaneseforest:hidden_orange_firefly", { + description = "Hidden Orange Firefly", + drawtype = "airlike", + inventory_image = "japaneseforest_orange_firefly.png^default_invisible_node_overlay.png", + wield_image = "japaneseforest_orange_firefly.png^default_invisible_node_overlay.png", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + pointable = false, + diggable = false, + buildable_to = true, + drop = "", + groups = {not_in_creative_inventory = 1}, + floodable = true, + on_place = function(itemstack, placer, pointed_thing) + local player_name = placer:get_player_name() + local pos = pointed_thing.above + + if not minetest.is_protected(pos, player_name) and + not minetest.is_protected(pointed_thing.under, player_name) and + minetest.get_node(pos).name == "air" then + minetest.set_node(pos, {name = "japaneseforest:hidden_orange_firefly"}) + minetest.get_node_timer(pos):start(1) + itemstack:take_item() + end + return itemstack + end, + on_timer = function(pos, elapsed) + if minetest.get_node_light(pos) <= 11 then + minetest.set_node(pos, {name = "japaneseforest:orange_firefly"}) + end + minetest.get_node_timer(pos):start(30) + end +}) + +------------------------------------------------------------------------------------------------------------------------------- +minetest.register_node("japaneseforest:pink_firefly", { + description = "Pink Firefly", + drawtype = "plantlike", + tiles = {{ + name = "japaneseforest_pink_firefly_animated.png", + animation = { + type = "vertical_frames", + aspect_w = 16, + aspect_h = 16, + length = 1.5 + }, + }}, + inventory_image = "japaneseforest_pink_firefly.png", + wield_image = "japaneseforest_pink_firefly.png", + waving = 1, + paramtype = "light", + sunlight_propagates = true, + buildable_to = true, + walkable = false, + groups = {catchable = 1}, + selection_box = { + type = "fixed", + fixed = {-0.1, -0.1, -0.1, 0.1, 0.1, 0.1}, + }, + light_source = 6, + floodable = true, + on_place = function(itemstack, placer, pointed_thing) + local player_name = placer:get_player_name() + local pos = pointed_thing.above + + if not minetest.is_protected(pos, player_name) and + not minetest.is_protected(pointed_thing.under, player_name) and + minetest.get_node(pos).name == "air" then + minetest.set_node(pos, {name = "japaneseforest:pink_firefly"}) + minetest.get_node_timer(pos):start(1) + itemstack:take_item() + end + return itemstack + end, + on_timer = function(pos, elapsed) + if minetest.get_node_light(pos) > 11 then + minetest.set_node(pos, {name = "japaneseforest:hidden_pink_firefly"}) + end + minetest.get_node_timer(pos):start(30) + end +}) + +minetest.register_node("japaneseforest:hidden_pink_firefly", { + description = "Hidden Pink Firefly", + drawtype = "airlike", + inventory_image = "japaneseforest_pink_firefly.png^default_invisible_node_overlay.png", + wield_image = "japaneseforest_pink_firefly.png^default_invisible_node_overlay.png", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + pointable = false, + diggable = false, + buildable_to = true, + drop = "", + groups = {not_in_creative_inventory = 1}, + floodable = true, + on_place = function(itemstack, placer, pointed_thing) + local player_name = placer:get_player_name() + local pos = pointed_thing.above + + if not minetest.is_protected(pos, player_name) and + not minetest.is_protected(pointed_thing.under, player_name) and + minetest.get_node(pos).name == "air" then + minetest.set_node(pos, {name = "japaneseforest:hidden_pink_firefly"}) + minetest.get_node_timer(pos):start(1) + itemstack:take_item() + end + return itemstack + end, + on_timer = function(pos, elapsed) + if minetest.get_node_light(pos) <= 11 then + minetest.set_node(pos, {name = "japaneseforest:pink_firefly"}) + end + minetest.get_node_timer(pos):start(30) + end +}) + +------------------------------------------------------------------------------------------------------------------------------- +minetest.register_node("japaneseforest:cyan_firefly", { + description = "Cyan Firefly", + drawtype = "plantlike", + tiles = {{ + name = "japaneseforest_cyan_firefly_animated.png", + animation = { + type = "vertical_frames", + aspect_w = 16, + aspect_h = 16, + length = 1.5 + }, + }}, + inventory_image = "japaneseforest_cyan_firefly.png", + wield_image = "japaneseforest_cyan_firefly.png", + waving = 1, + paramtype = "light", + sunlight_propagates = true, + buildable_to = true, + walkable = false, + groups = {catchable = 1}, + selection_box = { + type = "fixed", + fixed = {-0.1, -0.1, -0.1, 0.1, 0.1, 0.1}, + }, + light_source = 6, + floodable = true, + on_place = function(itemstack, placer, pointed_thing) + local player_name = placer:get_player_name() + local pos = pointed_thing.above + + if not minetest.is_protected(pos, player_name) and + not minetest.is_protected(pointed_thing.under, player_name) and + minetest.get_node(pos).name == "air" then + minetest.set_node(pos, {name = "japaneseforest:cyan_firefly"}) + minetest.get_node_timer(pos):start(1) + itemstack:take_item() + end + return itemstack + end, + on_timer = function(pos, elapsed) + if minetest.get_node_light(pos) > 11 then + minetest.set_node(pos, {name = "japaneseforest:hidden_cyan_firefly"}) + end + minetest.get_node_timer(pos):start(30) + end +}) + +minetest.register_node("japaneseforest:hidden_cyan_firefly", { + description = "Hidden Cyan Firefly", + drawtype = "airlike", + inventory_image = "japaneseforest_cyan_firefly.png^default_invisible_node_overlay.png", + wield_image = "japaneseforest_cyan_firefly.png^default_invisible_node_overlay.png", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + pointable = false, + diggable = false, + buildable_to = true, + drop = "", + groups = {not_in_creative_inventory = 1}, + floodable = true, + on_place = function(itemstack, placer, pointed_thing) + local player_name = placer:get_player_name() + local pos = pointed_thing.above + + if not minetest.is_protected(pos, player_name) and + not minetest.is_protected(pointed_thing.under, player_name) and + minetest.get_node(pos).name == "air" then + minetest.set_node(pos, {name = "japaneseforest:hidden_cyan_firefly"}) + minetest.get_node_timer(pos):start(1) + itemstack:take_item() + end + return itemstack + end, + on_timer = function(pos, elapsed) + if minetest.get_node_light(pos) <= 11 then + minetest.set_node(pos, {name = "japaneseforest:cyan_firefly"}) + end + minetest.get_node_timer(pos):start(30) + end +}) + +------------------------------------------------------------------------------------------------------------------------------ +minetest.register_node("japaneseforest:white_firefly", { + description = "White Firefly", + drawtype = "plantlike", + tiles = {{ + name = "japaneseforest_white_firefly_animated.png", + animation = { + type = "vertical_frames", + aspect_w = 16, + aspect_h = 16, + length = 1.5 + }, + }}, + inventory_image = "japaneseforest_white_firefly.png", + wield_image = "japaneseforest_white_firefly.png", + waving = 1, + paramtype = "light", + sunlight_propagates = true, + buildable_to = true, + walkable = false, + groups = {catchable = 1}, + selection_box = { + type = "fixed", + fixed = {-0.1, -0.1, -0.1, 0.1, 0.1, 0.1}, + }, + light_source = 6, + floodable = true, + on_place = function(itemstack, placer, pointed_thing) + local player_name = placer:get_player_name() + local pos = pointed_thing.above + + if not minetest.is_protected(pos, player_name) and + not minetest.is_protected(pointed_thing.under, player_name) and + minetest.get_node(pos).name == "air" then + minetest.set_node(pos, {name = "japaneseforest:white_firefly"}) + minetest.get_node_timer(pos):start(1) + itemstack:take_item() + end + return itemstack + end, + on_timer = function(pos, elapsed) + if minetest.get_node_light(pos) > 11 then + minetest.set_node(pos, {name = "japaneseforest:hidden_white_firefly"}) + end + minetest.get_node_timer(pos):start(30) + end +}) + +minetest.register_node("japaneseforest:hidden_white_firefly", { + description = "Hidden White Firefly", + drawtype = "airlike", + inventory_image = "japaneseforest_white_firefly.png^default_invisible_node_overlay.png", + wield_image = "japaneseforest_white_firefly.png^default_invisible_node_overlay.png", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + pointable = false, + diggable = false, + buildable_to = true, + drop = "", + groups = {not_in_creative_inventory = 1}, + floodable = true, + on_place = function(itemstack, placer, pointed_thing) + local player_name = placer:get_player_name() + local pos = pointed_thing.above + + if not minetest.is_protected(pos, player_name) and + not minetest.is_protected(pointed_thing.under, player_name) and + minetest.get_node(pos).name == "air" then + minetest.set_node(pos, {name = "japaneseforest:hidden_white_firefly"}) + minetest.get_node_timer(pos):start(1) + itemstack:take_item() + end + return itemstack + end, + on_timer = function(pos, elapsed) + if minetest.get_node_light(pos) <= 11 then + minetest.set_node(pos, {name = "japaneseforest:white_firefly"}) + end + minetest.get_node_timer(pos):start(30) + end +}) + + +------------------------------------------------------------------------------------------------------------------------------ +minetest.register_node("japaneseforest:black_firefly", { + description = "Black Firefly", + drawtype = "plantlike", + tiles = {{ + name = "japaneseforest_black_firefly_animated.png", + animation = { + type = "vertical_frames", + aspect_w = 16, + aspect_h = 16, + length = 1.5 + }, + }}, + inventory_image = "japaneseforest_black_firefly.png", + wield_image = "japaneseforest_black_firefly.png", + waving = 1, + paramtype = "light", + sunlight_propagates = true, + buildable_to = true, + walkable = false, + groups = {catchable = 1}, + selection_box = { + type = "fixed", + fixed = {-0.1, -0.1, -0.1, 0.1, 0.1, 0.1}, + }, + light_source = 6, + floodable = true, + on_place = function(itemstack, placer, pointed_thing) + local player_name = placer:get_player_name() + local pos = pointed_thing.above + + if not minetest.is_protected(pos, player_name) and + not minetest.is_protected(pointed_thing.under, player_name) and + minetest.get_node(pos).name == "air" then + minetest.set_node(pos, {name = "japaneseforest:black_firefly"}) + minetest.get_node_timer(pos):start(1) + itemstack:take_item() + end + return itemstack + end, + on_timer = function(pos, elapsed) + if minetest.get_node_light(pos) > 11 then + minetest.set_node(pos, {name = "japaneseforest:hidden_black_firefly"}) + end + minetest.get_node_timer(pos):start(30) + end +}) + +minetest.register_node("japaneseforest:hidden_black_firefly", { + description = "Hidden Black Firefly", + drawtype = "airlike", + inventory_image = "japaneseforest_black_firefly.png^default_invisible_node_overlay.png", + wield_image = "japaneseforest_black_firefly.png^default_invisible_node_overlay.png", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + pointable = false, + diggable = false, + buildable_to = true, + drop = "", + groups = {not_in_creative_inventory = 1}, + floodable = true, + on_place = function(itemstack, placer, pointed_thing) + local player_name = placer:get_player_name() + local pos = pointed_thing.above + + if not minetest.is_protected(pos, player_name) and + not minetest.is_protected(pointed_thing.under, player_name) and + minetest.get_node(pos).name == "air" then + minetest.set_node(pos, {name = "japaneseforest:hidden_black_firefly"}) + minetest.get_node_timer(pos):start(1) + itemstack:take_item() + end + return itemstack + end, + on_timer = function(pos, elapsed) + if minetest.get_node_light(pos) <= 11 then + minetest.set_node(pos, {name = "japaneseforest:black_firefly"}) + end + minetest.get_node_timer(pos):start(30) + end +}) + +minetest.register_decoration({ + deco_type = "simple", + place_on = {"japaneseforest:japanese_dirt_with_grass"}, + sidelen = 16, + fill_ratio = 0.02, + biomes = {"japanese_forest"}, + decoration = { +"japaneseforest:red_firefly", "japaneseforest:orange_firefly", "japaneseforest:white_firefly", "japaneseforest:cyan_firefly", "japaneseforest:blue_firefly", "japaneseforest:green_firefly", "japaneseforest:pink_firefly", "japaneseforest:violet_firefly", "japaneseforest:black_firefly", + } +}) diff --git a/japaneseforest/init.lua b/japaneseforest/init.lua new file mode 100644 index 0000000..7be3567 --- /dev/null +++ b/japaneseforest/init.lua @@ -0,0 +1,24 @@ +local path = minetest.get_modpath("japaneseforest") + + +--------------------Biome + dofile(path .. "/biomes.lua") + dofile(path .. "/farm.lua") + dofile(path .. "/mapgen.lua") + dofile(path .. "/fireflies.lua") + dofile(path .. "/crafting.lua") + dofile(path .. "/item.lua") + dofile(path .. "/nodes.lua") + dofile(path .. "/tree.lua") + dofile(path .. "/bonemeal.lua") + dofile(path .. "/moreblocks.lua") +-------Bonus + dofile(path .. "/tools.lua") + + + + + + + + diff --git a/japaneseforest/item.lua b/japaneseforest/item.lua new file mode 100644 index 0000000..f784b9c --- /dev/null +++ b/japaneseforest/item.lua @@ -0,0 +1,18 @@ +minetest.register_craftitem("japaneseforest:sashimi_cooked", { + description = "Sashimi Cooked", + inventory_image = "japaneseforest_sashimi_cooked.png", + on_use = minetest.item_eat(5), + groups = {food_bread = 1, flammable = 2}, +}) + +minetest.register_craftitem("japaneseforest:racine_cooked", { + description = "Racine Cooked", + inventory_image = "racine_cooked.png", + on_use = minetest.item_eat(3), + groups = {food_bread = 1, flammable = 2}, +}) + +minetest.register_craftitem("japaneseforest:dark_brick_cooked", { + description = "Dark Brick Cooked", + inventory_image = "dark_brick_cooked.png", +}) diff --git a/japaneseforest/japanese.png b/japaneseforest/japanese.png new file mode 100644 index 0000000..b18b6ee Binary files /dev/null and b/japaneseforest/japanese.png differ diff --git a/japaneseforest/license.txt b/japaneseforest/license.txt new file mode 100755 index 0000000..af3dc37 --- /dev/null +++ b/japaneseforest/license.txt @@ -0,0 +1,18 @@ + License +------------------------------------------------------------------------------------------------------------------------ +Copyright (C) 2021-2022: Atlante - AFL-1.1 +License for code: AFL-1.1 + +Attribution — You must give appropriate credit, provide a link to the license, and +indicate if changes were made. You may do so in any reasonable manner, but not in any way +that suggests the licensor endorses you or your use. + +ShareAlike — If you remix, transform, or build upon the material, you must distribute +your contributions under the same license as the original. + +Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +Anyone can fix the mod. My Discord "Atlante#1952" And my Mail Address "AtlanteEtDocteur@gmail.com" + + diff --git a/japaneseforest/mapgen.lua b/japaneseforest/mapgen.lua new file mode 100644 index 0000000..f311345 --- /dev/null +++ b/japaneseforest/mapgen.lua @@ -0,0 +1,151 @@ +minetest.register_decoration({ + name = "japaneseforest:japanese_tree_1_1", + deco_type = "schematic", + place_on = {"japaneseforest:japanese_dirt_with_grass"}, + place_offset_y = 0, + sidelen = 16, + fill_ratio = 0.009365, + biomes = {"japanese_forest"}, + y_max = 31000, + y_min = -20, + schematic = minetest.get_modpath("japaneseforest").."/schematics/japanese_tree_1_1.mts", + flags = "place_center_x, place_center_z", + rotation = "random", +}) + +minetest.register_decoration({ + name = "japaneseforest:japanese_tree_1_2", + deco_type = "schematic", + place_on = {"japaneseforest:japanese_dirt_with_grass"}, + place_offset_y = 0, + sidelen = 16, + fill_ratio = 0.009365, + biomes = {"japanese_forest"}, + y_max = 31000, + y_min = -20, + schematic = minetest.get_modpath("japaneseforest").."/schematics/japanese_tree_1_2.mts", + flags = "place_center_x, place_center_z", + rotation = "random", +}) + +minetest.register_decoration({ + name = "japaneseforest:japanese_tree_1_3", + deco_type = "schematic", + place_on = {"japaneseforest:japanese_dirt_with_grass"}, + place_offset_y = 0, + sidelen = 16, + fill_ratio = 0.007365, + biomes = {"japanese_forest"}, + y_max = 31000, + y_min = -20, + schematic = minetest.get_modpath("japaneseforest").."/schematics/japanese_tree_1_3.mts", + flags = "place_center_x, place_center_z", + rotation = "random", +}) + + +minetest.register_decoration({ + name = "japaneseforest:japanese_tree_3_2", + deco_type = "schematic", + place_on = {"japaneseforest:japanese_dirt_with_grass"}, + place_offset_y = 0, + sidelen = 16, + fill_ratio = 0.008365, + biomes = {"japanese_forest"}, + y_max = 31000, + y_min = -20, + schematic = minetest.get_modpath("japaneseforest").."/schematics/japanese_tree_3_2.mts", + flags = "place_center_x, place_center_z", + rotation = "random", +}) + +minetest.register_decoration({ + name = "japaneseforest:japanese_tree_2_1", + deco_type = "schematic", + place_on = {"japaneseforest:japanese_dirt_with_grass"}, + place_offset_y = 0, + sidelen = 16, + fill_ratio = 0.008365, + biomes = {"japanese_forest"}, + y_max = 31000, + y_min = -20, + schematic = minetest.get_modpath("japaneseforest").."/schematics/japanese_tree_2_1.mts", + flags = "place_center_x, place_center_z", + rotation = "random", +}) + + + +minetest.register_decoration({ + name = "japaneseforest:bamboo", + deco_type = "schematic", + place_on = {"japaneseforest:japanese_dirt_with_grass"}, + place_offset_y = 0, + sidelen = 16, + fill_ratio = 0.009265, + biomes = {"japanese_forest"}, + y_max = 31000, + y_min = -20, + schematic = minetest.get_modpath("bambooforest").."/schematics/bamboo_tree_5.mts", + flags = "place_center_x, place_center_z", + rotation = "random", +}) + +minetest.register_decoration({ + deco_type = "simple", + place_on = {"japaneseforest:japanese_dirt_with_grass"}, + sidelen = 16, + fill_ratio = 0.1, + biomes = {"japanese_forest"}, + decoration = { + "japaneseforest:racine" + } +}) + +minetest.register_decoration({ + deco_type = "simple", + place_on = {"japaneseforest:japanese_dirt_with_grass"}, + sidelen = 16, + fill_ratio = 0.1, + biomes = {"japanese_forest"}, + decoration = { + "default:junglegrass" + } +}) + +minetest.register_decoration({ + deco_type = "simple", + place_on = {"japaneseforest:japanese_dirt_with_grass"}, + sidelen = 16, + fill_ratio = 0.3, + biomes = {"japanese_forest"}, + decoration = { + "default:grass_1", "default:grass_2", + "default:grass_3", "default:grass_4", + "default:grass_5", + } +}) + +minetest.register_decoration({ + deco_type = "simple", + place_on = {"bambooforest:dirt_with_bamboo"}, + sidelen = 16, + fill_ratio = 0.05, + biomes = {"bamboo_forest"}, + decoration = { + "bambooforest:melon_block", + } +}) + + + +minetest.register_decoration({ + deco_type = "simple", + place_on = {"japaneseforest:japanese_dirt_with_grass", "bambooforest:dirt_with_bamboo"}, + sidelen = 16, + fill_ratio = 0.05, + biomes = {"japanese_forest", "bamboo_forest"}, + decoration = { + "japaneseforest:sashimi_8", + } +}) diff --git a/japaneseforest/mod.conf b/japaneseforest/mod.conf new file mode 100755 index 0000000..cb2d06b --- /dev/null +++ b/japaneseforest/mod.conf @@ -0,0 +1,6 @@ + +author = Atlante +name = japaneseforest + +description = Adds a japanese biome with a few more objects. And 3 new trees. +title = Japanese Forest diff --git a/japaneseforest/moreblocks.lua b/japaneseforest/moreblocks.lua new file mode 100644 index 0000000..97d8b31 --- /dev/null +++ b/japaneseforest/moreblocks.lua @@ -0,0 +1,68 @@ +-----------------Moreblock +if minetest.get_modpath("moreblocks") then + + stairsplus:register_all("japanese_wood", "wood", "japaneseforest:japanese_wood", { + description = "Japanese Wood", + tiles = {"japanese_wood.png"}, + groups = {choppy = 3, oddly_breakable_by_hand = 2, flammable = 3, wood = 1}, + sounds = default.node_sound_wood_defaults(), + }) + + stairsplus:register_all("japanese_tree", "tree", "japaneseforest:japanese_tree", { + description = "Japanese Tree", + tiles = {"japanese_tree_top.png", "japanese_tree_top.png", + "japanese_tree.png"}, + groups = {choppy = 3, oddly_breakable_by_hand = 2, flammable = 3, wood = 1}, + sounds = default.node_sound_wood_defaults(), + }) + + stairsplus:register_all("mud", "stone", "japaneseforest:mud", { + description = "Mud", + tiles = {"mud.png"}, + groups = {cracky = 3, flammable = 3, stone = 1}, + sounds = default.node_sound_stone_defaults(), + }) + + stairsplus:register_all("mud_block", "stone", "japaneseforest:mud_block", { + description = "Mud Block", + tiles = {"mud_block.png"}, + groups = {cracky = 3, flammable = 3, stone = 1}, + sounds = default.node_sound_stone_defaults(), + }) + + stairsplus:register_all("mud_brick", "stone", "japaneseforest:mud_brick", { + description = "Mud Brick", + tiles = {"mud_brick.png"}, + groups = {cracky = 3, flammable = 3, stone = 1}, + sounds = default.node_sound_stone_defaults(), + }) + + stairsplus:register_all("dark_brick", "stone", "japaneseforest:dark_brick", { + description = "Dark Brick", + tiles = {"japaneseforest_path_top.png"}, + groups = {cracky = 3, flammable = 3, stone = 1}, + sounds = default.node_sound_stone_defaults(), + }) + + stairsplus:register_all("sashimi_brick", "stone", "japaneseforest:sashimi_brick", { + description = "Sashimi Brick", + tiles = {"sashimi_brick.png"}, + groups = {cracky = 3, flammable = 3, stone = 1}, + sounds = default.node_sound_stone_defaults(), + }) + + stairsplus:register_all("japanese_lamp", "wood", "japaneseforest:japanese_lamp", { + description = "Japanese Lamp", + tiles = {"japanese_lamp.png"}, + groups = {choppy = 3, oddly_breakable_by_hand = 2, flammable = 3, stone = 1}, + sounds = default.node_sound_wood_defaults(), + }) + + stairsplus:register_all("japanese_tatami", "wood", "japaneseforest:japanese_tatami", { + description = "Japanese Tatami", + tiles = {"tatami.png"}, + groups = {choppy = 3, oddly_breakable_by_hand = 2, flammable = 3, stone = 1}, + sounds = default.node_sound_wood_defaults(), + }) + +end diff --git a/japaneseforest/nodes.lua b/japaneseforest/nodes.lua new file mode 100644 index 0000000..37b286b --- /dev/null +++ b/japaneseforest/nodes.lua @@ -0,0 +1,270 @@ +minetest.register_node("japaneseforest:japanese_leaves_1", { + description = "Japanese Leaves Pink", + drawtype = "allfaces_optional", + waving = 1, + tiles = {"japanese_leaves_1.png"}, + paramtype = "light", + is_ground_content = false, + groups = {snappy = 3, leafdecay = 3, flammable = 2, leaves = 1}, + drop = { + max_items = 1, + items = { + {items = {"japaneseforest:japanese_sapling"}, rarity = 20}, + {items = {"japaneseforest:japanese_leaves_1"}} + } + }, + sounds = default.node_sound_leaves_defaults(), + + after_place_node = after_place_leaves, +}) + +minetest.register_node("japaneseforest:japanese_leaves_2", { + description = "Japanese Leaves Green", + drawtype = "allfaces_optional", + waving = 1, + tiles = {"japanese_leaves_2.png"}, + paramtype = "light", + is_ground_content = false, + groups = {snappy = 3, leafdecay = 3, flammable = 2, leaves = 1}, + drop = { + max_items = 1, + items = { + {items = {"japaneseforest:japanese_sapling"}, rarity = 20}, + {items = {"japaneseforest:japanese_leaves_2"}} + } + }, + sounds = default.node_sound_leaves_defaults(), + + after_place_node = after_place_leaves, +}) + +minetest.register_node("japaneseforest:japanese_leaves_3", { + description = "Japanese Leaves Blue", + drawtype = "allfaces_optional", + waving = 1, + tiles = {"japanese_leaves_3.png"}, + paramtype = "light", + is_ground_content = false, + groups = {snappy = 3, leafdecay = 3, flammable = 2, leaves = 1}, + drop = { + max_items = 1, + items = { + {items = {"japaneseforest:japanese_sapling"}, rarity = 20}, + {items = {"japaneseforest:japanese_leaves_3"}} + } + }, + sounds = default.node_sound_leaves_defaults(), + + after_place_node = after_place_leaves, +}) + +minetest.register_node("japaneseforest:japanese_tree", { + description = "Japanese Tree", + tiles = {"japanese_tree_top.png", "japanese_tree_top.png", + "japanese_tree.png"}, + paramtype2 = "facedir", + is_ground_content = false, + groups = {tree = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2}, + sounds = default.node_sound_wood_defaults(), + + on_place = minetest.rotate_node +}) + +minetest.register_node("japaneseforest:japanese_wood", { + description = "Japanese Wood", + paramtype2 = "facedir", + place_param2 = 0, + tiles = {"japanese_wood.png"}, + is_ground_content = false, + groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2, wood = 1}, + sounds = default.node_sound_wood_defaults(), +}) + +minetest.register_node("japaneseforest:sashimi_brick", { + description = "Sashimi Brick", + paramtype2 = "facedir", + place_param2 = 0, + tiles = {"sashimi_brick.png"}, + is_ground_content = false, + groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2, wood = 1}, + sounds = default.node_sound_wood_defaults(), +}) + +minetest.register_node("japaneseforest:tatami_simple", { + description = "Japanese Simple Tatami", + paramtype2 = "facedir", + place_param2 = 0, + tiles = {"tatami_simple.png"}, + is_ground_content = false, + groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2, wood = 1}, + sounds = default.node_sound_wood_defaults(), +}) + +minetest.register_node("japaneseforest:japanese_tatami", { + description = "Japanese Tatami", + paramtype2 = "facedir", + place_param2 = 0, + tiles = {"tatami.png"}, + is_ground_content = false, + groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2, wood = 1}, + sounds = default.node_sound_wood_defaults(), +}) + +doors.register_trapdoor("japaneseforest:japanese_trapdoor", { + description = "Japanese Trapdoor", + inventory_image = "japanese_trapdoor.png", + wield_image = "japanese_trapdoor.png", + tile_front = "japanese_trapdoor.png", + tile_side = "japanese_trapdoor_side.png", + gain_open = 0.06, + gain_close = 0.13, + groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2, door = 1}, +}) + + +doors.register("japanese_door", { + tiles = {{ name = "doors_japanese_door.png", backface_culling = true }}, + description = "Japanese Door", + inventory_image = "doors_item_japanese.png", + groups = {node = 1, choppy = 2, oddly_breakable_by_hand = 2, flammable = 2}, + gain_open = 0.06, + gain_close = 0.13, + recipe = { + {"bambooforest:fiber_bamboo", "japaneseforest:japanese_wood"}, + {"japaneseforest:japanese_wood", "bambooforest:fiber_bamboo"}, + {"bambooforest:fiber_bamboo", "japaneseforest:japanese_wood"}, + } +}) + +xpanes.register_pane("japaneseforest:japanese_small_wall_flat", { + description = "Japanese Small Wall", + textures = {"small_wall.png", "", "side_small_wall.png"}, + inventory_image = "small_wall.png", + wield_image = "small_wall.png", + sounds = default.node_sound_wood_defaults(), + groups = {choppy=1, oddly_breakable_by_hand=2, flammable = 3}, + recipe = { + {"bambooforest:fiber_bamboo", "bambooforest:fiber_bamboo", "bambooforest:fiber_bamboo"}, + {"dye:magenta", "japaneseforest:japanese_wood", "dye:magenta"}, + } +}) + +doors.register_fencegate("japaneseforest:gate_japanese", { + description = "Japanese Wood Fence Gate", + texture = "japanese_wood_fence.png", + material = "japaneseforest:japanese_wood", + groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2} +}) + + default.register_fence("japaneseforest:fence_japanese_wood", { + description = "Japanese Wood Fence", + texture = "japanese_wood_fence.png", + inventory_image = "japaneseforest_fence_overlay.png^japanese_wood_fence.png^" .. + "japaneseforest_fence_overlay.png^[makealpha:255,126,126", + wield_image = "japaneseforest_fence_overlay.png^japanese_wood_fence.png^" .. + "japaneseforest_fence_overlay.png^[makealpha:255,126,126", + material = "japaneseforest:japanese_wood", + groups = {choppy = 3, oddly_breakable_by_hand = 2, flammable = 3}, + sounds = default.node_sound_wood_defaults() + }) + + default.register_fence_rail("japaneseforest:fence_rail_japanese_wood", { + description = "Japanese Wood Fence Rail", + texture = "japanese_wood_fence.png", + inventory_image = "japaneseforest_fence_rail_overlay.png^japanese_wood_fence.png^" .. + "japaneseforest_fence_rail_overlay.png^[makealpha:255,126,126", + wield_image = "japaneseforest_fence_rail_overlay.png^japanese_wood_fence.png^" .. + "japaneseforest_fence_rail_overlay.png^[makealpha:255,126,126", + material = "japaneseforest:japanese_wood", + groups = {choppy = 3, oddly_breakable_by_hand = 2, flammable = 3}, + sounds = default.node_sound_wood_defaults() + }) + +minetest.register_node("japaneseforest:racine", { + description = "Racine", + drawtype = "signlike", + waving = 1, + tiles = {"racine.png"}, + -- Use texture of a taller grass stage in inventory + inventory_image = "racine_inv.png", + wield_image = "racine.png", + on_use = minetest.item_eat(1), + paramtype = "light", + sunlight_propagates = true, + walkable = false, + buildable_to = true, + groups = {snappy = 3, attached_node = 1, oddly_breakable_by_hand=3, +flammable = 1, food_bread = 1}, + sounds = default.node_sound_leaves_defaults(), + selection_box = { + type="wallmounted", + wall_top = {-0.5, 0.49, -0.5, 0.5, 0.5, 0.5}, + wall_bottom = {-0.5, -0.5, -0.5, 0.5, -0.49, 0.5}, + wall_side = {-0.5, -0.5, -0.5, -0.49, 0.5, 0.5}, + }, +}) + +minetest.register_node("japaneseforest:mud", { + description = "Japanese Mub", + paramtype2 = "facedir", + place_param2 = 0, + tiles = {"mud.png"}, + is_ground_content = false, + groups = {cracky = 2, flammable = 2, stone = 1, level = 1}, + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_node("japaneseforest:mud_block", { + description = "Japanese Mub Block", + paramtype2 = "facedir", + place_param2 = 0, + tiles = {"mud_block.png"}, + is_ground_content = false, + groups = {cracky = 2, flammable = 2, stone = 1, level = 1}, + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_node("japaneseforest:mud_brick", { + description = "Japanese Mub Brick", + paramtype2 = "facedir", + place_param2 = 0, + tiles = {"mud_brick.png"}, + is_ground_content = false, + groups = {cracky = 2, flammable = 2, stone = 1, level = 1}, + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_node("japaneseforest:japanese_dirt_with_grass", { + description = "Japanese Dirt With Grass", + tiles = {"japaneseforest_japanese_grass.png", "default_dirt.png", + {name = "default_dirt.png^japaneseforest_japanese_grass_side.png", + tileable_vertical = false}}, + groups = {crumbly = 3, soil = 1, spreading_dirt_type = 1}, + drop = "default:dirt", + sounds = default.node_sound_dirt_defaults({ + footstep = {name = "default_grass_footstep", gain = 0.25}, + }), +}) + +minetest.register_node("japaneseforest:japanese_lamp", { + description = "Japanese Lamp", + drawtype = "glasslike", + tiles = {"japanese_lamp.png"}, + paramtype = "light", + sunlight_propagates = true, + is_ground_content = false, + groups = {cracky = 3, oddly_breakable_by_hand = 3}, + sounds = default.node_sound_wood_defaults(), + light_source = default.LIGHT_MAX, +}) + +minetest.register_node("japaneseforest:dark_brick", { + description = "Japanese Dark Brick", + paramtype2 = "facedir", + place_param2 = 0, + tiles = {"japaneseforest_path_top.png"}, + is_ground_content = false, + groups = {cracky = 2, flammable = 2, stone = 1, level = 1}, + sounds = default.node_sound_stone_defaults(), +}) + diff --git a/japaneseforest/schematics/japanese_tree_1_1.mts b/japaneseforest/schematics/japanese_tree_1_1.mts new file mode 100644 index 0000000..106e453 Binary files /dev/null and b/japaneseforest/schematics/japanese_tree_1_1.mts differ diff --git a/japaneseforest/schematics/japanese_tree_1_2.mts b/japaneseforest/schematics/japanese_tree_1_2.mts new file mode 100644 index 0000000..21902fe Binary files /dev/null and b/japaneseforest/schematics/japanese_tree_1_2.mts differ diff --git a/japaneseforest/schematics/japanese_tree_1_3.mts b/japaneseforest/schematics/japanese_tree_1_3.mts new file mode 100644 index 0000000..2334c58 Binary files /dev/null and b/japaneseforest/schematics/japanese_tree_1_3.mts differ diff --git a/japaneseforest/schematics/japanese_tree_2_1.mts b/japaneseforest/schematics/japanese_tree_2_1.mts new file mode 100644 index 0000000..73be7f0 Binary files /dev/null and b/japaneseforest/schematics/japanese_tree_2_1.mts differ diff --git a/japaneseforest/schematics/japanese_tree_3_2.mts b/japaneseforest/schematics/japanese_tree_3_2.mts new file mode 100644 index 0000000..5598175 Binary files /dev/null and b/japaneseforest/schematics/japanese_tree_3_2.mts differ diff --git a/japaneseforest/screenshot.png b/japaneseforest/screenshot.png new file mode 100644 index 0000000..332a609 Binary files /dev/null and b/japaneseforest/screenshot.png differ diff --git a/japaneseforest/textures/dark_brick_cooked.png b/japaneseforest/textures/dark_brick_cooked.png new file mode 100644 index 0000000..a089655 Binary files /dev/null and b/japaneseforest/textures/dark_brick_cooked.png differ diff --git a/japaneseforest/textures/default_dirt.png b/japaneseforest/textures/default_dirt.png new file mode 100755 index 0000000..4fd63b1 Binary files /dev/null and b/japaneseforest/textures/default_dirt.png differ diff --git a/japaneseforest/textures/default_junglegrass.png b/japaneseforest/textures/default_junglegrass.png new file mode 100755 index 0000000..33e2826 Binary files /dev/null and b/japaneseforest/textures/default_junglegrass.png differ diff --git a/japaneseforest/textures/doors_item_japanese.png b/japaneseforest/textures/doors_item_japanese.png new file mode 100644 index 0000000..7f7787a Binary files /dev/null and b/japaneseforest/textures/doors_item_japanese.png differ diff --git a/japaneseforest/textures/doors_japanese_door.png b/japaneseforest/textures/doors_japanese_door.png new file mode 100644 index 0000000..777ff76 Binary files /dev/null and b/japaneseforest/textures/doors_japanese_door.png differ diff --git a/japaneseforest/textures/japanese_lamp.png b/japaneseforest/textures/japanese_lamp.png new file mode 100644 index 0000000..bb4dc8c Binary files /dev/null and b/japaneseforest/textures/japanese_lamp.png differ diff --git a/japaneseforest/textures/japanese_leaves_1.png b/japaneseforest/textures/japanese_leaves_1.png new file mode 100644 index 0000000..91d2db2 Binary files /dev/null and b/japaneseforest/textures/japanese_leaves_1.png differ diff --git a/japaneseforest/textures/japanese_leaves_2.png b/japaneseforest/textures/japanese_leaves_2.png new file mode 100644 index 0000000..12188c7 Binary files /dev/null and b/japaneseforest/textures/japanese_leaves_2.png differ diff --git a/japaneseforest/textures/japanese_leaves_3.png b/japaneseforest/textures/japanese_leaves_3.png new file mode 100644 index 0000000..9d0a6f5 Binary files /dev/null and b/japaneseforest/textures/japanese_leaves_3.png differ diff --git a/japaneseforest/textures/japanese_sapling.png b/japaneseforest/textures/japanese_sapling.png new file mode 100644 index 0000000..a398519 Binary files /dev/null and b/japaneseforest/textures/japanese_sapling.png differ diff --git a/japaneseforest/textures/japanese_trapdoor.png b/japaneseforest/textures/japanese_trapdoor.png new file mode 100644 index 0000000..32fe1e6 Binary files /dev/null and b/japaneseforest/textures/japanese_trapdoor.png differ diff --git a/japaneseforest/textures/japanese_trapdoor_side.png b/japaneseforest/textures/japanese_trapdoor_side.png new file mode 100644 index 0000000..9702bbb Binary files /dev/null and b/japaneseforest/textures/japanese_trapdoor_side.png differ diff --git a/japaneseforest/textures/japanese_tree.png b/japaneseforest/textures/japanese_tree.png new file mode 100644 index 0000000..0b2e189 Binary files /dev/null and b/japaneseforest/textures/japanese_tree.png differ diff --git a/japaneseforest/textures/japanese_tree_top.png b/japaneseforest/textures/japanese_tree_top.png new file mode 100644 index 0000000..8f38fda Binary files /dev/null and b/japaneseforest/textures/japanese_tree_top.png differ diff --git a/japaneseforest/textures/japanese_wood.png b/japaneseforest/textures/japanese_wood.png new file mode 100644 index 0000000..df24249 Binary files /dev/null and b/japaneseforest/textures/japanese_wood.png differ diff --git a/japaneseforest/textures/japanese_wood_fence.png b/japaneseforest/textures/japanese_wood_fence.png new file mode 100644 index 0000000..df24249 Binary files /dev/null and b/japaneseforest/textures/japanese_wood_fence.png differ diff --git a/japaneseforest/textures/japaneseforest_black_firefly.png b/japaneseforest/textures/japaneseforest_black_firefly.png new file mode 100644 index 0000000..9ea040e Binary files /dev/null and b/japaneseforest/textures/japaneseforest_black_firefly.png differ diff --git a/japaneseforest/textures/japaneseforest_black_firefly_animated.png b/japaneseforest/textures/japaneseforest_black_firefly_animated.png new file mode 100644 index 0000000..dd708a2 Binary files /dev/null and b/japaneseforest/textures/japaneseforest_black_firefly_animated.png differ diff --git a/japaneseforest/textures/japaneseforest_blue_firefly.png b/japaneseforest/textures/japaneseforest_blue_firefly.png new file mode 100644 index 0000000..20ddbdc Binary files /dev/null and b/japaneseforest/textures/japaneseforest_blue_firefly.png differ diff --git a/japaneseforest/textures/japaneseforest_blue_firefly_animated.png b/japaneseforest/textures/japaneseforest_blue_firefly_animated.png new file mode 100644 index 0000000..6495697 Binary files /dev/null and b/japaneseforest/textures/japaneseforest_blue_firefly_animated.png differ diff --git a/japaneseforest/textures/japaneseforest_cyan_firefly.png b/japaneseforest/textures/japaneseforest_cyan_firefly.png new file mode 100644 index 0000000..b9dc98c Binary files /dev/null and b/japaneseforest/textures/japaneseforest_cyan_firefly.png differ diff --git a/japaneseforest/textures/japaneseforest_cyan_firefly_animated.png b/japaneseforest/textures/japaneseforest_cyan_firefly_animated.png new file mode 100644 index 0000000..ffb20a7 Binary files /dev/null and b/japaneseforest/textures/japaneseforest_cyan_firefly_animated.png differ diff --git a/japaneseforest/textures/japaneseforest_fence_overlay.png b/japaneseforest/textures/japaneseforest_fence_overlay.png new file mode 100755 index 0000000..a3e6549 Binary files /dev/null and b/japaneseforest/textures/japaneseforest_fence_overlay.png differ diff --git a/japaneseforest/textures/japaneseforest_fence_rail_overlay.png b/japaneseforest/textures/japaneseforest_fence_rail_overlay.png new file mode 100755 index 0000000..234573e Binary files /dev/null and b/japaneseforest/textures/japaneseforest_fence_rail_overlay.png differ diff --git a/japaneseforest/textures/japaneseforest_green_firefly.png b/japaneseforest/textures/japaneseforest_green_firefly.png new file mode 100644 index 0000000..8ec26c6 Binary files /dev/null and b/japaneseforest/textures/japaneseforest_green_firefly.png differ diff --git a/japaneseforest/textures/japaneseforest_green_firefly_animated.png b/japaneseforest/textures/japaneseforest_green_firefly_animated.png new file mode 100644 index 0000000..9148748 Binary files /dev/null and b/japaneseforest/textures/japaneseforest_green_firefly_animated.png differ diff --git a/japaneseforest/textures/japaneseforest_japanese_grass.png b/japaneseforest/textures/japaneseforest_japanese_grass.png new file mode 100644 index 0000000..ecafb69 Binary files /dev/null and b/japaneseforest/textures/japaneseforest_japanese_grass.png differ diff --git a/japaneseforest/textures/japaneseforest_japanese_grass_side.png b/japaneseforest/textures/japaneseforest_japanese_grass_side.png new file mode 100644 index 0000000..68c6926 Binary files /dev/null and b/japaneseforest/textures/japaneseforest_japanese_grass_side.png differ diff --git a/japaneseforest/textures/japaneseforest_japaneseforest_side.png b/japaneseforest/textures/japaneseforest_japaneseforest_side.png new file mode 100755 index 0000000..6533a61 Binary files /dev/null and b/japaneseforest/textures/japaneseforest_japaneseforest_side.png differ diff --git a/japaneseforest/textures/japaneseforest_orange_firefly.png b/japaneseforest/textures/japaneseforest_orange_firefly.png new file mode 100644 index 0000000..93a7805 Binary files /dev/null and b/japaneseforest/textures/japaneseforest_orange_firefly.png differ diff --git a/japaneseforest/textures/japaneseforest_orange_firefly_animated.png b/japaneseforest/textures/japaneseforest_orange_firefly_animated.png new file mode 100644 index 0000000..8fb531b Binary files /dev/null and b/japaneseforest/textures/japaneseforest_orange_firefly_animated.png differ diff --git a/japaneseforest/textures/japaneseforest_path_top.png b/japaneseforest/textures/japaneseforest_path_top.png new file mode 100755 index 0000000..8230b87 Binary files /dev/null and b/japaneseforest/textures/japaneseforest_path_top.png differ diff --git a/japaneseforest/textures/japaneseforest_pink_firefly.png b/japaneseforest/textures/japaneseforest_pink_firefly.png new file mode 100644 index 0000000..8dc8285 Binary files /dev/null and b/japaneseforest/textures/japaneseforest_pink_firefly.png differ diff --git a/japaneseforest/textures/japaneseforest_pink_firefly_animated.png b/japaneseforest/textures/japaneseforest_pink_firefly_animated.png new file mode 100644 index 0000000..360f42b Binary files /dev/null and b/japaneseforest/textures/japaneseforest_pink_firefly_animated.png differ diff --git a/japaneseforest/textures/japaneseforest_red_firefly.png b/japaneseforest/textures/japaneseforest_red_firefly.png new file mode 100644 index 0000000..292fb5a Binary files /dev/null and b/japaneseforest/textures/japaneseforest_red_firefly.png differ diff --git a/japaneseforest/textures/japaneseforest_red_firefly_animated.png b/japaneseforest/textures/japaneseforest_red_firefly_animated.png new file mode 100644 index 0000000..6d66803 Binary files /dev/null and b/japaneseforest/textures/japaneseforest_red_firefly_animated.png differ diff --git a/japaneseforest/textures/japaneseforest_sashimi.png b/japaneseforest/textures/japaneseforest_sashimi.png new file mode 100644 index 0000000..524a8dd Binary files /dev/null and b/japaneseforest/textures/japaneseforest_sashimi.png differ diff --git a/japaneseforest/textures/japaneseforest_sashimi_1.png b/japaneseforest/textures/japaneseforest_sashimi_1.png new file mode 100644 index 0000000..50d40ed Binary files /dev/null and b/japaneseforest/textures/japaneseforest_sashimi_1.png differ diff --git a/japaneseforest/textures/japaneseforest_sashimi_2.png b/japaneseforest/textures/japaneseforest_sashimi_2.png new file mode 100644 index 0000000..0ca6a2f Binary files /dev/null and b/japaneseforest/textures/japaneseforest_sashimi_2.png differ diff --git a/japaneseforest/textures/japaneseforest_sashimi_3.png b/japaneseforest/textures/japaneseforest_sashimi_3.png new file mode 100644 index 0000000..5b153f7 Binary files /dev/null and b/japaneseforest/textures/japaneseforest_sashimi_3.png differ diff --git a/japaneseforest/textures/japaneseforest_sashimi_4.png b/japaneseforest/textures/japaneseforest_sashimi_4.png new file mode 100644 index 0000000..b25416f Binary files /dev/null and b/japaneseforest/textures/japaneseforest_sashimi_4.png differ diff --git a/japaneseforest/textures/japaneseforest_sashimi_5.png b/japaneseforest/textures/japaneseforest_sashimi_5.png new file mode 100644 index 0000000..1e36428 Binary files /dev/null and b/japaneseforest/textures/japaneseforest_sashimi_5.png differ diff --git a/japaneseforest/textures/japaneseforest_sashimi_6.png b/japaneseforest/textures/japaneseforest_sashimi_6.png new file mode 100644 index 0000000..d01812d Binary files /dev/null and b/japaneseforest/textures/japaneseforest_sashimi_6.png differ diff --git a/japaneseforest/textures/japaneseforest_sashimi_7.png b/japaneseforest/textures/japaneseforest_sashimi_7.png new file mode 100644 index 0000000..60836e4 Binary files /dev/null and b/japaneseforest/textures/japaneseforest_sashimi_7.png differ diff --git a/japaneseforest/textures/japaneseforest_sashimi_8.png b/japaneseforest/textures/japaneseforest_sashimi_8.png new file mode 100644 index 0000000..ae2bf96 Binary files /dev/null and b/japaneseforest/textures/japaneseforest_sashimi_8.png differ diff --git a/japaneseforest/textures/japaneseforest_sashimi_cooked.png b/japaneseforest/textures/japaneseforest_sashimi_cooked.png new file mode 100644 index 0000000..9c6f8f3 Binary files /dev/null and b/japaneseforest/textures/japaneseforest_sashimi_cooked.png differ diff --git a/japaneseforest/textures/japaneseforest_truel.png b/japaneseforest/textures/japaneseforest_truel.png new file mode 100755 index 0000000..b0d7516 Binary files /dev/null and b/japaneseforest/textures/japaneseforest_truel.png differ diff --git a/japaneseforest/textures/japaneseforest_truel_90.png b/japaneseforest/textures/japaneseforest_truel_90.png new file mode 100644 index 0000000..2193371 Binary files /dev/null and b/japaneseforest/textures/japaneseforest_truel_90.png differ diff --git a/japaneseforest/textures/japaneseforest_violet_firefly.png b/japaneseforest/textures/japaneseforest_violet_firefly.png new file mode 100644 index 0000000..f763d42 Binary files /dev/null and b/japaneseforest/textures/japaneseforest_violet_firefly.png differ diff --git a/japaneseforest/textures/japaneseforest_violet_firefly_animated.png b/japaneseforest/textures/japaneseforest_violet_firefly_animated.png new file mode 100644 index 0000000..0e486be Binary files /dev/null and b/japaneseforest/textures/japaneseforest_violet_firefly_animated.png differ diff --git a/japaneseforest/textures/japaneseforest_white_firefly.png b/japaneseforest/textures/japaneseforest_white_firefly.png new file mode 100644 index 0000000..4cf54b7 Binary files /dev/null and b/japaneseforest/textures/japaneseforest_white_firefly.png differ diff --git a/japaneseforest/textures/japaneseforest_white_firefly_animated.png b/japaneseforest/textures/japaneseforest_white_firefly_animated.png new file mode 100644 index 0000000..43f8b92 Binary files /dev/null and b/japaneseforest/textures/japaneseforest_white_firefly_animated.png differ diff --git a/japaneseforest/textures/mud.png b/japaneseforest/textures/mud.png new file mode 100644 index 0000000..84a14d9 Binary files /dev/null and b/japaneseforest/textures/mud.png differ diff --git a/japaneseforest/textures/mud_block.png b/japaneseforest/textures/mud_block.png new file mode 100644 index 0000000..70a88d4 Binary files /dev/null and b/japaneseforest/textures/mud_block.png differ diff --git a/japaneseforest/textures/mud_brick.png b/japaneseforest/textures/mud_brick.png new file mode 100644 index 0000000..829a2af Binary files /dev/null and b/japaneseforest/textures/mud_brick.png differ diff --git a/japaneseforest/textures/racine.png b/japaneseforest/textures/racine.png new file mode 100644 index 0000000..a1f6a23 Binary files /dev/null and b/japaneseforest/textures/racine.png differ diff --git a/japaneseforest/textures/racine_cooked.png b/japaneseforest/textures/racine_cooked.png new file mode 100644 index 0000000..018ccb1 Binary files /dev/null and b/japaneseforest/textures/racine_cooked.png differ diff --git a/japaneseforest/textures/racine_inv.png b/japaneseforest/textures/racine_inv.png new file mode 100644 index 0000000..aaa9622 Binary files /dev/null and b/japaneseforest/textures/racine_inv.png differ diff --git a/japaneseforest/textures/sashimi_brick.png b/japaneseforest/textures/sashimi_brick.png new file mode 100644 index 0000000..c096968 Binary files /dev/null and b/japaneseforest/textures/sashimi_brick.png differ diff --git a/japaneseforest/textures/seed_sashimi.png b/japaneseforest/textures/seed_sashimi.png new file mode 100644 index 0000000..2339383 Binary files /dev/null and b/japaneseforest/textures/seed_sashimi.png differ diff --git a/japaneseforest/textures/side_small_wall.png b/japaneseforest/textures/side_small_wall.png new file mode 100644 index 0000000..022dce0 Binary files /dev/null and b/japaneseforest/textures/side_small_wall.png differ diff --git a/japaneseforest/textures/small_wall.png b/japaneseforest/textures/small_wall.png new file mode 100644 index 0000000..75d52e1 Binary files /dev/null and b/japaneseforest/textures/small_wall.png differ diff --git a/japaneseforest/textures/tatami.png b/japaneseforest/textures/tatami.png new file mode 100644 index 0000000..1a6f20f Binary files /dev/null and b/japaneseforest/textures/tatami.png differ diff --git a/japaneseforest/textures/tatami_simple.png b/japaneseforest/textures/tatami_simple.png new file mode 100644 index 0000000..45c5daa Binary files /dev/null and b/japaneseforest/textures/tatami_simple.png differ diff --git a/japaneseforest/tools.lua b/japaneseforest/tools.lua new file mode 100644 index 0000000..5f27097 --- /dev/null +++ b/japaneseforest/tools.lua @@ -0,0 +1,405 @@ +japaneseforest = {} +-- save how many bullets owner fired +japaneseforest.fired_table = {} +local enable_particles = minetest.settings:get_bool("enable_particles") + +local function bound(x, minb, maxb) + if x < minb then + return minb + elseif x > maxb then + return maxb + else + return x + end +end + +--- Punch damage calculator. +-- By default, this just calculates damage in the vanilla way. Switch it out for something else to change the default damage mechanism for mobs. +-- @param ObjectRef player +-- @param ?ObjectRef puncher +-- @param number time_from_last_punch +-- @param table tool_capabilities +-- @param ?vector direction +-- @param ?Id attacker +-- @return number The calculated damage +-- @author raymoo +function japaneseforest.damage_calculator(player, puncher, tflp, caps, direction, attacker) + local a_groups = player:get_armor_groups() or {} + local full_punch_interval = caps.full_punch_interval or 1.4 + local time_prorate = bound(tflp / full_punch_interval, 0, 1) + + local damage = 0 + for group, damage_rating in pairs(caps.damage_groups or {}) do + local armor_rating = a_groups[group] or 0 + damage = damage + damage_rating * (armor_rating / 100) + end + + return math.floor(damage * time_prorate) +end + +-- particles +function japaneseforest.add_effects(pos) + if not enable_particles then return end + + return minetest.add_particlespawner({ + amount = 2, + time = 0, + minpos = {x=pos.x-1, y=pos.y+0.5, z=pos.z-1}, + maxpos = {x=pos.x+1, y=pos.y+1.5, z=pos.z+1}, + minvel = {x=-0.1, y=-0.1, z=-0.1}, + maxvel = {x=0.3, y=-0.3, z=0.3}, + minacc = vector.new(), + maxacc = vector.new(), + minexptime = 1, + maxexptime = 5, + minsize = .5, + maxsize = 1.5, + texture = "japaneseforest_chest_particle.png", + glow = 7 + }) +end + +-- check for player near by to activate particles +function japaneseforest.check_around_radius(pos) + local player_near = false + + for _,obj in ipairs(minetest.get_objects_inside_radius(pos, 16)) do + if obj:is_player() then + player_near = true + break + end + end + + return player_near +end + +-- check if within physical map limits (-30911 to 30927) +function japaneseforest.within_limits(pos, radius) + if (pos.x - radius) > -30913 + and (pos.x + radius) < 30928 + and (pos.y - radius) > -30913 + and (pos.y + radius) < 30928 + and (pos.z - radius) > -30913 + and (pos.z + radius) < 30928 then + return true -- within limits + end + + return false -- beyond limits +end + + + +function japaneseforest.add_wear(itemstack, pos) + -- wear tool + local wdef = itemstack:get_definition() + itemstack:add_wear(65535/4300) + -- Tool break sound + if itemstack:get_count() == 0 and wdef.sound and wdef.sound.breaks then + minetest.sound_play(wdef.sound.breaks, {pos = pos, gain = 0.5}) + end + + return itemstack +end + +-- prevent pick axe engraved of placing item when clicken on one of the items from this list +local pick_engraved_place_blacklist = { + ["xdecor:itemframe"] = true +} + +function japaneseforest.pick_engraved_place(itemstack, placer, pointed_thing) + local idx = placer:get_wield_index() + 1 -- item to right of wielded tool + local inv = placer:get_inventory() + local stack = inv:get_stack("main", idx) -- stack to right of tool + local stack_name = stack:get_name() + local under = pointed_thing.under + local above = pointed_thing.above + local node_under = minetest.get_node(under) + local udef = {} + local temp_stack = "" + + -- handle nodes + if pointed_thing.type == "node" then + local pos = minetest.get_pointed_thing_position(pointed_thing) + local pointed_node = minetest.get_node(pos) + + -- check if we have to use default on_place first + if pick_engraved_place_blacklist[pointed_node.name] ~= nil then + return minetest.item_place(itemstack, placer, pointed_thing) + end + + if pointed_node ~= nil and stack_name ~= "" then + local stack_def = minetest.registered_nodes[stack_name] + local stack_name_split = string.split(stack_name, ":") + local stack_mod = stack_name_split[1] + + udef = minetest.registered_nodes[stack_name] + -- print(dump(udef)) + + -- not for farming - that should be part of a hoe + if stack_mod ~= "farming" or stack_mod ~= "farming_addons" then + if udef and udef.on_place then + temp_stack = udef.on_place(stack, placer, pointed_thing) or stack + inv:set_stack("main", idx, temp_stack) + + -- itemstack = japaneseforest.add_wear(itemstack) + + -- play sound + -- if udef.sounds then + -- if udef.sounds.place then + -- udef.sounds.place.to_player = placer:get_player_name() + -- minetest.sound_play(udef.sounds.place) + -- end + -- end + + return itemstack + elseif udef and udef.on_use then + temp_stack = udef.on_use(stack, placer, pointed_thing) or stack + inv:set_stack("main", idx, temp_stack) + + -- itemstack = japaneseforest.add_wear(itemstack) + return itemstack + end + end + + -- handle default torch placement + if stack_name == "default:torch" then + local wdir = minetest.dir_to_wallmounted(vector.subtract(under, above)) + local fakestack = stack + + if wdir == 0 then + fakestack:set_name("default:torch_ceiling") + elseif wdir == 1 then + fakestack:set_name("default:torch") + else + fakestack:set_name("default:torch_wall") + end + + temp_stack = minetest.item_place(fakestack, placer, pointed_thing, wdir) + + temp_stack:set_name("default:torch") + inv:set_stack("main", idx, temp_stack) + + -- itemstack = japaneseforest.add_wear(itemstack) + + -- play sound + -- if udef and udef.sounds then + -- if udef.sounds.place then + -- udef.sounds.place.to_player = placer:get_player_name() + -- minetest.sound_play(udef.sounds.place) + -- end + -- end + + return itemstack + end + end + -- if everything else fails use default on_place + stack = minetest.item_place(stack, placer, pointed_thing) + inv:set_stack("main", idx, stack) + + -- play sound + -- if udef and udef.sounds then + -- if udef.sounds.place then + -- udef.sounds.place.to_player = placer:get_player_name() + -- minetest.sound_play(udef.sounds.place) + -- end + -- end + + return itemstack + end +end + +function japaneseforest.shovel_place(itemstack, placer, pointed_thing) + local pt = pointed_thing + + -- check if pointing at a node + if not pt then + return + end + if pt.type ~= "node" then + return + end + + local under = minetest.get_node(pt.under) + local p = {x=pt.under.x, y=pt.under.y+1, z=pt.under.z} + local above = minetest.get_node(p) + + -- return if any of the nodes is not registered + if not minetest.registered_nodes[under.name] then + return + end + if not minetest.registered_nodes[above.name] then + return + end + + -- check if the node above the pointed thing is air + if above.name ~= "air" then + return + end + + if minetest.is_protected(pt.under, placer:get_player_name()) then + minetest.record_protection_violation(pt.under, placer:get_player_name()) + return + end + + if under.name == "default:dirt" and + under.name ~= "japaneseforest:paths" then + minetest.set_node(pt.under, {name = "japaneseforest:paths"}) + + + elseif (under.name == "default:dirt_with_grass" or + under.name == "default:dirt_with_grass_footsteps" or + under.name == "default:dirt_with_dry_grass" or + under.name == "default:dirt_with_snow" or + under.name == "default:dirt_with_rainforest_litter") and + under.name ~= "japaneseforest:paths" then + minetest.set_node(pt.under, {name = "japaneseforest:paths"}) + + + elseif under.name == "default:dry_dirt_with_dry_grass" and + under.name ~= "japaneseforest:paths" then + minetest.set_node(pt.under, {name = "japaneseforest:paths"}) + + elseif under.name == "default:dirt_with_coniferous_litter" and + under.name ~= "japaneseforest:paths" then + minetest.set_node(pt.under, {name = "japaneseforest:paths"}) + + elseif under.name == "japaneseforest:japanese_dirt_with_grass" and + under.name ~= "japaneseforest:paths" then + minetest.set_node(pt.under, {name = "japaneseforest:paths"}) + + elseif under.name == "bambooforest:dirt_with_bamboo" and + under.name ~= "japaneseforest:paths" then + minetest.set_node(pt.under, {name = "japaneseforest:paths"}) + + + else + return + end + + -- play sound + minetest.sound_play("default_dig_crumbly", { + pos = pt.under, + gain = 0.5 + }) + -- add wear + itemstack = japaneseforest.add_wear(itemstack) + return itemstack +end + + + +-- Taken from WorldEdit +-- Determines the axis in which a player is facing, returning an axis ("x", "y", or "z") and the sign (1 or -1) +function japaneseforest.player_axis(player) + local dir = player:get_look_dir() + local x, y, z = math.abs(dir.x), math.abs(dir.y), math.abs(dir.z) + if x > y then + if x > z then + return "x", dir.x > 0 and 1 or -1 + end + elseif y > z then + return "y", dir.y > 0 and 1 or -1 + end + return "z", dir.z > 0 and 1 or -1 +end + +function japaneseforest.hoe_on_use(itemstack, user, pointed_thing) + local pt = pointed_thing + -- check if pointing at a node + if not pt then + return + end + if pt.type ~= "node" then + return + end + + local under = minetest.get_node(pt.under) + local p = {x=pt.under.x, y=pt.under.y+1, z=pt.under.z} + local above = minetest.get_node(p) + + -- return if any of the nodes is not registered + if not minetest.registered_nodes[under.name] then + return + end + if not minetest.registered_nodes[above.name] then + return + end + + -- check if the node above the pointed thing is air + if above.name ~= "air" then + return + end + + -- check if pointing at soil + if minetest.get_item_group(under.name, "soil") ~= 1 then + return + end + + -- check if (wet) soil defined + local regN = minetest.registered_nodes + if regN[under.name].soil == nil or regN[under.name].soil.wet == nil or regN[under.name].soil.dry == nil then + return + end + + if minetest.is_protected(pt.under, user:get_player_name()) then + minetest.record_protection_violation(pt.under, user:get_player_name()) + return + end + if minetest.is_protected(pt.above, user:get_player_name()) then + minetest.record_protection_violation(pt.above, user:get_player_name()) + return + end + + -- turn the node into soil and play sound + minetest.set_node(pt.under, {name = regN[under.name].soil.dry}) + minetest.sound_play("default_dig_crumbly", { + pos = pt.under, + gain = 0.5, + }) +end + +-- shovel +minetest.register_tool("japaneseforest:truel", { + description = "Allows you to create Japanese paths", + inventory_image = "japaneseforest_truel.png", + wield_image = "japaneseforest_truel_90.png^[transformR90", + wield_scale = {x=1.0, y=1.0, z=1.0}, + tool_capabilities = { + full_punch_interval = 1, + max_drop_level=1, + groupcaps={ + crumbly = {times={[1]=1.5, [2]=1.50, [3]=1.50}, uses=15, maxlevel=3}, + }, + damage_groups = {fleshy=4}, + }, + sound = {breaks = "default_tool_breaks"}, + on_place = japaneseforest.shovel_place +}) + + +-- japanese path +minetest.register_node("japaneseforest:paths", { + description = "Path", + drawtype = "nodebox", + tiles = {"japaneseforest_path_top.png", "default_dirt.png", "default_dirt.png^japaneseforest_japaneseforest_side.png"}, + is_ground_content = false, + paramtype = "light", + node_box = { + type = "fixed", + fixed = {-1/2, -1/2, -1/2, 1/2, 1/2-1/16, 1/2}, + }, + collision_box = { + type = "fixed", + fixed = {-1/2, -1/2, -1/2, 1/2, 1/2-1/16, 1/2}, + }, + selection_box = { + type = "fixed", + fixed = {-1/2, -1/2, -1/2, 1/2, 1/2-1/16, 1/2}, + }, + drop = "japaneseforest:paths", + is_ground_content = false, + groups = {crumbly = 3, cracky = 2}, + sounds = default.node_sound_stone_defaults(), +}) + + diff --git a/japaneseforest/tree.lua b/japaneseforest/tree.lua new file mode 100644 index 0000000..b0be2bf --- /dev/null +++ b/japaneseforest/tree.lua @@ -0,0 +1,94 @@ +-------------Sapling +minetest.register_node("japaneseforest:japanese_sapling", { + description = "Japanese Sapling", + drawtype = "plantlike", + tiles = {"japanese_sapling.png"}, + inventory_image = "japanese_sapling.png", + on_use = minetest.item_eat(2), + wield_image = "japanese_sapling.png", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + on_timer = grow_new_japanese_tree, + selection_box = { + type = "fixed", + fixed = {-4 / 16, -0.5, -4 / 16, 4 / 16, 7 / 16, 4 / 16} + }, + groups = {snappy = 2, dig_immediate = 3, flammable = 2, + attached_node = 1, sapling = 1, food_bread = 1}, + sounds = default.node_sound_leaves_defaults(), + + on_construct = function(pos) + minetest.get_node_timer(pos):start(math.random(300, 1500)) + end, + + on_place = function(itemstack, placer, pointed_thing) + itemstack = default.sapling_on_place(itemstack, placer, pointed_thing, + "japaneseforest:japanese_sapling", + {x = -2, y = 1, z = -2}, + {x = 2, y = 15, z = 2}, + 4) + + return itemstack + end, +}) + +local function grow_new_japanese_tree(pos) + if not default.can_grow(pos) then + -- try a bit later again + minetest.get_node_timer(pos):start(math.random(240, 600)) + return + end + + if node.name == "japaneseforest:japanese_sapling" then + minetest.log("action", "A japanese sapling grows into a tree at ".. + minetest.pos_to_string(pos)) + local snow = is_snow_nearby(pos) + if mg_name == "v6" then + grow_new_japanese_tree(pos, snow) + elseif snow then + grow_new_japanese_tree_2(pos) + else + grow_new_japanese_tree_3(pos) + end + +-- New japanese tree + +function grow_new_japanese_tree(pos) + local path + if math.random() > 0.5 then + path = minetest.get_modpath("japaneseforest") .. + "/schematics/japanese_tree_1_1.mts" + else + path = minetest.get_modpath("japaneseforest") .. + "/schematics/japanese_tree_1_2.mts" + end + minetest.place_schematic({x = pos.x - 2, y = pos.y - 1, z = pos.z - 2}, + path, "0", nil, false) +end + +-- New japanese tree 2 + +function grow_new_japanese_tree_2(pos) + local path + if math.random() > 0.5 then + path = minetest.get_modpath("japaneseforest") .. + "/schematics/japanese_tree_1_3.mts" + else + path = minetest.get_modpath("japaneseforest") .. + "/schematics/japanese_tree_2_1.mts" + end + minetest.place_schematic({x = pos.x - 2, y = pos.y - 1, z = pos.z - 2}, + path, "0", nil, false) +end + +-- New japanese tree 3 + +function grow_new_japanese_tree_3(pos) + local path = minetest.get_modpath("japaneseforest") .. + "/schematics/japanese_tree_3_2.mts" + minetest.place_schematic({x = pos.x - 4, y = pos.y - 1, z = pos.z - 4}, + path, "random", nil, false) +end + end +end diff --git a/license.txt b/license.txt new file mode 100755 index 0000000..af3dc37 --- /dev/null +++ b/license.txt @@ -0,0 +1,18 @@ + License +------------------------------------------------------------------------------------------------------------------------ +Copyright (C) 2021-2022: Atlante - AFL-1.1 +License for code: AFL-1.1 + +Attribution — You must give appropriate credit, provide a link to the license, and +indicate if changes were made. You may do so in any reasonable manner, but not in any way +that suggests the licensor endorses you or your use. + +ShareAlike — If you remix, transform, or build upon the material, you must distribute +your contributions under the same license as the original. + +Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +Anyone can fix the mod. My Discord "Atlante#1952" And my Mail Address "AtlanteEtDocteur@gmail.com" + + diff --git a/modpack.conf b/modpack.conf new file mode 100755 index 0000000..4d6aae7 --- /dev/null +++ b/modpack.conf @@ -0,0 +1,3 @@ +description = Add many biomes,trees and decorative block. +name = biomes +title = Biomes diff --git a/nightshade/crafting.lua b/nightshade/crafting.lua new file mode 100644 index 0000000..7f5a440 --- /dev/null +++ b/nightshade/crafting.lua @@ -0,0 +1,23 @@ +------------Crafting +minetest.register_craft({ + output = "nightshade:nightshade_wood 4", + recipe = { + {"nightshade:nightshade_tree"}, + } +}) + +minetest.register_craft({ + output = "nightshade:nightshade_lamp", + recipe = { + {"nightshade:nightshade_wood", "default:meselamp"}, + } +}) + +minetest.register_craft({ + output = "nightshade:nightshade_trapdoor", + recipe = { + {"nightshade:nightshade_wood", "nightshade:nightshade_wood", "nightshade:nightshade_wood"}, + {"nightshade:nightshade_wood", "nightshade:nightshade_wood", "nightshade:nightshade_wood"}, + } +}) + diff --git a/nightshade/depends.txt b/nightshade/depends.txt new file mode 100644 index 0000000..f915e72 --- /dev/null +++ b/nightshade/depends.txt @@ -0,0 +1,5 @@ +default +doors +japaneseforest +moreblocks? +bonemeal? diff --git a/nightshade/fireflies.lua b/nightshade/fireflies.lua new file mode 100644 index 0000000..032142c --- /dev/null +++ b/nightshade/fireflies.lua @@ -0,0 +1,10 @@ +minetest.register_decoration({ + deco_type = "simple", + place_on = {"nightshade:nightshade_dirt_with_grass"}, + sidelen = 16, + fill_ratio = 0.02, + biomes = {"nightshade"}, + decoration = { +"japaneseforest:red_firefly", "japaneseforest:orange_firefly","japaneseforest:violet_firefly", "japaneseforest:black_firefly", + } +}) diff --git a/nightshade/init.lua b/nightshade/init.lua new file mode 100644 index 0000000..f803a50 --- /dev/null +++ b/nightshade/init.lua @@ -0,0 +1,7 @@ +local path = minetest.get_modpath("nightshade") + + dofile(path .. "/nodes.lua") + dofile(path .. "/mapgen.lua") + dofile(path .. "/crafting.lua") + dofile(path .. "/fireflies.lua") + dofile(path .. "/moreblocks.lua") diff --git a/nightshade/license.txt b/nightshade/license.txt new file mode 100755 index 0000000..af3dc37 --- /dev/null +++ b/nightshade/license.txt @@ -0,0 +1,18 @@ + License +------------------------------------------------------------------------------------------------------------------------ +Copyright (C) 2021-2022: Atlante - AFL-1.1 +License for code: AFL-1.1 + +Attribution — You must give appropriate credit, provide a link to the license, and +indicate if changes were made. You may do so in any reasonable manner, but not in any way +that suggests the licensor endorses you or your use. + +ShareAlike — If you remix, transform, or build upon the material, you must distribute +your contributions under the same license as the original. + +Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +Anyone can fix the mod. My Discord "Atlante#1952" And my Mail Address "AtlanteEtDocteur@gmail.com" + + diff --git a/nightshade/mapgen.lua b/nightshade/mapgen.lua new file mode 100644 index 0000000..6c9fa9c --- /dev/null +++ b/nightshade/mapgen.lua @@ -0,0 +1,139 @@ +minetest.register_biome({ + name = "nightshade", + node_top = "nightshade:nightshade_dirt_with_grass", + depth_top = 1, + node_filler = "default:dirt", + depth_filler = 4, + node_riverbed = "default:sand", + depth_riverbed = 3, + node_dungeon = "default:cobble", + node_dungeon_alt = "default:mossycobble", + node_dungeon_stair = "stairs:stair_cobble", + y_max = 31000, + y_min = 5, + heat_point = 88, + humidity_point = 74, +}) + +minetest.register_decoration({ + name = "nightshade:nightshade_tree_1", + deco_type = "schematic", + place_on = {"nightshade:nightshade_dirt_with_grass"}, + place_offset_y = 0, + sidelen = 16, + fill_ratio = 0.019265, + biomes = {"nightshade"}, + y_max = 31000, + y_min = -20, + schematic = minetest.get_modpath("nightshade").."/schematics/nightshade_tree_1.mts", + flags = "place_center_x, place_center_z", + rotation = "random", +}) + +minetest.register_decoration({ + name = "nightshade:nightshade_tree_2", + deco_type = "schematic", + place_on = {"nightshade:nightshade_dirt_with_grass"}, + place_offset_y = 0, + sidelen = 16, + fill_ratio = 0.019265, + biomes = {"nightshade"}, + y_max = 31000, + y_min = -20, + schematic = minetest.get_modpath("nightshade").."/schematics/nightshade_tree_2.mts", + flags = "place_center_x, place_center_z", + rotation = "random", +}) + +minetest.register_decoration({ + name = "nightshade:nightshade_tree_3", + deco_type = "schematic", + place_on = {"nightshade:nightshade_dirt_with_grass"}, + place_offset_y = 0, + sidelen = 16, + fill_ratio = 0.019265, + biomes = {"nightshade"}, + y_max = 31000, + y_min = -20, + schematic = minetest.get_modpath("nightshade").."/schematics/nightshade_tree_3.mts", + flags = "place_center_x, place_center_z", + rotation = "random", +}) + +minetest.register_decoration({ + name = "nightshade:nightshade_bush", + deco_type = "schematic", + place_on = {"nightshade:nightshade_dirt_with_grass"}, + place_offset_y = 0, + sidelen = 16, + fill_ratio = 0.039265, + biomes = {"nightshade"}, + y_max = 31000, + y_min = -20, + schematic = minetest.get_modpath("nightshade").."/schematics/nightshade_bush.mts", + flags = "place_center_x, place_center_z", + rotation = "random", +}) + +minetest.register_decoration({ + name = "nightshade:nightshade_tree_log_1", + deco_type = "schematic", + place_on = {"nightshade:nightshade_dirt_with_grass"}, + place_offset_y = 0, + sidelen = 16, + fill_ratio = 0.010265, + biomes = {"nightshade"}, + y_max = 31000, + y_min = -20, + schematic = minetest.get_modpath("nightshade").."/schematics/nightshade_tree_log_1.mts", + flags = "place_center_x, place_center_z", + rotation = "random", +}) + +minetest.register_decoration({ + name = "nightshade:nightshade_tree_log_2", + deco_type = "schematic", + place_on = {"nightshade:nightshade_dirt_with_grass"}, + place_offset_y = 0, + sidelen = 16, + fill_ratio = 0.012265, + biomes = {"nightshade"}, + y_max = 31000, + y_min = -20, + schematic = minetest.get_modpath("nightshade").."/schematics/nightshade_tree_log_2.mts", + flags = "place_center_x, place_center_z", + rotation = "random", +}) + +minetest.register_decoration({ + deco_type = "simple", + place_on = {"nightshade:nightshade_dirt_with_grass"}, + sidelen = 16, + fill_ratio = 0.15, + biomes = {"nightshade"}, + decoration = { + "flowers:mushroom_brown", "flowers:mushroom_red", "default:junglegrass", + } +}) + +minetest.register_decoration({ + deco_type = "simple", + place_on = {"nightshade:nightshade_tree"}, + sidelen = 16, + fill_ratio = 0.15, + biomes = {"nightshade"}, + decoration = { + "flowers:mushroom_brown", "flowers:mushroom_red", "default:junglegrass", + } +}) + +minetest.register_decoration({ + deco_type = "simple", + place_on = {"nightshade:nightshade_dirt_with_grass"}, + sidelen = 16, + fill_ratio = 0.15, + biomes = {"nightshade"}, + decoration = { + "nightshade:nightshade_grass", + } +}) diff --git a/nightshade/mod.conf b/nightshade/mod.conf new file mode 100755 index 0000000..9152a6e --- /dev/null +++ b/nightshade/mod.conf @@ -0,0 +1,7 @@ + +author = Atlante +name = nightshade + +description = Adds a nighshade biome with a few more objects. +title = NightShade +depends = default, doors, japaneseforest diff --git a/nightshade/moreblocks.lua b/nightshade/moreblocks.lua new file mode 100644 index 0000000..36a1d7a --- /dev/null +++ b/nightshade/moreblocks.lua @@ -0,0 +1,28 @@ +-----------------Moreblock +if minetest.get_modpath("moreblocks") then + + stairsplus:register_all("nightshade_tree", "wood", "nightshade:nightshade_tree", { + description = "NightShade Tree", + tiles = {"nightshade_tree_top.png", "nightshade_tree_top.png", + "nightshade_tree.png"}, + groups = {choppy = 3, oddly_breakable_by_hand = 2, flammable = 3, wood = 1}, + sounds = default.node_sound_wood_defaults(), + }) + + stairsplus:register_all("nightshade_wood", "wood", "nightshade:nightshade_wood", { + description = "NightShade Tree", + tiles = {"nightshade_wood_fence.png"}, + groups = {choppy = 3, oddly_breakable_by_hand = 2, flammable = 3, wood = 1}, + sounds = default.node_sound_wood_defaults(), + }) + + stairsplus:register_all("nightshade_lamp", "glass", "nightshade:nightshade_lamp", { + description = "NightShade Lamp", + tiles = {"nightshade_lamp.png"}, + groups = {cracky = 3, oddly_breakable_by_hand = 3}, + sounds = default.node_sound_glass_defaults(), + }) + + + +end diff --git a/nightshade/nightshade.png b/nightshade/nightshade.png new file mode 100644 index 0000000..e5b2972 Binary files /dev/null and b/nightshade/nightshade.png differ diff --git a/nightshade/nodes.lua b/nightshade/nodes.lua new file mode 100644 index 0000000..d05501f --- /dev/null +++ b/nightshade/nodes.lua @@ -0,0 +1,219 @@ +minetest.register_node("nightshade:nightshade_dirt_with_grass", { + description = "NightShade Dirt With Grass", + tiles = {"nightshade_nightshade_grass.png", "default_dirt.png", + {name = "default_dirt.png^nightshade_nightshade_grass_side.png", + tileable_vertical = false}}, + groups = {crumbly = 3, soil = 1, spreading_dirt_type = 1}, + drop = "default:dirt", + sounds = default.node_sound_dirt_defaults({ + footstep = {name = "default_grass_footstep", gain = 0.25}, + }), +}) + +minetest.register_node("nightshade:nightshade_leaves_1", { + description = "NightShade Leaves", + drawtype = "allfaces_optional", + waving = 1, + tiles = {"nightshade_tree_leaves.png"}, + paramtype = "light", + is_ground_content = false, + groups = {snappy = 3, leafdecay = 3, flammable = 2, leaves = 1}, + drop = { + max_items = 1, + items = { + {items = {"nightshade:nightshade_sapling"}, rarity = 20}, + {items = {"nightshade:nightshade_leaves_1"}} + } + }, + sounds = default.node_sound_leaves_defaults(), + + after_place_node = after_place_leaves, +}) + +minetest.register_node("nightshade:nightshade_glowin_leaves_1", { + description = "NightShade Glowing Leaves", + drawtype = "allfaces_optional", + waving = 1, + tiles = {"nightshade_tree_glowing_leaves.png"}, + paramtype = "light", + is_ground_content = false, + light_source = 15, + groups = {snappy = 3, leafdecay = 3, flammable = 2, leaves = 1}, + drop = { + max_items = 1, + items = { + {items = {"nightshade:nightshade_sapling"}, rarity = 20}, + {items = {"nightshade:nightshade_glowin_leaves_1"}} + } + }, + sounds = default.node_sound_leaves_defaults(), + + after_place_node = after_place_leaves, + +}) + + +minetest.register_node("nightshade:nightshade_tree", { + description = "NightShade Tree", + tiles = {"nightshade_tree_top.png", "nightshade_tree_top.png", + "nightshade_tree.png"}, + paramtype2 = "facedir", + is_ground_content = false, + groups = {tree = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2}, + sounds = default.node_sound_wood_defaults(), + + on_place = minetest.rotate_node +}) + +minetest.register_node("nightshade:nightshade_wood", { + description = "NightShade Wood", + paramtype2 = "facedir", + place_param2 = 0, + tiles = {"nightshade_wood.png"}, + is_ground_content = false, + groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2, wood = 1}, + sounds = default.node_sound_wood_defaults(), +}) + +minetest.register_node("nightshade:nightshade_lamp", { + description = "NightShade Lamp", + drawtype = "glasslike", + tiles = {"nightshade_lamp.png"}, + paramtype = "light", + sunlight_propagates = true, + is_ground_content = false, + groups = {cracky = 3, oddly_breakable_by_hand = 3}, + sounds = default.node_sound_glass_defaults(), + light_source = default.LIGHT_MAX, +}) + +minetest.register_node("nightshade:nightshade_grass", { + description = "NightShade Grass", + drawtype = "plantlike", + waving = 1, + visual_scale = 1.5, + tiles = {"nightshade_grass.png"}, + inventory_image = "nightshade_grass.png", + wield_image = "nightshade_grass.png", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + buildable_to = true, + groups = {snappy = 3, flora = 1, attached_node = 1, grass = 1, junglegrass = 1, flammable = 1}, + sounds = default.node_sound_leaves_defaults(), + selection_box = { + type = "fixed", + fixed = {-6 / 16, -0.5, -6 / 16, 6 / 16, 0.5, 6 / 16}, + }, +}) + +doors.register_trapdoor("nightshade:nightshade_trapdoor", { + description = "nightshade Trapdoor", + inventory_image = "nightshade_trapdoor.png", + wield_image = "nightshade_trapdoor.png", + tile_front = "nightshade_trapdoor.png", + tile_side = "nightshade_trapdoor_side.png", + gain_open = 0.06, + gain_close = 0.13, + groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2, door = 1}, +}) + + +doors.register("nightshade_door", { + tiles = {{ name = "doors_nightshade_door.png", backface_culling = true }}, + description = "nightshade Door", + inventory_image = "doors_item_nightshade.png", + groups = {node = 1, choppy = 2, oddly_breakable_by_hand = 2, flammable = 2}, + gain_open = 0.06, + gain_close = 0.13, + recipe = { + {"nightshade:nightshade_wood", "nightshade:nightshade_wood"}, + {"nightshade:nightshade_wood", "nightshade:nightshade_wood"}, + {"nightshade:nightshade_wood", "nightshade:nightshade_wood"}, + } +}) + + +doors.register_fencegate("nightshade:gate_nightshade", { + description = "NightShade Wood Fence Gate", + texture = "nightshade_wood_fence.png", + material = "nightshade:nightshade_wood", + groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2} +}) + + default.register_fence("nightshade:fence_nightshade_wood", { + description = "NightShade Wood Fence", + texture = "nightshade_wood_fence.png", + inventory_image = "default_fence_overlay.png^nightshade_wood_fence.png^" .. + "default_fence_overlay.png^[makealpha:255,126,126", + wield_image = "default_fence_overlay.png^nightshade_wood_fence.png^" .. + "default_fence_overlay.png^[makealpha:255,126,126", + material = "nightshade:nightshade_wood", + groups = {choppy = 3, oddly_breakable_by_hand = 2, flammable = 3}, + sounds = default.node_sound_wood_defaults() + }) + + default.register_fence_rail("nightshade:fence_rail_nightshade_wood", { + description = "NightShade Wood Fence Rail", + texture = "nightshade_wood_fence.png", + inventory_image = "default_fence_rail_overlay.png^nightshade_wood_fence.png^" .. + "default_fence_rail_overlay.png^[makealpha:255,126,126", + wield_image = "default_fence_rail_overlay.png^nightshade_wood_fence.png^" .. + "default_fence_rail_overlay.png^[makealpha:255,126,126", + material = "nightshade:nightshade_wood", + groups = {choppy = 3, oddly_breakable_by_hand = 2, flammable = 3}, + sounds = default.node_sound_wood_defaults() + }) + + minetest.register_node("nightshade:nightshade_sapling", { + description = "Nightshade Sapling", + drawtype = "plantlike", + tiles = {"nightshade_tree_sapling.png"}, + inventory_image = "nightshade_tree_sapling.png", + wield_image = "nightshade_tree_sapling.png", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + on_timer = grow_new_nightshade_tree, + selection_box = { + type = "fixed", + fixed = {-4 / 16, -0.5, -4 / 16, 4 / 16, 2 / 16, 4 / 16} + }, + groups = {snappy = 2, dig_immediate = 3, flammable = 2, + attached_node = 1, sapling = 1}, + sounds = default.node_sound_leaves_defaults(), + + on_construct = function(pos) + minetest.get_node_timer(pos):start(math.random(300, 1500)) + end, + + on_place = function(itemstack, placer, pointed_thing) + itemstack = default.sapling_on_place(itemstack, placer, pointed_thing, + "nightshade:nightshade_sapling", + -- minp, maxp to be checked, relative to sapling pos + {x = -1, y = 0, z = -1}, + {x = 1, y = 1, z = 1}, + -- maximum interval of interior volume check + 2) + + return itemstack + end, + }) + +if minetest.get_modpath("bonemeal") ~= nil then +bonemeal:add_sapling({ + {"nightshade:nightshade_sapling", grow_new_nightshade_tree, "soil"}, +}) +end + + + +local function grow_new_nightshade_tree(pos) + if not default.can_grow(pos) then + -- try a bit later again + minetest.get_node_timer(pos):start(math.random(300, 1500)) + return + end + minetest.remove_node(pos) + minetest.place_schematic({x = pos.x-1, y = pos.y, z = pos.z-1}, modpath.."/schematics/nightshade_tree_1.mts", "0", nil, false) +end diff --git a/nightshade/schematics/nightshade_bush.mts b/nightshade/schematics/nightshade_bush.mts new file mode 100644 index 0000000..cc081c1 Binary files /dev/null and b/nightshade/schematics/nightshade_bush.mts differ diff --git a/nightshade/schematics/nightshade_tree_1.mts b/nightshade/schematics/nightshade_tree_1.mts new file mode 100644 index 0000000..a3590f0 Binary files /dev/null and b/nightshade/schematics/nightshade_tree_1.mts differ diff --git a/nightshade/schematics/nightshade_tree_2.mts b/nightshade/schematics/nightshade_tree_2.mts new file mode 100644 index 0000000..bc1f614 Binary files /dev/null and b/nightshade/schematics/nightshade_tree_2.mts differ diff --git a/nightshade/schematics/nightshade_tree_3.mts b/nightshade/schematics/nightshade_tree_3.mts new file mode 100644 index 0000000..7af305b Binary files /dev/null and b/nightshade/schematics/nightshade_tree_3.mts differ diff --git a/nightshade/schematics/nightshade_tree_log_1.mts b/nightshade/schematics/nightshade_tree_log_1.mts new file mode 100644 index 0000000..4761feb Binary files /dev/null and b/nightshade/schematics/nightshade_tree_log_1.mts differ diff --git a/nightshade/schematics/nightshade_tree_log_2.mts b/nightshade/schematics/nightshade_tree_log_2.mts new file mode 100644 index 0000000..0d9e5e7 Binary files /dev/null and b/nightshade/schematics/nightshade_tree_log_2.mts differ diff --git a/nightshade/screenshot.png b/nightshade/screenshot.png new file mode 100644 index 0000000..b923ec7 Binary files /dev/null and b/nightshade/screenshot.png differ diff --git a/nightshade/textures/doors_item_nightshade.png b/nightshade/textures/doors_item_nightshade.png new file mode 100644 index 0000000..f83c871 Binary files /dev/null and b/nightshade/textures/doors_item_nightshade.png differ diff --git a/nightshade/textures/doors_nightshade_door.png b/nightshade/textures/doors_nightshade_door.png new file mode 100644 index 0000000..d52429a Binary files /dev/null and b/nightshade/textures/doors_nightshade_door.png differ diff --git a/nightshade/textures/nightshade_grass.png b/nightshade/textures/nightshade_grass.png new file mode 100755 index 0000000..044fa27 Binary files /dev/null and b/nightshade/textures/nightshade_grass.png differ diff --git a/nightshade/textures/nightshade_lamp.png b/nightshade/textures/nightshade_lamp.png new file mode 100644 index 0000000..2d58a1e Binary files /dev/null and b/nightshade/textures/nightshade_lamp.png differ diff --git a/nightshade/textures/nightshade_nightshade_grass.png b/nightshade/textures/nightshade_nightshade_grass.png new file mode 100644 index 0000000..6571fee Binary files /dev/null and b/nightshade/textures/nightshade_nightshade_grass.png differ diff --git a/nightshade/textures/nightshade_nightshade_grass_side.png b/nightshade/textures/nightshade_nightshade_grass_side.png new file mode 100644 index 0000000..57f23d2 Binary files /dev/null and b/nightshade/textures/nightshade_nightshade_grass_side.png differ diff --git a/nightshade/textures/nightshade_trapdoor.png b/nightshade/textures/nightshade_trapdoor.png new file mode 100644 index 0000000..3c89d82 Binary files /dev/null and b/nightshade/textures/nightshade_trapdoor.png differ diff --git a/nightshade/textures/nightshade_trapdoor_side.png b/nightshade/textures/nightshade_trapdoor_side.png new file mode 100644 index 0000000..69c23d1 Binary files /dev/null and b/nightshade/textures/nightshade_trapdoor_side.png differ diff --git a/nightshade/textures/nightshade_tree.png b/nightshade/textures/nightshade_tree.png new file mode 100644 index 0000000..1b792a2 Binary files /dev/null and b/nightshade/textures/nightshade_tree.png differ diff --git a/nightshade/textures/nightshade_tree_glowing_leaves.png b/nightshade/textures/nightshade_tree_glowing_leaves.png new file mode 100644 index 0000000..469cc1f Binary files /dev/null and b/nightshade/textures/nightshade_tree_glowing_leaves.png differ diff --git a/nightshade/textures/nightshade_tree_leaves.png b/nightshade/textures/nightshade_tree_leaves.png new file mode 100644 index 0000000..5ae5739 Binary files /dev/null and b/nightshade/textures/nightshade_tree_leaves.png differ diff --git a/nightshade/textures/nightshade_tree_sapling.png b/nightshade/textures/nightshade_tree_sapling.png new file mode 100644 index 0000000..bdb7255 Binary files /dev/null and b/nightshade/textures/nightshade_tree_sapling.png differ diff --git a/nightshade/textures/nightshade_tree_top.png b/nightshade/textures/nightshade_tree_top.png new file mode 100644 index 0000000..6e8bc0f Binary files /dev/null and b/nightshade/textures/nightshade_tree_top.png differ diff --git a/nightshade/textures/nightshade_wood.png b/nightshade/textures/nightshade_wood.png new file mode 100755 index 0000000..7c895ad Binary files /dev/null and b/nightshade/textures/nightshade_wood.png differ diff --git a/nightshade/textures/nightshade_wood_fence.png b/nightshade/textures/nightshade_wood_fence.png new file mode 100755 index 0000000..df69fdd Binary files /dev/null and b/nightshade/textures/nightshade_wood_fence.png differ diff --git a/prairie/README.md b/prairie/README.md new file mode 100755 index 0000000..a564a36 --- /dev/null +++ b/prairie/README.md @@ -0,0 +1,2 @@ +# prairie +Adds a prairie biome with a few more objects. And more tree with flowers diff --git a/prairie/biome.png b/prairie/biome.png new file mode 100644 index 0000000..5c6bba6 Binary files /dev/null and b/prairie/biome.png differ diff --git a/prairie/crafting.lua b/prairie/crafting.lua new file mode 100644 index 0000000..7f5a440 --- /dev/null +++ b/prairie/crafting.lua @@ -0,0 +1,23 @@ +------------Crafting +minetest.register_craft({ + output = "nightshade:nightshade_wood 4", + recipe = { + {"nightshade:nightshade_tree"}, + } +}) + +minetest.register_craft({ + output = "nightshade:nightshade_lamp", + recipe = { + {"nightshade:nightshade_wood", "default:meselamp"}, + } +}) + +minetest.register_craft({ + output = "nightshade:nightshade_trapdoor", + recipe = { + {"nightshade:nightshade_wood", "nightshade:nightshade_wood", "nightshade:nightshade_wood"}, + {"nightshade:nightshade_wood", "nightshade:nightshade_wood", "nightshade:nightshade_wood"}, + } +}) + diff --git a/prairie/init.lua b/prairie/init.lua new file mode 100644 index 0000000..7a1e592 --- /dev/null +++ b/prairie/init.lua @@ -0,0 +1,4 @@ +local default_path = minetest.get_modpath("prairie") + +dofile(default_path.."/mapgen.lua") +dofile(default_path.."/nodes.lua") diff --git a/prairie/license.txt b/prairie/license.txt new file mode 100755 index 0000000..af3dc37 --- /dev/null +++ b/prairie/license.txt @@ -0,0 +1,18 @@ + License +------------------------------------------------------------------------------------------------------------------------ +Copyright (C) 2021-2022: Atlante - AFL-1.1 +License for code: AFL-1.1 + +Attribution — You must give appropriate credit, provide a link to the license, and +indicate if changes were made. You may do so in any reasonable manner, but not in any way +that suggests the licensor endorses you or your use. + +ShareAlike — If you remix, transform, or build upon the material, you must distribute +your contributions under the same license as the original. + +Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +Anyone can fix the mod. My Discord "Atlante#1952" And my Mail Address "AtlanteEtDocteur@gmail.com" + + diff --git a/prairie/mapgen.lua b/prairie/mapgen.lua new file mode 100644 index 0000000..1b82f4f --- /dev/null +++ b/prairie/mapgen.lua @@ -0,0 +1,138 @@ + -- Prairie + + minetest.register_biome({ + name = "prairie", + node_top = "prairie:prairie_dirt_with_grass", + depth_top = 1, + node_filler = "default:dirt", + depth_filler = 1, + node_riverbed = "prairie:prairie_dirt_with_grass", + depth_riverbed = 2, + node_dungeon = "default:cobble", + node_dungeon_alt = "default:mossycobble", + node_dungeon_stair = "stairs:stair_cobble", + y_max = 31000, + y_min = 6, + heat_point = 53, + humidity_point = 32, + }) + +minetest.register_decoration({ + deco_type = "simple", + place_on = {"prairie:prairie_dirt_with_grass"}, + sidelen = 16, + fill_ratio = 0.1, + biomes = {"prairie"}, + decoration = { + "default:grass_1", "default:grass_2", + "default:grass_3", "default:grass_4", + "default:grass_5", + } +}) + +minetest.register_decoration({ + deco_type = "simple", + place_on = {"prairie:prairie_dirt_with_grass"}, + sidelen = 16, + fill_ratio = 0.01, + biomes = {"prairie"}, + decoration = { + "default:junglegrass" + } +}) + +minetest.register_decoration({ + deco_type = "simple", + place_on = {"prairie:prairie_dirt_with_grass"}, + sidelen = 16, + fill_ratio = 0.05, + biomes = {"prairie"}, + decoration = { + "default:mushroom_brown" + } +}) + +minetest.register_decoration({ + deco_type = "simple", + place_on = {"prairie:prairie_dirt_with_grass"}, + sidelen = 16, + fill_ratio = 0.65, + biomes = {"prairie"}, + decoration = { + "flowers:rose", "flowers:violat", + "flowers:tulip", "flowers:geranium", + "flowers:dandelion_yellow", "flowers:dandelion_white", + "flowers:tulip_black", "flowers:chrysanthemum_green", + } +}) + +minetest.register_decoration({ + deco_type = "simple", + place_on = {"prairie:prairie_dirt_with_grass"}, + sidelen = 16, + fill_ratio = 0.65, + biomes = {"prairie"}, + decoration = { + "flowers:rose", "default:grass_5", + } +}) + +minetest.register_decoration({ + name = "prairie:bush", + deco_type = "schematic", + place_on = {"prairie:prairie_dirt_with_grass"}, + place_offset_y = 0, + sidelen = 16, + fill_ratio = 0.009265, + biomes = {"prairie"}, + y_max = 31000, + y_min = -20, + schematic = minetest.get_modpath("default").."/schematics/bush.mts", + flags = "place_center_x, place_center_z", + rotation = "random", +}) + +minetest.register_decoration({ + name = "prairie:blueberry", + deco_type = "schematic", + place_on = {"prairie:prairie_dirt_with_grass"}, + place_offset_y = 1, + sidelen = 16, + fill_ratio = 0.003265, + biomes = {"prairie"}, + y_max = 31000, + y_min = -20, + schematic = minetest.get_modpath("default").."/schematics/blueberry_bush.mts", + flags = "place_center_x, place_center_z", + rotation = "random", +}) + +minetest.register_decoration({ + name = "prairie:prairie_tree_1", + deco_type = "schematic", + place_on = {"prairie:prairie_dirt_with_grass"}, + place_offset_y = -1, + sidelen = 16, + fill_ratio = 0.009265, + biomes = {"prairie"}, + y_max = 31000, + y_min = -20, + schematic = minetest.get_modpath("prairie").."/schematics/prairie_tree_1.mts", + flags = "place_center_x, place_center_z", + rotation = "random", +}) + +minetest.register_decoration({ + name = "prairie:tree_2", + deco_type = "schematic", + place_on = {"prairie:prairie_dirt_with_grass"}, + place_offset_y = 0, + sidelen = 16, + fill_ratio = 0.009265, + biomes = {"prairie"}, + y_max = 31000, + y_min = -20, + schematic = minetest.get_modpath("prairie").."/schematics/aspen_tree.mts", + flags = "place_center_x, place_center_z", + rotation = "random", +}) diff --git a/prairie/mod.conf b/prairie/mod.conf new file mode 100755 index 0000000..fe44120 --- /dev/null +++ b/prairie/mod.conf @@ -0,0 +1,7 @@ + +author = Atlante +name = prairie + +description = Adds a prairie biome with a few more objects. And more tree with flowers +title = Prairie +depends = default diff --git a/prairie/nodes.lua b/prairie/nodes.lua new file mode 100644 index 0000000..d6ba05c --- /dev/null +++ b/prairie/nodes.lua @@ -0,0 +1,51 @@ +minetest.register_node("prairie:prairie_dirt_with_grass", { + description = "Prairie Dirt With Grass", + tiles = {"prairie_grass.png", "default_dirt.png", + {name = "default_dirt.png^prairie_grass_side.png", + tileable_vertical = false}}, + groups = {crumbly = 3, soil = 1, spreading_dirt_type = 1}, + drop = "default:dirt", + sounds = default.node_sound_dirt_defaults({ + footstep = {name = "default_grass_footstep", gain = 0.25}, + }), +}) + +minetest.register_node("prairie:prairie_leaves_1", { + description = "Prairie Blue Leaves", + drawtype = "allfaces_optional", + waving = 1, + tiles = {"prairie_blue_leaves.png"}, + paramtype = "light", + is_ground_content = false, + groups = {snappy = 3, leafdecay = 3, flammable = 2, leaves = 1}, + drop = { + max_items = 1, + items = { + {items = {"japaneseforest:prairie_sapling"}, rarity = 20}, + {items = {"japaneseforest:prairie_leaves_1"}} + } + }, + sounds = default.node_sound_leaves_defaults(), + + after_place_node = after_place_leaves, +}) + +minetest.register_node("prairie:prairie_leaves_2", { + description = "Prairie Yellow Leaves", + drawtype = "allfaces_optional", + waving = 1, + tiles = {"prairie_yellow_leaves.png"}, + paramtype = "light", + is_ground_content = false, + groups = {snappy = 3, leafdecay = 3, flammable = 2, leaves = 1}, + drop = { + max_items = 1, + items = { + {items = {"japaneseforest:prairie_sapling"}, rarity = 20}, + {items = {"japaneseforest:prairie_leaves_2"}} + } + }, + sounds = default.node_sound_leaves_defaults(), + + after_place_node = after_place_leaves, +}) diff --git a/prairie/schematics/aspen_tree.mts b/prairie/schematics/aspen_tree.mts new file mode 100644 index 0000000..59ab0f4 Binary files /dev/null and b/prairie/schematics/aspen_tree.mts differ diff --git a/prairie/schematics/prairie_tree_1.mts b/prairie/schematics/prairie_tree_1.mts new file mode 100644 index 0000000..ed3049b Binary files /dev/null and b/prairie/schematics/prairie_tree_1.mts differ diff --git a/prairie/screenshot.png b/prairie/screenshot.png new file mode 100644 index 0000000..ada90f8 Binary files /dev/null and b/prairie/screenshot.png differ diff --git a/prairie/textures/default_dirt.png b/prairie/textures/default_dirt.png new file mode 100755 index 0000000..4fd63b1 Binary files /dev/null and b/prairie/textures/default_dirt.png differ diff --git a/prairie/textures/default_junglegrass.png b/prairie/textures/default_junglegrass.png new file mode 100755 index 0000000..33e2826 Binary files /dev/null and b/prairie/textures/default_junglegrass.png differ diff --git a/prairie/textures/prairie_blue_leaves.png b/prairie/textures/prairie_blue_leaves.png new file mode 100644 index 0000000..9ced7a5 Binary files /dev/null and b/prairie/textures/prairie_blue_leaves.png differ diff --git a/prairie/textures/prairie_grass.png b/prairie/textures/prairie_grass.png new file mode 100644 index 0000000..0f7c81a Binary files /dev/null and b/prairie/textures/prairie_grass.png differ diff --git a/prairie/textures/prairie_grass_side.png b/prairie/textures/prairie_grass_side.png new file mode 100644 index 0000000..c37acce Binary files /dev/null and b/prairie/textures/prairie_grass_side.png differ diff --git a/prairie/textures/prairie_yellow_leaves.png b/prairie/textures/prairie_yellow_leaves.png new file mode 100644 index 0000000..d969042 Binary files /dev/null and b/prairie/textures/prairie_yellow_leaves.png differ diff --git a/screenshot.png b/screenshot.png new file mode 100644 index 0000000..e38c2d7 Binary files /dev/null and b/screenshot.png differ diff --git a/terracotta/crafting.lua b/terracotta/crafting.lua new file mode 100644 index 0000000..eefb9c5 --- /dev/null +++ b/terracotta/crafting.lua @@ -0,0 +1,94 @@ +------------Crafting +minetest.register_craft({ + output = "terracotta:clay_1 4", + recipe = { + {"","terracotta:clay_2", ""}, + {"terracotta:clay_2", "terracotta:clay_2", "terracotta:clay_2"}, + {"","terracotta:clay_2", ""}, + } +}) + +minetest.register_craft({ + output = "terracotta:clay_2 4", + recipe = { + {"default:clay", "default:clay"}, + {"default:clay", "default:clay"}, + } +}) + +minetest.register_craft({ + output = "terracotta:clay_3 4", + recipe = { + {"terracotta:clay_1","terracotta:clay_1"}, + {"terracotta:clay_1", "terracotta:clay_1"}, + } +}) + +minetest.register_craft({ + output = "terracotta:clay_4 4", + recipe = { + {"terracotta:clay_1","", "terracotta:clay_1"}, + {"", "terracotta:clay_1", ""}, + {"terracotta:clay_1","", "terracotta:clay_1"}, + } +}) + +minetest.register_craft({ + output = "terracotta:clay_5 6", + recipe = { + {"terracotta:clay_3","terracotta:clay_3"}, + {"terracotta:clay_3", "terracotta:clay_3"}, + } +}) + +minetest.register_craft({ + output = "terracotta:clay_6 8", + recipe = { + {"terracotta:clay_5","terracotta:clay_5"}, + {"terracotta:clay_5", "terracotta:clay_5"}, + } +}) + + +minetest.register_craft({ + output = "terracotta:terracotta_2 4", + recipe = { + {"","terracotta:terracotta_1", ""}, + {"terracotta:terracotta_1", "terracotta:terracotta_1", "terracotta:terracotta_1"}, + {"","terracotta:terracotta_1", ""}, + } +}) + +minetest.register_craft({ + output = "terracotta:terracotta_3 4", + recipe = { + {"terracotta:terracotta_1","terracotta:terracotta_1"}, + {"terracotta:terracotta_1", "terracotta:terracotta_1"}, + } +}) + +minetest.register_craft({ + output = "terracotta:terracotta_4 4", + recipe = { + {"terracotta:terracotta_1","", "terracotta:terracotta_1"}, + {"", "terracotta:terracotta_1", ""}, + {"terracotta:terracotta_1","", "terracotta:terracotta_1"}, + } +}) + +minetest.register_craft({ + output = "terracotta:terracotta_5 6", + recipe = { + {"terracotta:terracotta_3","terracotta:terracotta_3"}, + {"terracotta:terracotta_3", "terracotta:terracotta_3"}, + } +}) + +minetest.register_craft({ + output = "terracotta:terracotta_6 8", + recipe = { + {"terracotta:terracotta_5","terracotta:terracotta_5"}, + {"terracotta:terracotta_5", "terracotta:terracotta_5"}, + } +}) + diff --git a/terracotta/init.lua b/terracotta/init.lua new file mode 100644 index 0000000..19a35cd --- /dev/null +++ b/terracotta/init.lua @@ -0,0 +1,7 @@ +local default_path = minetest.get_modpath("terracotta") + +dofile(default_path.."/nodes.lua") +dofile(default_path.."/mapgen.lua") +dofile(default_path.."/crafting.lua") +dofile(default_path.."/moreblocks.lua") +dofile(default_path.."/walls.lua") diff --git a/terracotta/license.txt b/terracotta/license.txt new file mode 100755 index 0000000..af3dc37 --- /dev/null +++ b/terracotta/license.txt @@ -0,0 +1,18 @@ + License +------------------------------------------------------------------------------------------------------------------------ +Copyright (C) 2021-2022: Atlante - AFL-1.1 +License for code: AFL-1.1 + +Attribution — You must give appropriate credit, provide a link to the license, and +indicate if changes were made. You may do so in any reasonable manner, but not in any way +that suggests the licensor endorses you or your use. + +ShareAlike — If you remix, transform, or build upon the material, you must distribute +your contributions under the same license as the original. + +Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +Anyone can fix the mod. My Discord "Atlante#1952" And my Mail Address "AtlanteEtDocteur@gmail.com" + + diff --git a/terracotta/mapgen.lua b/terracotta/mapgen.lua new file mode 100644 index 0000000..6bfb806 --- /dev/null +++ b/terracotta/mapgen.lua @@ -0,0 +1,43 @@ +minetest.register_biome({ + name = "terracotta", + node_top = "terracotta:terracotta_1", + depth_top = 50, + node_filler = "terracotta:terracotta_1", + depth_filler = 25, + node_riverbed = "default:desert_sand", + depth_riverbed = 3, + node_dungeon = "terracotta:terracotta_1", + node_dungeon_alt = "terracotta:terracotta_1", + node_dungeon_stair = "stairs:stair_cobble", + y_max = 31000, + y_min = 5, + heat_point = 98, + humidity_point = 2, +}) + +minetest.register_decoration({ + name = "terracotta:terracotta_1", + deco_type = "schematic", + place_on = {"terracotta:terracotta_1"}, + place_offset_y = 0, + sidelen = 16, + fill_ratio = 0.010265, + biomes = {"terracotta"}, + y_max = 31000, + y_min = -20, + schematic = minetest.get_modpath("default").."/schematics/large_cactus.mts", + flags = "place_center_x, place_center_z", + rotation = "random", +}) + + +minetest.register_decoration({ + deco_type = "simple", + place_on = {"terracotta:terracotta_1"}, + sidelen = 16, + fill_ratio = 0.05, + biomes = {"terracotta"}, + decoration = { + "default:dry_shrub", + } +}) diff --git a/terracotta/mod.conf b/terracotta/mod.conf new file mode 100755 index 0000000..c695a45 --- /dev/null +++ b/terracotta/mod.conf @@ -0,0 +1,8 @@ + +author = Atlante +name = terracotta + +description = Add more decorative block +title = Terracotta +depends = default +optional_depends = moreblocks, walls diff --git a/terracotta/moreblocks.lua b/terracotta/moreblocks.lua new file mode 100644 index 0000000..64757f0 --- /dev/null +++ b/terracotta/moreblocks.lua @@ -0,0 +1,91 @@ +-----------------Moreblock +if minetest.get_modpath("moreblocks") then + + stairsplus:register_all("terracotta_1", "stone", "terracotta:terracotta_1", { + description = "Clay Tree", + tiles = {"terracotta_1.png"}, + groups = {cracky = 2, flammable = 2, stone = 1, level = 1}, + sounds = default.node_sound_stone_defaults(), + }) + + stairsplus:register_all("terracotta_2", "stone", "terracotta:terracotta_2", { + description = "Clay Block", + tiles = {"terracotta_2.png"}, + groups = {cracky = 2, flammable = 2, stone = 1, level = 1}, + sounds = default.node_sound_stone_defaults(), + }) + + stairsplus:register_all("terracotta_3", "stone", "terracotta:terracotta_3", { + description = "Clay", + tiles = {"terracotta_3.png"}, + groups = {cracky = 2, flammable = 2, stone = 1, level = 1}, + sounds = default.node_sound_stone_defaults(), + }) + + stairsplus:register_all("terracotta_4", "stone", "terracotta:terracotta_4", { + description = "City Clay", + tiles = {"terracotta_4.png"}, + groups = {cracky = 2, flammable = 2, stone = 1, level = 1}, + sounds = default.node_sound_stone_defaults(), + }) + + stairsplus:register_all("terracotta_5", "stone", "terracotta:terracotta_5", { + description = "Small Clay Brick", + tiles = {"terracotta_5.png"}, + groups = {cracky = 2, flammable = 2, stone = 1, level = 1}, + sounds = default.node_sound_stone_defaults(), + }) + + stairsplus:register_all("terracotta_6", "stone", "terracotta:terracotta_6", { + description = "Clay Brick", + tiles = {"terracotta_6.png"}, + groups = {cracky = 2, flammable = 2, stone = 1, level = 1}, + sounds = default.node_sound_stone_defaults(), + }) + + stairsplus:register_all("clay_1", "stone", "terracotta:clay_1", { + description = "Clay Tree", + tiles = {"clay_1.png"}, + groups = {cracky = 2, flammable = 2, stone = 1, level = 1}, + sounds = default.node_sound_stone_defaults(), + }) + + stairsplus:register_all("clay_2", "stone", "terracotta:clay_2", { + description = "Clay Block", + tiles = {"clay_2.png"}, + groups = {cracky = 2, flammable = 2, stone = 1, level = 1}, + sounds = default.node_sound_stone_defaults(), + }) + + stairsplus:register_all("clay_3", "stone", "terracotta:clay_3", { + description = "Clay", + tiles = {"clay_3.png"}, + groups = {cracky = 2, flammable = 2, stone = 1, level = 1}, + sounds = default.node_sound_stone_defaults(), + }) + + stairsplus:register_all("clay_4", "stone", "terracotta:clay_4", { + description = "City Clay", + tiles = {"clay_4.png"}, + groups = {cracky = 2, flammable = 2, stone = 1, level = 1}, + sounds = default.node_sound_stone_defaults(), + }) + + stairsplus:register_all("clay_5", "stone", "terracotta:clay_5", { + description = "Small Clay Brick", + tiles = {"clay_5.png"}, + groups = {cracky = 2, flammable = 2, stone = 1, level = 1}, + sounds = default.node_sound_stone_defaults(), + }) + + stairsplus:register_all("clay_6", "stone", "terracotta:clay_6", { + description = "Clay Brick", + tiles = {"clay_6.png"}, + groups = {cracky = 2, flammable = 2, stone = 1, level = 1}, + sounds = default.node_sound_stone_defaults(), + }) + + + + +end diff --git a/terracotta/nodes.lua b/terracotta/nodes.lua new file mode 100644 index 0000000..3d112d4 --- /dev/null +++ b/terracotta/nodes.lua @@ -0,0 +1,125 @@ + +-------------------------------------------------------- + +minetest.register_node("terracotta:clay_1", { + description = "Clay", + paramtype2 = "facedir", + place_param2 = 0, + tiles = {"clay_1.png"}, + is_ground_content = false, + groups = {cracky = 2, flammable = 2, stone = 1, level = 1}, + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_node("terracotta:clay_2", { + description = "Clay Block", + paramtype2 = "facedir", + place_param2 = 0, + tiles = {"clay_2.png"}, + is_ground_content = false, + groups = {cracky = 2, flammable = 2, stone = 1, level = 1}, + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_node("terracotta:clay_3", { + description = "Clay", + paramtype2 = "facedir", + place_param2 = 0, + tiles = {"clay_3.png"}, + is_ground_content = false, + groups = {cracky = 2, flammable = 2, stone = 1, level = 1}, + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_node("terracotta:clay_4", { + description = "City Clay", + paramtype2 = "facedir", + place_param2 = 0, + tiles = {"clay_4.png"}, + is_ground_content = false, + groups = {cracky = 2, flammable = 2, stone = 1, level = 1}, + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_node("terracotta:clay_5", { + description = "Small Clay Brick", + paramtype2 = "facedir", + place_param2 = 0, + tiles = {"clay_5.png"}, + is_ground_content = false, + groups = {cracky = 2, flammable = 2, stone = 1, level = 1}, + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_node("terracotta:clay_6", { + description = "Clay Brick", + paramtype2 = "facedir", + place_param2 = 0, + tiles = {"clay_6.png"}, + is_ground_content = false, + groups = {cracky = 2, flammable = 2, stone = 1, level = 1}, + sounds = default.node_sound_stone_defaults(), +}) + + +minetest.register_node("terracotta:terracotta_1", { + description = "Terracotta", + paramtype2 = "facedir", + place_param2 = 0, + tiles = {"terracotta_1.png"}, + is_ground_content = false, + groups = {cracky = 2, flammable = 2, stone = 1, level = 1}, + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_node("terracotta:terracotta_2", { + description = "Terracotta", + paramtype2 = "facedir", + place_param2 = 0, + tiles = {"terracotta_2.png"}, + is_ground_content = false, + groups = {cracky = 2, flammable = 2, stone = 1, level = 1}, + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_node("terracotta:terracotta_3", { + description = "Terracotta Brick", + paramtype2 = "facedir", + place_param2 = 0, + tiles = {"terracotta_3.png"}, + is_ground_content = false, + groups = {cracky = 2, flammable = 2, stone = 1, level = 1}, + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_node("terracotta:terracotta_4", { + description = "Terracotta", + paramtype2 = "facedir", + place_param2 = 0, + tiles = {"terracotta_4.png"}, + is_ground_content = false, + groups = {cracky = 2, flammable = 2, stone = 1, level = 1}, + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_node("terracotta:terracotta_5", { + description = "Terracotta Brick", + paramtype2 = "facedir", + place_param2 = 0, + tiles = {"terracotta_5.png"}, + is_ground_content = false, + groups = {cracky = 2, flammable = 2, stone = 1, level = 1}, + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_node("terracotta:terracotta_6", { + description = "City Terracotta", + paramtype2 = "facedir", + place_param2 = 0, + tiles = {"terracotta_6.png"}, + is_ground_content = false, + groups = {cracky = 2, flammable = 2, stone = 1, level = 1}, + sounds = default.node_sound_stone_defaults(), +}) + + diff --git a/terracotta/screenshot.png b/terracotta/screenshot.png new file mode 100644 index 0000000..112e376 Binary files /dev/null and b/terracotta/screenshot.png differ diff --git a/terracotta/terracotta_bricks.png b/terracotta/terracotta_bricks.png new file mode 100644 index 0000000..bd6c909 Binary files /dev/null and b/terracotta/terracotta_bricks.png differ diff --git a/terracotta/textures/clay_1.png b/terracotta/textures/clay_1.png new file mode 100644 index 0000000..9e296a7 Binary files /dev/null and b/terracotta/textures/clay_1.png differ diff --git a/terracotta/textures/clay_2.png b/terracotta/textures/clay_2.png new file mode 100644 index 0000000..18937b7 Binary files /dev/null and b/terracotta/textures/clay_2.png differ diff --git a/terracotta/textures/clay_3.png b/terracotta/textures/clay_3.png new file mode 100644 index 0000000..800b922 Binary files /dev/null and b/terracotta/textures/clay_3.png differ diff --git a/terracotta/textures/clay_4.png b/terracotta/textures/clay_4.png new file mode 100644 index 0000000..16b4fc4 Binary files /dev/null and b/terracotta/textures/clay_4.png differ diff --git a/terracotta/textures/clay_5.png b/terracotta/textures/clay_5.png new file mode 100644 index 0000000..402153d Binary files /dev/null and b/terracotta/textures/clay_5.png differ diff --git a/terracotta/textures/clay_6.png b/terracotta/textures/clay_6.png new file mode 100644 index 0000000..742cd23 Binary files /dev/null and b/terracotta/textures/clay_6.png differ diff --git a/terracotta/textures/default_clay.png b/terracotta/textures/default_clay.png new file mode 100755 index 0000000..42b7adb Binary files /dev/null and b/terracotta/textures/default_clay.png differ diff --git a/terracotta/textures/default_clay_lump.png b/terracotta/textures/default_clay_lump.png new file mode 100755 index 0000000..ed39551 Binary files /dev/null and b/terracotta/textures/default_clay_lump.png differ diff --git a/terracotta/textures/terracotta_1.png b/terracotta/textures/terracotta_1.png new file mode 100644 index 0000000..d392728 Binary files /dev/null and b/terracotta/textures/terracotta_1.png differ diff --git a/terracotta/textures/terracotta_2.png b/terracotta/textures/terracotta_2.png new file mode 100644 index 0000000..6e6937e Binary files /dev/null and b/terracotta/textures/terracotta_2.png differ diff --git a/terracotta/textures/terracotta_3.png b/terracotta/textures/terracotta_3.png new file mode 100644 index 0000000..6cadc68 Binary files /dev/null and b/terracotta/textures/terracotta_3.png differ diff --git a/terracotta/textures/terracotta_4.png b/terracotta/textures/terracotta_4.png new file mode 100644 index 0000000..a9e86bb Binary files /dev/null and b/terracotta/textures/terracotta_4.png differ diff --git a/terracotta/textures/terracotta_5.png b/terracotta/textures/terracotta_5.png new file mode 100644 index 0000000..5d53706 Binary files /dev/null and b/terracotta/textures/terracotta_5.png differ diff --git a/terracotta/textures/terracotta_6.png b/terracotta/textures/terracotta_6.png new file mode 100644 index 0000000..fef268e Binary files /dev/null and b/terracotta/textures/terracotta_6.png differ diff --git a/terracotta/walls.lua b/terracotta/walls.lua new file mode 100644 index 0000000..b63f34b --- /dev/null +++ b/terracotta/walls.lua @@ -0,0 +1,51 @@ +if minetest.get_modpath("walls") then + + +walls.register(":walls:clay_5", "Small Clay Brick Wall", "clay_5.png", + "terracotta:clay_5", default.node_sound_stone_defaults()) + +walls.register(":walls:clay_3", "Clay Wall", "clay_3.png", + "terracotta:clay_3", default.node_sound_stone_defaults()) + +walls.register(":walls:terracotta_5", "Terracotta Brick Wall", "terracotta_5.png", + "terracotta:terracotta_5", default.node_sound_stone_defaults()) + +walls.register(":walls:terracotta_4", "Terracotta Wall", "terracotta_4.png", + "terracotta:terracotta_4", default.node_sound_stone_defaults()) +end + +minetest.register_craft({ + output = "walls:clay_5 6", + recipe = { + {"terracotta:clay_5", "terracotta:clay_5", "terracotta:clay_5"}, + {"terracotta:clay_5", "terracotta:clay_5", "terracotta:clay_5"}, + {"", "", ""}, + } +}) + +minetest.register_craft({ + output = "walls:clay_3 6", + recipe = { + {"terracotta:clay_3", "terracotta:clay_3", "terracotta:clay_3"}, + {"terracotta:clay_3", "terracotta:clay_3", "terracotta:clay_3"}, + {"", "", ""}, + } +}) + +minetest.register_craft({ + output = "walls:terracotta_5 6", + recipe = { + {"terracotta:terracotta_5", "terracotta:terracotta_5", "terracotta:terracotta_5"}, + {"terracotta:terracotta_5", "terracotta:terracotta_5", "terracotta:terracotta_5"}, + {"", "", ""}, + } +}) + +minetest.register_craft({ + output = "walls:terracotta_4 6", + recipe = { + {"terracotta:terracotta_4", "terracotta:terracotta_4", "terracotta:terracotta_4"}, + {"terracotta:terracotta_4", "terracotta:terracotta_4", "terracotta:terracotta_4"}, + {"", "", ""}, + } +})