diff --git a/files/bucket/depends.txt b/files/bucket/depends.txt index 331d858..088c531 100644 --- a/files/bucket/depends.txt +++ b/files/bucket/depends.txt @@ -1 +1,2 @@ -default \ No newline at end of file +default +dungeon_loot? diff --git a/files/bucket/init.lua b/files/bucket/init.lua index 7b35230..afd9074 100644 --- a/files/bucket/init.lua +++ b/files/bucket/init.lua @@ -288,3 +288,17 @@ minetest.register_privilege("bucket", { description = "Can use the bucket at any height", give_to_singleplayer = false }) + +-- Register buckets as dungeon loot +if minetest.global_exists("dungeon_loot") then + dungeon_loot.register({ + {name = "bucket:bucket_empty", chance = 0.55}, + -- water in deserts/ice or above ground, lava otherwise + {name = "bucket:bucket_water", chance = 0.45, + types = {"sandstone", "desert", "ice"}}, + {name = "bucket:bucket_water", chance = 0.45, y = {0, 32768}, + types = {"normal"}}, + {name = "bucket:bucket_lava", chance = 0.45, y = {-32768, -1}, + types = {"normal"}} + }) +end diff --git a/files/default/crafting.lua b/files/default/crafting.lua index bf2d8e9..6fe719e 100644 --- a/files/default/crafting.lua +++ b/files/default/crafting.lua @@ -242,6 +242,15 @@ minetest.register_craft({ } }) +minetest.register_craft({ + output = "default:quartz_chiseled 3", + recipe = { + {"default:quartz_pillar"}, + {"default:quartz_pillar"}, + {"default:quartz_pillar"} + } +}) + minetest.register_craft({ output = "default:glowstone", recipe = { @@ -283,7 +292,7 @@ minetest.register_craft({ output = "default:apple_gold", recipe = { {"", "default:gold_ingot", ""}, - {"default:gold_ingot", "default:apple", "default:gold_ingot"}, + {"default:gold_ingot", "group:apple", "default:gold_ingot"}, {"", "default:gold_ingot", ""} } }) diff --git a/files/default/craftitems.lua b/files/default/craftitems.lua index 530d5ca..1957889 100644 --- a/files/default/craftitems.lua +++ b/files/default/craftitems.lua @@ -10,7 +10,7 @@ local function book_on_use(itemstack, user) -- Backwards compatibility local old_data = minetest.deserialize(itemstack:get_metadata()) if old_data then - meta:from_table({ fields = old_data }) + meta:from_table({fields = old_data}) end local data = meta:to_table().fields @@ -21,7 +21,7 @@ local function book_on_use(itemstack, user) owner = data.owner for str in (text .. "\n"):gmatch("([^\n]*)[\n]") do - lines[#lines+1] = str + lines[#lines + 1] = str end if data.page then @@ -62,8 +62,8 @@ local function book_on_use(itemstack, user) end local max_text_size = 10000 -local max_title_size = 80 -local short_title_size = 35 +local max_title_size = 50 +local short_title_size = 30 minetest.register_on_player_receive_fields(function(player, formname, fields) if formname ~= "default:book" then return end local inv = player:get_inventory() @@ -103,14 +103,14 @@ minetest.register_on_player_receive_fields(function(player, formname, fields) data.page_max = math.ceil((#data.text:gsub("[^\n]", "") + 1) / lpp) if new_stack then - new_stack:get_meta():from_table({ fields = data }) + new_stack:get_meta():from_table({fields = data}) if inv:room_for_item("main", new_stack) then inv:add_item("main", new_stack) else minetest.add_item(player:get_pos(), new_stack) end else - stack:get_meta():from_table({ fields = data }) + stack:get_meta():from_table({fields = data}) end elseif fields.book_next or fields.book_prev then @@ -378,7 +378,7 @@ minetest.register_craft({ }) minetest.register_craft({ - output = "default:sugar", + output = "default:sugar 2", recipe = { {"default:sugarcane"} } diff --git a/files/default/nodes.lua b/files/default/nodes.lua index 4846fc5..d482315 100644 --- a/files/default/nodes.lua +++ b/files/default/nodes.lua @@ -385,7 +385,7 @@ minetest.register_node("default:leaves", { }) minetest.register_node("default:apple", { - description = "Apple", + description = "Red Apple", drawtype = "plantlike", visual_scale = 0.75, tiles = {"default_apple.png"}, @@ -399,7 +399,27 @@ minetest.register_node("default:apple", { fixed = {-3/16, -0.5, -3/16, 3/16, 1/4, 3/16} }, groups = {fleshy = 3, dig_immediate = 3, flammable = 2, - leafdecay = 3, leafdecay_drop = 1, food = 1}, + leafdecay = 3, leafdecay_drop = 1, apple = 1, food = 1}, + on_use = minetest.item_eat(3), + sounds = default.node_sound_leaves_defaults() +}) + +minetest.register_node("default:apple_green", { + description = "Green Apple", + drawtype = "plantlike", + visual_scale = 0.75, + tiles = {"default_apple_green.png"}, + inventory_image = "default_apple_green.png", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + is_ground_content = false, + selection_box = { + type = "fixed", + fixed = {-3/16, -0.5, -3/16, 3/16, 1/4, 3/16} + }, + groups = {fleshy = 3, dig_immediate = 3, flammable = 2, + leafdecay = 3, leafdecay_drop = 1, apple = 1, food = 1}, on_use = minetest.item_eat(2), sounds = default.node_sound_leaves_defaults() }) @@ -691,7 +711,7 @@ minetest.register_node("default:birch_leaves", { paramtype = "light", walkable = false, is_ground_content = false, - groups = {snappy = 3, leafdecay = 3, flammable = 2, leaves = 1}, + groups = {snappy = 3, leafdecay = 3, flammable = 2, leaves = 1, speed = -20}, drop = { max_items = 1, items = { @@ -1249,10 +1269,11 @@ minetest.register_node("default:bush_stem", { minetest.register_node("default:bush_leaves", { description = "Bush Leaves", drawtype = "allfaces_optional", + waving = 1, tiles = {"default_leaves.png"}, paramtype = "light", walkable = false, - groups = {snappy = 3, flammable = 2, leaves = 1}, + groups = {snappy = 3, flammable = 2, leaves = 1, speed = -20}, drop = { max_items = 1, items = { @@ -1320,10 +1341,11 @@ minetest.register_node("default:blueberry_bush_stem", { minetest.register_node("default:blueberry_bush_leaves_with_berries", { description = "Blueberry Bush Leaves with Berries", drawtype = "allfaces_optional", + waving = 1, tiles = {"default_blueberry_bush_leaves.png^default_blueberry_overlay.png"}, paramtype = "light", walkable = false, - groups = {snappy = 3, flammable = 2, leaves = 1, dig_immediate = 2}, + groups = {snappy = 3, flammable = 2, leaves = 1, dig_immediate = 2, speed = -20}, drop = "default:blueberries", sounds = default.node_sound_leaves_defaults({ dig = {name = "default_dig_snappy", gain = 0.5} @@ -1343,10 +1365,11 @@ minetest.register_node("default:blueberry_bush_leaves_with_berries", { minetest.register_node("default:blueberry_bush_leaves", { description = "Blueberry Bush Leaves", drawtype = "allfaces_optional", + waving = 1, tiles = {"default_blueberry_bush_leaves.png"}, paramtype = "light", walkable = false, - groups = {snappy = 3, flammable = 2, leaves = 1}, + groups = {snappy = 3, flammable = 2, leaves = 1, speed = -20}, drop = { max_items = 1, items = { @@ -1422,10 +1445,11 @@ minetest.register_node("default:acacia_bush_stem", { minetest.register_node("default:acacia_bush_leaves", { description = "Acacia Bush Leaves", drawtype = "allfaces_optional", + waving = 1, tiles = {"default_acacia_leaves.png"}, paramtype = "light", walkable = false, - groups = {snappy = 3, flammable = 2, leaves = 1}, + groups = {snappy = 3, flammable = 2, leaves = 1, speed = -20}, drop = { max_items = 1, items = { diff --git a/files/default/schematics/apple_tree.mts b/files/default/schematics/apple_tree.mts index d56cd54..5be9289 100644 Binary files a/files/default/schematics/apple_tree.mts and b/files/default/schematics/apple_tree.mts differ diff --git a/files/default/schematics/apple_tree_from_sapling.mts b/files/default/schematics/apple_tree_from_sapling.mts index 2325100..29c25c1 100644 Binary files a/files/default/schematics/apple_tree_from_sapling.mts and b/files/default/schematics/apple_tree_from_sapling.mts differ diff --git a/files/default/textures/default_apple_green.png b/files/default/textures/default_apple_green.png new file mode 100644 index 0000000..453cfff Binary files /dev/null and b/files/default/textures/default_apple_green.png differ diff --git a/files/dungeon_loot/loot.lua b/files/dungeon_loot/loot.lua index b8c5721..6742585 100644 --- a/files/dungeon_loot/loot.lua +++ b/files/dungeon_loot/loot.lua @@ -1,11 +1,4 @@ dungeon_loot.registered_loot = { - -- buckets - {name = "bucket:bucket_empty", chance = 0.55}, - -- water in deserts or above ground, lava otherwise - {name = "bucket:bucket_water", chance = 0.45, types = {"sandstone", "desert"}}, - {name = "bucket:bucket_water", chance = 0.45, y = {0, 256}, types = {"normal"}}, - {name = "bucket:bucket_lava", chance = 0.45, y = {-64, -1}, types = {"normal"}}, - -- various items {name = "default:stick", chance = 0.6, count = {3, 6}}, {name = "default:flint", chance = 0.4, count = {1, 3}}, @@ -13,7 +6,8 @@ dungeon_loot.registered_loot = { {name = "carts:rail", chance = 0.35, count = {1, 6}}, -- farming / consumable - {name = "default:apple", chance = 0.4, count = {1, 4}}, + {name = "default:apple", chance = 0.3, count = {1, 3}}, + {name = "default:apple_green", chance = 0.3, count = {1, 3}}, {name = "default:cactus", chance = 0.4, count = {1, 4}, types = {"sandstone", "desert"}}, -- trees sappling diff --git a/files/locales/locale/locales.ru.tr b/files/locales/locale/locales.ru.tr index fd2a6d6..1cca826 100644 --- a/files/locales/locale/locales.ru.tr +++ b/files/locales/locale/locales.ru.tr @@ -62,7 +62,8 @@ Apple Tree=Яблочное Дерево Apple Wood Planks=Доски Яблони Apple Tree Sapling=Деревце Яблони Apple Tree Leaves=Яблочные Листья -Apple=Яблоко +Red Apple=Красное Яблоко +Green Apple=Зелёное Яблоко Golden Apple=Золотое Яблоко Jungle Tree=Джунгли-дерево Jungle Wood Planks=Доски из Джунгли-дерева diff --git a/files/mobs/mobs_animal/pig.lua b/files/mobs/mobs_animal/pig.lua index 6c1a30b..0aeaad8 100644 --- a/files/mobs/mobs_animal/pig.lua +++ b/files/mobs/mobs_animal/pig.lua @@ -39,7 +39,7 @@ mobs:register_mob("mobs_animal:pig", { walk_start = 61, walk_end = 80, punch_start = 90, punch_end = 110 }, - follow = {"default:apple", "farming_addons:carrot", "farming_addons:potato"}, + follow = {"group:apple", "farming_addons:carrot", "farming_addons:potato"}, on_rightclick = function(self, clicker) mobs:feed_tame(self, clicker, 8, true, true)