Merge master into testing

This commit is contained in:
kay27 2022-03-06 03:14:25 +04:00
commit abe2bde998
9 changed files with 121 additions and 5 deletions

View File

@ -71,7 +71,7 @@ local compostability = {
["mcl_flowers:sunflower"] = 65, ["mcl_flowers:sunflower"] = 65,
["mcl_flowers:waterlily"] = 65, ["mcl_flowers:waterlily"] = 65,
["mcl_farming:melon"] = 65, ["mcl_farming:melon"] = 65,
-- missing: moss block? ["mcl_core:moss"] = 65,
-- mushroom aliases below? -- mushroom aliases below?
["mcl_farming:mushroom_brown"] = 65, ["mcl_farming:mushroom_brown"] = 65,
["mcl_mushrooms:mushroom_brown"] = 65, ["mcl_mushrooms:mushroom_brown"] = 65,
@ -118,7 +118,7 @@ local compostability = {
["mcl_core:spruceleaves"] = 30, ["mcl_core:spruceleaves"] = 30,
-- --
["mcl_farming:melon_seeds"] = 30, ["mcl_farming:melon_seeds"] = 30,
-- missing: moss carpet ["mcl_core:moss_carpet"] = 30,
["mcl_farming:pumpkin_seeds"] = 30, ["mcl_farming:pumpkin_seeds"] = 30,
["mcl_core:sapling"] = 30, ["mcl_core:sapling"] = 30,
["mcl_core:acaciasapling"] = 30, ["mcl_core:acaciasapling"] = 30,

View File

@ -388,6 +388,14 @@ minetest.register_craft({
-- --
-- Crafting (tool repair) -- Crafting (tool repair)
-- --
minetest.register_craft({
output = "mcl_core:moss_carpet 3",
recipe = {
{"mcl_core:moss", "mcl_core:moss"},
}
})
minetest.register_craft({ minetest.register_craft({
type = "toolrepair", type = "toolrepair",
additional_wear = -mcl_core.repair, additional_wear = -mcl_core.repair,

View File

@ -12,6 +12,7 @@ A decorative and mostly transparent block.=Ein Dekoblock, der größtenteils tra
A grass block is dirt with a grass cover. Grass blocks are resourceful blocks which allow the growth of all sorts of plants. They can be turned into farmland with a hoe and turned into grass paths with a shovel. In light, the grass slowly spreads onto dirt nearby. Under an opaque block or a liquid, a grass block may turn back to dirt.=Ein Grasblock ist Erde mit einer Grasschicht. Grasblöcke sind vielseitige Blöcke, die das Wachstum aller möglichen Pflanzen fördern. Mit einer Hacke kann man das Land bestellen und einen Ackerboden machen. Mit einer Schaufel verwandelt man ihn in einen Graspfad. Im Licht wird das Gras sich langsam auf benachbarte Erde ausbreiten. Unter einem lichtundurchlässigen Block kann sich dieser Block wieder zurück zu Erde verwandeln. A grass block is dirt with a grass cover. Grass blocks are resourceful blocks which allow the growth of all sorts of plants. They can be turned into farmland with a hoe and turned into grass paths with a shovel. In light, the grass slowly spreads onto dirt nearby. Under an opaque block or a liquid, a grass block may turn back to dirt.=Ein Grasblock ist Erde mit einer Grasschicht. Grasblöcke sind vielseitige Blöcke, die das Wachstum aller möglichen Pflanzen fördern. Mit einer Hacke kann man das Land bestellen und einen Ackerboden machen. Mit einer Schaufel verwandelt man ihn in einen Graspfad. Im Licht wird das Gras sich langsam auf benachbarte Erde ausbreiten. Unter einem lichtundurchlässigen Block kann sich dieser Block wieder zurück zu Erde verwandeln.
A lapis lazuli block is mostly a decorative block but also useful as a compact storage of lapis lazuli.=Ein Lapislazuliblock ist hauptsächlich ein Deko-Block aber er ist auch nützlich zur kompakten Aufbewahrung von Lapislazuli. A lapis lazuli block is mostly a decorative block but also useful as a compact storage of lapis lazuli.=Ein Lapislazuliblock ist hauptsächlich ein Deko-Block aber er ist auch nützlich zur kompakten Aufbewahrung von Lapislazuli.
A lava source sets fire to a couple of air blocks above when they're next to a flammable block.=Eine Lavaquelle zündet einige Luftblöcke über ihr an, wenn sie sich neben einem entzündlichen Block befinden. A lava source sets fire to a couple of air blocks above when they're next to a flammable block.=Eine Lavaquelle zündet einige Luftblöcke über ihr an, wenn sie sich neben einem entzündlichen Block befinden.
A moss block is a natural block that can be spread to some other blocks by using bone meal.=Ein Moosblock ist ein natürlicher Block, der mit Hilfe von Knochenmehl auf andere Blöcke übertragen werden kann.
A piece of ladder which allows you to climb vertically. Ladders can only be placed on the side of solid blocks and not on glass, leaves, ice, slabs, glowstone, nor sea lanterns.=Ein Leiterstück, mit dem Sie vertikal klettern können. Leitern können nur an der Seite fester Blöcke und nicht an Glas, Blättern, Eis, Platten, Leuchtsteinen oder Ozeanlaternen platziert werden. A piece of ladder which allows you to climb vertically. Ladders can only be placed on the side of solid blocks and not on glass, leaves, ice, slabs, glowstone, nor sea lanterns.=Ein Leiterstück, mit dem Sie vertikal klettern können. Leitern können nur an der Seite fester Blöcke und nicht an Glas, Blättern, Eis, Platten, Leuchtsteinen oder Ozeanlaternen platziert werden.
Acacia Bark=Akazienrinde Acacia Bark=Akazienrinde
Acacia Leaves=Akazienblätter Acacia Leaves=Akazienblätter
@ -142,6 +143,9 @@ Lit Redstone Ore=Leuchtendes Redstoneerz
Magenta Stained Glass=Magenta Buntglas Magenta Stained Glass=Magenta Buntglas
Molten gold. It is used to craft armor, tools, and whatnot.=Geschmolzenes Gold. Es wird benutzt, um Rüstungen, Werkzeuge, und anderes herzustellen. Molten gold. It is used to craft armor, tools, and whatnot.=Geschmolzenes Gold. Es wird benutzt, um Rüstungen, Werkzeuge, und anderes herzustellen.
Molten iron. It is used to craft armor, tools, and whatnot.=Geschmolzenes Eisen. Es wird benutzt, um Rüstungen, Werkzeuge, und vieles mehr herzustellen. Molten iron. It is used to craft armor, tools, and whatnot.=Geschmolzenes Eisen. Es wird benutzt, um Rüstungen, Werkzeuge, und vieles mehr herzustellen.
Moss=Moos
Moss Carpet=Moosteppich
Moss Carpets are a thin decorative variant of the moss block.=Moosteppiche sind eine dünne, dekorative Variante des Moosblock.
Mossy Cobblestone=Moosiges Kopfsteinpflaster Mossy Cobblestone=Moosiges Kopfsteinpflaster
Mossy Stone Bricks=Moosige Steinziegel Mossy Stone Bricks=Moosige Steinziegel
Mycelium=Myzel Mycelium=Myzel

View File

@ -11,6 +11,7 @@ else
ice_drawtype = "normal" ice_drawtype = "normal"
ice_texture_alpha = minetest.features.use_texture_alpha_string_modes and "opaque" or false ice_texture_alpha = minetest.features.use_texture_alpha_string_modes and "opaque" or false
end end
local mossnodes = {"mcl_core:stone", "mcl_core:granite", "mcl_core:granite_smooth", "mcl_core:diorite", "mcl_core:diorite_smooth", "mcl_core:andesite", "mcl_core:andesite_smooth", "mcl_deepslate:deepslate", --[[glowberries, ]]"mcl_core:dirt", "mcl_core:dirt_with_grass", "mcl_core:podzol", "mcl_core:coarse_dirt", "mcl_core:mycelium"}
mcl_core.fortune_drop_ore = { mcl_core.fortune_drop_ore = {
discrete_uniform_distribution = true, discrete_uniform_distribution = true,
@ -465,6 +466,19 @@ minetest.register_node("mcl_core:dirt", {
_mcl_hardness = 0.5, _mcl_hardness = 0.5,
}) })
minetest.register_node("mcl_core:moss", {
description = S("Moss"),
_doc_items_longdesc = S("A moss block is a natural block that can be spread to some other blocks by using bone meal."),--TODO: Other desciption?
_doc_items_hidden = false,
tiles = {"mcl_core_moss_block.png"},
is_ground_content = true,
stack_max = 64,
groups = {handy=1, hoey=1},
--sounds = TODO: add sound
_mcl_blast_resistance = 0.1,
_mcl_hardness = 0.1,
})
minetest.register_node("mcl_core:coarse_dirt", { minetest.register_node("mcl_core:coarse_dirt", {
description = S("Coarse Dirt"), description = S("Coarse Dirt"),
_doc_items_longdesc = S("Coarse dirt acts as a soil for some plants and is similar to dirt, but it will never grow a cover."), _doc_items_longdesc = S("Coarse dirt acts as a soil for some plants and is similar to dirt, but it will never grow a cover."),
@ -1075,10 +1089,79 @@ minetest.register_node("mcl_core:snowblock", {
_mcl_silk_touch_drop = true, _mcl_silk_touch_drop = true,
}) })
minetest.register_node("mcl_core:moss", {
description = S("Moss"),
_doc_items_longdesc = S("A moss block is a natural block that can be spread to some other blocks by using bone meal."),--TODO: Other desciption?
_doc_items_hidden = false,
tiles = {"mcl_core_moss_block.png"},
is_ground_content = true,
stack_max = 64,
groups = {handy=1, hoey=1},
--sounds = TODO: add sound
_mcl_blast_resistance = 0.1,
_mcl_hardness = 0.1,
on_rightclick = function(pos, node, player, itemstack, pointed_thing)
if player:get_wielded_item():get_name() == "mcl_dye:white" then
if not minetest.is_creative_enabled(player) and not minetest.check_player_privs(player, "creative") then
itemstack:take_item()
end
for i, j in pairs(minetest.find_nodes_in_area_under_air({x = pos.x-1, y = pos.y-1, z = pos.z-1}, {x = pos.x+1, y = pos.y+1, z = pos.z+1}, mossnodes)) do
minetest.set_node(j, {name="mcl_core:moss"})
end
for i, j in pairs(minetest.find_nodes_in_area_under_air({x = pos.x-2, y = pos.y-1, z = pos.z-2}, {x = pos.x+2, y = pos.y+1, z = pos.z+2}, mossnodes)) do
if math.random(1,3) == 1 then minetest.set_node(j, {name="mcl_core:moss"}) end
end
for i, j in pairs(minetest.find_nodes_in_area_under_air({x = pos.x-3, y = pos.y-1, z = pos.z-3}, {x = pos.x+3, y = pos.y+1, z = pos.z+3}, mossnodes)) do
if math.random(1,9) == 1 then minetest.set_node(j, {name="mcl_core:moss"}) end
end
for i, j in pairs(minetest.find_nodes_in_area_under_air({x = pos.x-3, y = pos.y-1, z = pos.z-3}, {x = pos.x+3, y = pos.y+1, z = pos.z+3}, {"mcl_core:moss"})) do
if math.random(1,2) == 1 then
minetest.set_node({x=j.x,y=j.y+1,z=j.z} ,{name="mcl_flowers:tallgrass"})
end
end
for i, j in pairs(minetest.find_nodes_in_area_under_air({x = pos.x-3, y = pos.y-1, z = pos.z-3}, {x = pos.x+3, y = pos.y+1, z = pos.z+3}, {"mcl_core:moss"})) do
if math.random(1,4) == 1 then
minetest.set_node({x=j.x,y=j.y+1,z=j.z}, {name="mcl_core:moss_carpet"})
end
end
for i, j in pairs(minetest.find_nodes_in_area_under_air({x = pos.x-3, y = pos.y-1, z = pos.z-3}, {x = pos.x+3, y = pos.y+1, z = pos.z+3}, {"mcl_core:moss"})) do
if math.random(1,10) == 1 then
minetest.set_node({x=j.x,y=j.y+1,z=j.z} ,{name="mcl_flowers:double_grass"})
minetest.set_node({x=j.x,y=j.y+2,z=j.z} ,{name="mcl_flowers:double_grass_top"})
end
end
elseif minetest.registered_nodes[player:get_wielded_item():get_name()] then
itemstack:take_item()
minetest.set_node(pointed_thing.above, {name=player:get_wielded_item():get_name()})
end
end,
})
minetest.register_node("mcl_core:moss_carpet", {
description = S("Moss Carpet"),
_doc_items_longdesc = S("Moss Carpets are a thin decorative variant of the moss block."),
_doc_items_hidden = false,
tiles = {"mcl_core_moss_block.png"},
is_ground_content = true,
paramtype = "light",
stack_max = 64,
drawtype = "nodebox",
node_box = {
type = "fixed",
fixed = {
{-8/16, -8/16, -8/16, 8/16, -7/16, 8/16},
},
},
groups = {handy=1, hoey=1},
--sounds = TODO: add sound
_mcl_blast_resistance = 0.1,
_mcl_hardness = 0.1,
})
-- Add entry aliases for the Help -- Add entry aliases for the Help
if minetest.get_modpath("doc") then if minetest.get_modpath("doc") then
doc.add_entry_alias("nodes", "mcl_core:stone_with_redstone", "nodes", "mcl_core:stone_with_redstone_lit") doc.add_entry_alias("nodes", "mcl_core:stone_with_redstone", "nodes", "mcl_core:stone_with_redstone_lit")
doc.add_entry_alias("nodes", "mcl_core:water_source", "nodes", "mcl_core:water_flowing") doc.add_entry_alias("nodes", "mcl_core:water_source", "nodes", "mcl_core:water_flowing")
doc.add_entry_alias("nodes", "mcl_core:lava_source", "nodes", "mcl_core:lava_flowing") doc.add_entry_alias("nodes", "mcl_core:lava_source", "nodes", "mcl_core:lava_flowing")
end end

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

View File

@ -96,7 +96,28 @@ local function allow_metadata_inventory_put(pos, listname, index, stack, player)
local meta = minetest.get_meta(pos) local meta = minetest.get_meta(pos)
local inv = meta:get_inventory() local inv = meta:get_inventory()
if listname == "fuel" then if listname == "fuel" then
-- Test stack with size 1 because we burn one fuel at a time
local teststack = ItemStack(stack)
teststack:set_count(1)
local output, decremented_input = minetest.get_craft_result({method="fuel", width=1, items={teststack}})
if output.time ~= 0 then
-- Only allow to place 1 item if fuel get replaced by recipe.
-- This is the case for lava buckets.
local replace_item = decremented_input.items[1]
if replace_item:is_empty() then
-- For most fuels, just allow to place everything
return stack:get_count()
else
if inv:get_stack(listname, index):get_count() == 0 then
return 1
else
return 0 return 0
end
end
else
return 0
end
elseif listname == "src" then elseif listname == "src" then
return stack:get_count() return stack:get_count()
elseif listname == "dst" then elseif listname == "dst" then

Binary file not shown.

After

Width:  |  Height:  |  Size: 593 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 538 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 597 B