Add compostability to node definition group.

* mcl_cake/init.lua (cake);
* mcl_core/craftitems.lua (apple);
* mcl_core/nodes_base.lua (dirt with grass);
* mcl_core/nodes_cactuscane.lua (cactus, sugarcane);
* mcl_core/nodes_climb.lua (vines);
* mcl_core/nodes_trees.lua (leaves, saplings);
* mcl_dye/init.lua (cocoa beans);
* mcl_farming/beetroot.lua (beetroot, & seeds);
* mcl_farming/carrots.lua (carrot);
* mcl_farming/melon.lua (melon, & slice, & seeds);
* mcl_farming/potatoes.lua (potato, baked potato);
* mcl_farming/pumpkin.lua (pumpkin, carved &, & seeds, & pie);
* mcl_farming/wheat.lua (wheat, cookie, bread, hay block);
* mcl_flowers/init.lua (flowers, ferns, grass, & tall variants);
* mcl_mushrooms/small.lua (red and brown mushrooms);
* mcl_mushrooms/huge.lua (red and brown huge mushrooms);
* mcl_nether/init.lua (nether wart block);
* mcl_nether/nether_wart.lua (nether wart);
* mcl_ocean/kelp.lua (kelp, dried &, & block);
* mcl_ocean/sea_pickle.lua (sea pickle);
* mcl_ocean/seagrass.lua (seagrass).
This commit is contained in:
kabou 2022-03-29 12:54:51 +02:00 committed by cora
parent 6851fa759e
commit de16eb3c5a
21 changed files with 122 additions and 54 deletions

View file

@ -52,7 +52,10 @@ minetest.register_node("mcl_cake:cake", {
fixed = full_cake fixed = full_cake
}, },
stack_max = 1, stack_max = 1,
groups = {handy=1, cake=7, food=2,no_eat_delay=1, attached_node=1, dig_by_piston=1, comparator_signal=14}, groups = {
handy = 1, attached_node = 1, dig_by_piston = 1, comparator_signal = 14,
cake = 7, food = 2, no_eat_delay = 1, compostability = 100
},
drop = "", drop = "",
on_rightclick = function(pos, node, clicker, itemstack) on_rightclick = function(pos, node, clicker, itemstack)
-- Cake is subject to protection -- Cake is subject to protection
@ -125,7 +128,11 @@ local register_slice = function(level, nodebox, desc)
type = "fixed", type = "fixed",
fixed = nodebox, fixed = nodebox,
}, },
groups = {handy=1, cake=level, food=2,no_eat_delay=1,attached_node=1,not_in_creative_inventory=1,dig_by_piston=1,comparator_signal=level*2}, groups = {
handy = 1, attached_node = 1, not_in_creative_inventory = 1,
dig_by_piston = 1, cake = level, comparator_signal = level * 2,
food = 2, no_eat_delay = 1
},
drop = "", drop = "",
on_rightclick = on_rightclick, on_rightclick = on_rightclick,
sounds = mcl_sounds.node_sound_leaves_defaults(), sounds = mcl_sounds.node_sound_leaves_defaults(),

View file

@ -139,7 +139,7 @@ minetest.register_craftitem("mcl_core:apple", {
stack_max = 64, stack_max = 64,
on_place = minetest.item_eat(4), on_place = minetest.item_eat(4),
on_secondary_use = minetest.item_eat(4), on_secondary_use = minetest.item_eat(4),
groups = { food = 2, eatable = 4 }, groups = { food = 2, eatable = 4, compostability = 65 },
_mcl_saturation = 2.4, _mcl_saturation = 2.4,
}) })

View file

@ -368,7 +368,12 @@ minetest.register_node("mcl_core:dirt_with_grass", {
color = "#8EB971", color = "#8EB971",
is_ground_content = true, is_ground_content = true,
stack_max = 64, stack_max = 64,
groups = {handy=1,shovely=1,dirt=2,grass_block=1, grass_block_no_snow=1, soil=1, soil_sapling=2, soil_sugarcane=1, cultivatable=2, spreading_dirt_type=1, enderman_takable=1, building_block=1}, groups = {
handy = 1, shovely = 1, dirt = 2, grass_block = 1, grass_block_no_snow = 1,
soil = 1, soil_sapling = 2, soil_sugarcane = 1, cultivatable = 2,
spreading_dirt_type = 1, enderman_takable = 1, building_block = 1,
compostability = 30
},
drop = "mcl_core:dirt", drop = "mcl_core:dirt",
sounds = mcl_sounds.node_sound_dirt_defaults({ sounds = mcl_sounds.node_sound_dirt_defaults({
footstep = {name="default_grass_footstep", gain=0.1}, footstep = {name="default_grass_footstep", gain=0.1},

View file

@ -12,7 +12,10 @@ minetest.register_node("mcl_core:cactus", {
tiles = {"mcl_core_cactus_top.png", "mcl_core_cactus_bottom.png", "mcl_core_cactus_side.png"}, tiles = {"mcl_core_cactus_top.png", "mcl_core_cactus_bottom.png", "mcl_core_cactus_side.png"},
is_ground_content = true, is_ground_content = true,
stack_max = 64, stack_max = 64,
groups = {handy=1, attached_node=1, plant=1, deco_block=1, dig_by_piston=1, enderman_takable=1}, groups = {
handy = 1, attached_node = 1, deco_block = 1, dig_by_piston = 1,
plant = 1, enderman_takable = 1, compostability = 50
},
sounds = mcl_sounds.node_sound_wood_defaults(), sounds = mcl_sounds.node_sound_wood_defaults(),
paramtype = "light", paramtype = "light",
sunlight_propagates = true, sunlight_propagates = true,
@ -79,7 +82,10 @@ minetest.register_node("mcl_core:reeds", {
}, },
}, },
stack_max = 64, stack_max = 64,
groups = {dig_immediate=3, craftitem=1, deco_block=1, plant=1, non_mycelium_plant=1, dig_by_piston=1}, groups = {
dig_immediate = 3, craftitem = 1, deco_block = 1, dig_by_piston = 1,
plant = 1, non_mycelium_plant = 1, compostability = 50
},
sounds = mcl_sounds.node_sound_leaves_defaults(), sounds = mcl_sounds.node_sound_leaves_defaults(),
node_placement_prediction = "", node_placement_prediction = "",
drop = "mcl_core:reeds", -- to prevent color inheritation drop = "mcl_core:reeds", -- to prevent color inheritation

View file

@ -104,7 +104,11 @@ minetest.register_node("mcl_core:vine", {
type = "wallmounted", type = "wallmounted",
}, },
stack_max = 64, stack_max = 64,
groups = {handy=1,axey=1,shearsy=1,swordy=1, flammable=2,deco_block=1,destroy_by_lava_flow=1,dig_by_piston=1, fire_encouragement=15, fire_flammability=100}, groups = {
handy = 1, axey = 1, shearsy = 1, swordy = 1, deco_block = 1,
dig_by_piston = 1, destroy_by_lava_flow = 1, compostability = 50,
flammable = 2, fire_encouragement = 15, fire_flammability = 100
},
sounds = mcl_sounds.node_sound_leaves_defaults(), sounds = mcl_sounds.node_sound_leaves_defaults(),
drop = "", drop = "",
_mcl_shears_drop = true, _mcl_shears_drop = true,

View file

@ -152,17 +152,10 @@ local function register_leaves(subname, description, longdesc, tiles, sapling, d
paramtype = "light", paramtype = "light",
stack_max = 64, stack_max = 64,
groups = { groups = {
handy=1, handy = 1, hoey = 1, shearsy = 1, swordy = 1, dig_by_piston = 1,
hoey=1, leaves = 1, leafdecay = leafdecay_distance, deco_block = 1,
shearsy=1, flammable = 2, fire_encouragement = 30, fire_flammability = 60,
swordy=1, compostability = 30
leafdecay=leafdecay_distance,
flammable=2,
leaves=1,
deco_block=1,
dig_by_piston=1,
fire_encouragement=30,
fire_flammability=60
}, },
drop = get_drops(0), drop = get_drops(0),
_mcl_shears_drop = true, _mcl_shears_drop = true,
@ -194,7 +187,11 @@ local function register_sapling(subname, description, longdesc, tt_help, texture
fixed = selbox fixed = selbox
}, },
stack_max = 64, stack_max = 64,
groups = {dig_immediate=3, plant=1,sapling=1,non_mycelium_plant=1,attached_node=1,dig_by_water=1,dig_by_piston=1,destroy_by_lava_flow=1,deco_block=1}, groups = {
plant = 1, sapling = 1, non_mycelium_plant = 1, attached_node = 1,
deco_block = 1, dig_immediate = 3, dig_by_water = 1, dig_by_piston = 1,
destroy_by_lava_flow = 1, compostability = 30
},
sounds = mcl_sounds.node_sound_leaves_defaults(), sounds = mcl_sounds.node_sound_leaves_defaults(),
on_construct = function(pos) on_construct = function(pos)
local meta = minetest.get_meta(pos) local meta = minetest.get_meta(pos)
@ -275,4 +272,4 @@ register_leaves("birchleaves", S("Birch Leaves"), S("Birch leaves are grown from
-- Node aliases -- Node aliases
minetest.register_alias("default:acacia_tree", "mcl_core:acaciatree") minetest.register_alias("default:acacia_tree", "mcl_core:acaciatree")
minetest.register_alias("default:acacia_leaves", "mcl_core:acacialeaves") minetest.register_alias("default:acacia_leaves", "mcl_core:acacialeaves")

View file

@ -78,7 +78,7 @@ dyelocal.dyes = {
{"dark_green", "dye_dark_green", S("Cactus Green"),{dye=1, craftitem=1, basecolor_green=1, excolor_green=1, unicolor_dark_green=1}}, {"dark_green", "dye_dark_green", S("Cactus Green"),{dye=1, craftitem=1, basecolor_green=1, excolor_green=1, unicolor_dark_green=1}},
{"green", "mcl_dye_lime", S("Lime Dye"), {dye=1, craftitem=1, basecolor_green=1, excolor_green=1, unicolor_green=1}}, {"green", "mcl_dye_lime", S("Lime Dye"), {dye=1, craftitem=1, basecolor_green=1, excolor_green=1, unicolor_green=1}},
{"yellow", "dye_yellow", S("Dandelion Yellow"), {dye=1, craftitem=1, basecolor_yellow=1, excolor_yellow=1, unicolor_yellow=1}}, {"yellow", "dye_yellow", S("Dandelion Yellow"), {dye=1, craftitem=1, basecolor_yellow=1, excolor_yellow=1, unicolor_yellow=1}},
{"brown", "mcl_dye_brown", S("Cocoa Beans"), {dye=1, craftitem=1, basecolor_brown=1, excolor_orange=1, unicolor_dark_orange=1}}, {"brown", "mcl_dye_brown", S("Cocoa Beans"), {dye=1, craftitem=1, basecolor_brown=1, excolor_orange=1, unicolor_dark_orange=1, compostability = 65}},
{"orange", "dye_orange", S("Orange Dye"), {dye=1, craftitem=1, basecolor_orange=1, excolor_orange=1, unicolor_orange=1}}, {"orange", "dye_orange", S("Orange Dye"), {dye=1, craftitem=1, basecolor_orange=1, excolor_orange=1, unicolor_orange=1}},
{"red", "dye_red", S("Rose Red"), {dye=1, craftitem=1, basecolor_red=1, excolor_red=1, unicolor_red=1}}, {"red", "dye_red", S("Rose Red"), {dye=1, craftitem=1, basecolor_red=1, excolor_red=1, unicolor_red=1}},
{"magenta", "dye_magenta", S("Magenta Dye"), {dye=1, craftitem=1, basecolor_magenta=1, excolor_red_violet=1,unicolor_red_violet=1}}, {"magenta", "dye_magenta", S("Magenta Dye"), {dye=1, craftitem=1, basecolor_magenta=1, excolor_red_violet=1,unicolor_red_violet=1}},
@ -561,5 +561,3 @@ minetest.register_craft({
output = "mcl_dye:white 3", output = "mcl_dye:white 3",
recipe = {{"mcl_mobitems:bone"}}, recipe = {{"mcl_mobitems:bone"}},
}) })

View file

@ -5,7 +5,7 @@ minetest.register_craftitem("mcl_farming:beetroot_seeds", {
_tt_help = S("Grows on farmland"), _tt_help = S("Grows on farmland"),
_doc_items_longdesc = S("Grows into a beetroot plant. Chickens like beetroot seeds."), _doc_items_longdesc = S("Grows into a beetroot plant. Chickens like beetroot seeds."),
_doc_items_usagehelp = S("Place the beetroot seeds on farmland (which can be created with a hoe) to plant a beetroot plant. They grow in sunlight and grow faster on hydrated farmland. Rightclick an animal to feed it beetroot seeds."), _doc_items_usagehelp = S("Place the beetroot seeds on farmland (which can be created with a hoe) to plant a beetroot plant. They grow in sunlight and grow faster on hydrated farmland. Rightclick an animal to feed it beetroot seeds."),
groups = { craftitem=1 }, groups = {craftitem = 1, compostability = 30},
inventory_image = "mcl_farming_beetroot_seeds.png", inventory_image = "mcl_farming_beetroot_seeds.png",
wield_image = "mcl_farming_beetroot_seeds.png", wield_image = "mcl_farming_beetroot_seeds.png",
on_place = function(itemstack, placer, pointed_thing) on_place = function(itemstack, placer, pointed_thing)
@ -133,7 +133,7 @@ minetest.register_craftitem("mcl_farming:beetroot_item", {
wield_image = "mcl_farming_beetroot.png", wield_image = "mcl_farming_beetroot.png",
on_place = minetest.item_eat(1), on_place = minetest.item_eat(1),
on_secondary_use = minetest.item_eat(1), on_secondary_use = minetest.item_eat(1),
groups = { food = 2, eatable = 1 }, groups = {food = 2, eatable = 1, compostability = 65},
_mcl_saturation = 1.2, _mcl_saturation = 1.2,
}) })

View file

@ -86,7 +86,7 @@ minetest.register_craftitem("mcl_farming:carrot_item", {
_doc_items_longdesc = S("Carrots can be eaten and planted. Pigs and rabbits like carrots."), _doc_items_longdesc = S("Carrots can be eaten and planted. Pigs and rabbits like carrots."),
_doc_items_usagehelp = S("Hold it in your hand and rightclick to eat it. Place it on top of farmland to plant the carrot. It grows in sunlight and grows faster on hydrated farmland. Rightclick an animal to feed it."), _doc_items_usagehelp = S("Hold it in your hand and rightclick to eat it. Place it on top of farmland to plant the carrot. It grows in sunlight and grows faster on hydrated farmland. Rightclick an animal to feed it."),
inventory_image = "farming_carrot.png", inventory_image = "farming_carrot.png",
groups = { food = 2, eatable = 3 }, groups = {food = 2, eatable = 3, compostability = 65},
_mcl_saturation = 3.6, _mcl_saturation = 3.6,
on_secondary_use = minetest.item_eat(3), on_secondary_use = minetest.item_eat(3),
on_place = function(itemstack, placer, pointed_thing) on_place = function(itemstack, placer, pointed_thing)

View file

@ -7,7 +7,7 @@ minetest.register_craftitem("mcl_farming:melon_seeds", {
_doc_items_longdesc = S("Grows into a melon stem which in turn grows melons. Chickens like melon seeds."), _doc_items_longdesc = S("Grows into a melon stem which in turn grows melons. Chickens like melon seeds."),
_doc_items_usagehelp = S("Place the melon seeds on farmland (which can be created with a hoe) to plant a melon stem. Melon stems grow in sunlight and grow faster on hydrated farmland. When mature, the stem will attempt to grow a melon at the side. Rightclick an animal to feed it melon seeds."), _doc_items_usagehelp = S("Place the melon seeds on farmland (which can be created with a hoe) to plant a melon stem. Melon stems grow in sunlight and grow faster on hydrated farmland. When mature, the stem will attempt to grow a melon at the side. Rightclick an animal to feed it melon seeds."),
stack_max = 64, stack_max = 64,
groups = { craftitem=1 }, groups = {craftitem = 1, compostability = 30},
inventory_image = "mcl_farming_melon_seeds.png", inventory_image = "mcl_farming_melon_seeds.png",
on_place = function(itemstack, placer, pointed_thing) on_place = function(itemstack, placer, pointed_thing)
return mcl_farming:place_seed(itemstack, placer, pointed_thing, "mcl_farming:melontige_1") return mcl_farming:place_seed(itemstack, placer, pointed_thing, "mcl_farming:melontige_1")
@ -21,7 +21,10 @@ local melon_base_def = {
_doc_items_longdesc = S("A melon is a block which can be grown from melon stems, which in turn are grown from melon seeds. It can be harvested for melon slices."), _doc_items_longdesc = S("A melon is a block which can be grown from melon stems, which in turn are grown from melon seeds. It can be harvested for melon slices."),
stack_max = 64, stack_max = 64,
tiles = {"farming_melon_top.png", "farming_melon_top.png", "farming_melon_side.png", "farming_melon_side.png", "farming_melon_side.png", "farming_melon_side.png"}, tiles = {"farming_melon_top.png", "farming_melon_top.png", "farming_melon_side.png", "farming_melon_side.png", "farming_melon_side.png", "farming_melon_side.png"},
groups = {handy=1,axey=1, plant=1,building_block=1,enderman_takable=1,dig_by_piston=1}, groups = {
handy = 1, axey = 1, plant = 1, building_block = 1, dig_by_piston = 1,
enderman_takable = 1, compostability = 65
},
drop = { drop = {
max_items = 1, max_items = 1,
items = { items = {
@ -134,7 +137,7 @@ minetest.register_craftitem("mcl_farming:melon_item", {
inventory_image = "farming_melon.png", inventory_image = "farming_melon.png",
on_place = minetest.item_eat(2), on_place = minetest.item_eat(2),
on_secondary_use = minetest.item_eat(2), on_secondary_use = minetest.item_eat(2),
groups = { food = 2, eatable = 2 }, groups = {food = 2, eatable = 2, compostability = 50},
_mcl_saturation = 1.2, _mcl_saturation = 1.2,
}) })

View file

@ -91,7 +91,7 @@ minetest.register_craftitem("mcl_farming:potato_item", {
_doc_items_longdesc = S("Potatoes are food items which can be eaten, cooked in the furnace and planted. Pigs like potatoes."), _doc_items_longdesc = S("Potatoes are food items which can be eaten, cooked in the furnace and planted. Pigs like potatoes."),
_doc_items_usagehelp = S("Hold it in your hand and rightclick to eat it. Place it on top of farmland to plant it. It grows in sunlight and grows faster on hydrated farmland. Rightclick an animal to feed it."), _doc_items_usagehelp = S("Hold it in your hand and rightclick to eat it. Place it on top of farmland to plant it. It grows in sunlight and grows faster on hydrated farmland. Rightclick an animal to feed it."),
inventory_image = "farming_potato.png", inventory_image = "farming_potato.png",
groups = { food = 2, eatable = 1 }, groups = {food = 2, eatable = 1, compostability = 65},
_mcl_saturation = 0.6, _mcl_saturation = 0.6,
stack_max = 64, stack_max = 64,
on_secondary_use = minetest.item_eat(1), on_secondary_use = minetest.item_eat(1),
@ -112,7 +112,7 @@ minetest.register_craftitem("mcl_farming:potato_item_baked", {
inventory_image = "farming_potato_baked.png", inventory_image = "farming_potato_baked.png",
on_place = minetest.item_eat(5), on_place = minetest.item_eat(5),
on_secondary_use = minetest.item_eat(5), on_secondary_use = minetest.item_eat(5),
groups = { food = 2, eatable = 5 }, groups = {food = 2, eatable = 5, compostability = 85},
_mcl_saturation = 6.0, _mcl_saturation = 6.0,
}) })

View file

@ -15,7 +15,7 @@ minetest.register_craftitem("mcl_farming:pumpkin_seeds", {
_doc_items_usagehelp = S("Place the pumpkin seeds on farmland (which can be created with a hoe) to plant a pumpkin stem. Pumpkin stems grow in sunlight and grow faster on hydrated farmland. When mature, the stem attempts to grow a pumpkin next to it. Rightclick an animal to feed it pumpkin seeds."), _doc_items_usagehelp = S("Place the pumpkin seeds on farmland (which can be created with a hoe) to plant a pumpkin stem. Pumpkin stems grow in sunlight and grow faster on hydrated farmland. When mature, the stem attempts to grow a pumpkin next to it. Rightclick an animal to feed it pumpkin seeds."),
stack_max = 64, stack_max = 64,
inventory_image = "mcl_farming_pumpkin_seeds.png", inventory_image = "mcl_farming_pumpkin_seeds.png",
groups = { craftitem=1 }, groups = {craftitem=1, compostability = 30},
on_place = function(itemstack, placer, pointed_thing) on_place = function(itemstack, placer, pointed_thing)
return mcl_farming:place_seed(itemstack, placer, pointed_thing, "mcl_farming:pumpkin_1") return mcl_farming:place_seed(itemstack, placer, pointed_thing, "mcl_farming:pumpkin_1")
end end
@ -99,7 +99,10 @@ local pumpkin_base_def = {
stack_max = 64, stack_max = 64,
paramtype2 = "facedir", paramtype2 = "facedir",
tiles = {"farming_pumpkin_top.png", "farming_pumpkin_top.png", "farming_pumpkin_side.png"}, tiles = {"farming_pumpkin_top.png", "farming_pumpkin_top.png", "farming_pumpkin_side.png"},
groups = {handy=1,axey=1, plant=1,building_block=1, dig_by_piston=1, enderman_takable=1}, groups = {
handy = 1, axey = 1, plant = 1, building_block = 1, dig_by_piston = 1,
enderman_takable = 1, compostability = 65
},
sounds = mcl_sounds.node_sound_wood_defaults(), sounds = mcl_sounds.node_sound_wood_defaults(),
on_rotate = on_rotate, on_rotate = on_rotate,
_mcl_blast_resistance = 1, _mcl_blast_resistance = 1,
@ -230,7 +233,7 @@ minetest.register_craftitem("mcl_farming:pumpkin_pie", {
wield_image = "mcl_farming_pumpkin_pie.png", wield_image = "mcl_farming_pumpkin_pie.png",
on_place = minetest.item_eat(8), on_place = minetest.item_eat(8),
on_secondary_use = minetest.item_eat(8), on_secondary_use = minetest.item_eat(8),
groups = { food = 2, eatable = 8 }, groups = {food = 2, eatable = 8, compostability = 100},
_mcl_saturation = 4.8, _mcl_saturation = 4.8,
}) })

View file

@ -9,7 +9,7 @@ minetest.register_craftitem("mcl_farming:wheat_seeds", {
Place the wheat seeds on farmland (which can be created with a hoe) to plant a wheat plant. Place the wheat seeds on farmland (which can be created with a hoe) to plant a wheat plant.
They grow in sunlight and grow faster on hydrated farmland. Rightclick an animal to feed it wheat seeds. They grow in sunlight and grow faster on hydrated farmland. Rightclick an animal to feed it wheat seeds.
]]), ]]),
groups = { craftitem=1 }, groups = {craftitem = 1, compostability = 30},
inventory_image = "mcl_farming_wheat_seeds.png", inventory_image = "mcl_farming_wheat_seeds.png",
on_place = function(itemstack, placer, pointed_thing) on_place = function(itemstack, placer, pointed_thing)
return mcl_farming:place_seed(itemstack, placer, pointed_thing, "mcl_farming:wheat_1") return mcl_farming:place_seed(itemstack, placer, pointed_thing, "mcl_farming:wheat_1")
@ -104,7 +104,7 @@ minetest.register_craftitem("mcl_farming:wheat_item", {
_doc_items_longdesc = S("Wheat is used in crafting. Some animals like wheat."), _doc_items_longdesc = S("Wheat is used in crafting. Some animals like wheat."),
_doc_items_usagehelp = S("Use the “Place” key on an animal to try to feed it wheat."), _doc_items_usagehelp = S("Use the “Place” key on an animal to try to feed it wheat."),
inventory_image = "farming_wheat_harvested.png", inventory_image = "farming_wheat_harvested.png",
groups = { craftitem = 1 }, groups = {craftitem = 1, compostability = 65},
}) })
minetest.register_craft({ minetest.register_craft({
@ -125,7 +125,7 @@ minetest.register_craftitem("mcl_farming:cookie", {
description = S("Cookie"), description = S("Cookie"),
_doc_items_longdesc = S("This is a food item which can be eaten."), _doc_items_longdesc = S("This is a food item which can be eaten."),
inventory_image = "farming_cookie.png", inventory_image = "farming_cookie.png",
groups = {food=2, eatable=2}, groups = {food = 2, eatable = 2, compostability = 85},
_mcl_saturation = 0.4, _mcl_saturation = 0.4,
on_place = minetest.item_eat(2), on_place = minetest.item_eat(2),
on_secondary_use = minetest.item_eat(2), on_secondary_use = minetest.item_eat(2),
@ -136,7 +136,7 @@ minetest.register_craftitem("mcl_farming:bread", {
description = S("Bread"), description = S("Bread"),
_doc_items_longdesc = S("This is a food item which can be eaten."), _doc_items_longdesc = S("This is a food item which can be eaten."),
inventory_image = "farming_bread.png", inventory_image = "farming_bread.png",
groups = {food=2, eatable=5}, groups = {food = 2, eatable = 5, compostability = 85},
_mcl_saturation = 6.0, _mcl_saturation = 6.0,
on_place = minetest.item_eat(5), on_place = minetest.item_eat(5),
on_secondary_use = minetest.item_eat(5), on_secondary_use = minetest.item_eat(5),
@ -156,8 +156,11 @@ minetest.register_node("mcl_farming:hay_block", {
stack_max = 64, stack_max = 64,
paramtype2 = "facedir", paramtype2 = "facedir",
on_place = mcl_util.rotate_axis, on_place = mcl_util.rotate_axis,
groups = {handy=1, hoey=1, flammable=2, fire_encouragement=60, groups = {
fire_flammability=20, building_block=1, fall_damage_add_percent=-80}, handy = 1, hoey = 1, building_block = 1, fall_damage_add_percent = -80,
flammable = 2, fire_encouragement = 60, fire_flammability = 20,
compostability = 85
},
sounds = mcl_sounds.node_sound_leaves_defaults(), sounds = mcl_sounds.node_sound_leaves_defaults(),
on_rotate = on_rotate, on_rotate = on_rotate,
_mcl_blast_resistance = 0.5, _mcl_blast_resistance = 0.5,

View file

@ -80,7 +80,13 @@ function mcl_flowers.register_simple_flower(name, def)
walkable = false, walkable = false,
stack_max = 64, stack_max = 64,
drop = def.drop, drop = def.drop,
groups = {dig_immediate=3,flammable=2,fire_encouragement=60,fire_flammability=100,plant=1,flower=1,place_flowerlike=1,non_mycelium_plant=1,attached_node=1,dig_by_water=1,destroy_by_lava_flow=1,dig_by_piston=1,enderman_takable=1,deco_block=1}, groups = {
attached_node = 1, deco_block = 1, dig_by_piston = 1, dig_immediate = 3,
dig_by_water = 1, destroy_by_lava_flow = 1, enderman_takable = 1,
plant = 1, flower = 1, place_flowerlike = 1, non_mycelium_plant = 1,
flammable = 2, fire_encouragement = 60, fire_flammability = 100,
compostability = 65
},
sounds = mcl_sounds.node_sound_leaves_defaults(), sounds = mcl_sounds.node_sound_leaves_defaults(),
node_placement_prediction = "", node_placement_prediction = "",
on_place = on_place_flower, on_place = on_place_flower,
@ -143,7 +149,12 @@ local def_tallgrass = {
walkable = false, walkable = false,
buildable_to = true, buildable_to = true,
is_ground_content = true, is_ground_content = true,
groups = {handy=1,shearsy=1, flammable=3,fire_encouragement=60,fire_flammability=100,attached_node=1,plant=1,place_flowerlike=2,non_mycelium_plant=1,dig_by_water=1,destroy_by_lava_flow=1,deco_block=1}, groups = {
handy = 1, shearsy = 1, attached_node = 1, deco_block = 1,
plant = 1, place_flowerlike = 2, non_mycelium_plant = 1,
flammable = 3, fire_encouragement = 60, fire_flammability = 100,
dig_by_water = 1, destroy_by_lava_flow = 1, compostability = 30
},
sounds = mcl_sounds.node_sound_leaves_defaults(), sounds = mcl_sounds.node_sound_leaves_defaults(),
drop = wheat_seed_drop, drop = wheat_seed_drop,
_mcl_shears_drop = true, _mcl_shears_drop = true,
@ -167,6 +178,7 @@ def_fern.selection_box = {
type = "fixed", type = "fixed",
fixed = { -6/16, -0.5, -6/16, 6/16, 5/16, 6/16 }, fixed = { -6/16, -0.5, -6/16, 6/16, 5/16, 6/16 },
} }
def_fern.groups.compostability = 65
minetest.register_node("mcl_flowers:fern", def_fern) minetest.register_node("mcl_flowers:fern", def_fern)
@ -187,7 +199,15 @@ local function add_large_plant(name, desc, longdesc, bottom_img, top_img, inv_im
is_flower = true is_flower = true
end end
local bottom_groups = {flammable=2, fire_encouragement=60, fire_flammability=100, non_mycelium_plant=1, attached_node=1, dig_by_water=1, destroy_by_lava_flow=1, dig_by_piston=1, plant=1, double_plant=1, deco_block=1} local bottom_groups = {
attached_node = 1, deco_block = 1,
dig_by_water = 1, destroy_by_lava_flow = 1, dig_by_piston = 1,
flammable = 2, fire_encouragement = 60, fire_flammability = 100,
plant = 1, double_plant = 1, non_mycelium_plant = 1, compostability = 65
}
if name == "double_grass" then
bottom_groups.compostability = 50
end
if is_flower then if is_flower then
bottom_groups.flower = 1 bottom_groups.flower = 1
bottom_groups.place_flowerlike = 1 bottom_groups.place_flowerlike = 1
@ -410,7 +430,10 @@ minetest.register_node("mcl_flowers:waterlily", {
liquids_pointable = true, liquids_pointable = true,
walkable = true, walkable = true,
sunlight_propagates = true, sunlight_propagates = true,
groups = {dig_immediate = 3, plant=1, dig_by_water = 1,destroy_by_lava_flow=1, dig_by_piston = 1, deco_block=1, dig_by_boat=1}, groups = {
deco_block = 1, plant = 1, compostability = 65, destroy_by_lava_flow = 1,
dig_immediate = 3, dig_by_water = 1, dig_by_piston = 1, dig_by_boat = 1,
},
sounds = mcl_sounds.node_sound_leaves_defaults(), sounds = mcl_sounds.node_sound_leaves_defaults(),
node_placement_prediction = "", node_placement_prediction = "",
node_box = { node_box = {

View file

@ -3,7 +3,10 @@ local S = minetest.get_translator(minetest.get_current_modname())
local vector = vector local vector = vector
local template = { local template = {
groups = {handy=1,axey=1, building_block = 1, material_wood = 1, flammable = -1 }, groups = {
handy = 1, axey = 1, building_block = 1, material_wood = 1,
flammable = -1, compostability = 85
},
sounds = mcl_sounds.node_sound_wood_defaults(), sounds = mcl_sounds.node_sound_wood_defaults(),
is_ground_content = true, is_ground_content = true,
_mcl_blast_resistance = 0.2, _mcl_blast_resistance = 0.2,
@ -51,6 +54,7 @@ local function register_mushroom(color, species_id, template, d_cap, d_stem, d_s
stem_full.tiles = { "mcl_mushrooms_mushroom_block_skin_stem.png" } stem_full.tiles = { "mcl_mushrooms_mushroom_block_skin_stem.png" }
stem_full.groups.huge_mushroom = species_id stem_full.groups.huge_mushroom = species_id
stem_full.groups.huge_mushroom_stem = 2 stem_full.groups.huge_mushroom_stem = 2
stem_full.groups.compostability = 65
minetest.register_node("mcl_mushrooms:"..color.."_mushroom_block_stem_full", stem_full) minetest.register_node("mcl_mushrooms:"..color.."_mushroom_block_stem_full", stem_full)
-- Stem -- Stem
@ -60,6 +64,7 @@ local function register_mushroom(color, species_id, template, d_cap, d_stem, d_s
stem.tiles = { "mcl_mushrooms_mushroom_block_inside.png", "mcl_mushrooms_mushroom_block_inside.png", "mcl_mushrooms_mushroom_block_skin_stem.png" } stem.tiles = { "mcl_mushrooms_mushroom_block_inside.png", "mcl_mushrooms_mushroom_block_inside.png", "mcl_mushrooms_mushroom_block_skin_stem.png" }
stem.groups.huge_mushroom = species_id stem.groups.huge_mushroom = species_id
stem.groups.huge_mushroom_stem = 1 stem.groups.huge_mushroom_stem = 1
stem.groups.compostability = 65
minetest.register_node("mcl_mushrooms:"..color.."_mushroom_block_stem", stem) minetest.register_node("mcl_mushrooms:"..color.."_mushroom_block_stem", stem)
-- Mushroom block (cap) -- Mushroom block (cap)

View file

@ -38,7 +38,11 @@ minetest.register_node("mcl_mushrooms:mushroom_brown", {
sunlight_propagates = true, sunlight_propagates = true,
paramtype = "light", paramtype = "light",
walkable = false, walkable = false,
groups = {dig_immediate=3,mushroom=1,attached_node=1,dig_by_water=1,destroy_by_lava_flow=1,dig_by_piston=1,enderman_takable=1,deco_block=1}, groups = {
attached_node = 1, deco_block = 1, destroy_by_lava_flow = 1,
dig_immediate = 3, dig_by_water = 1, dig_by_piston = 1,
mushroom = 1, enderman_takable = 1, compostability = 65
},
sounds = mcl_sounds.node_sound_leaves_defaults(), sounds = mcl_sounds.node_sound_leaves_defaults(),
light_source = 1, light_source = 1,
selection_box = { selection_box = {
@ -62,7 +66,11 @@ minetest.register_node("mcl_mushrooms:mushroom_red", {
sunlight_propagates = true, sunlight_propagates = true,
paramtype = "light", paramtype = "light",
walkable = false, walkable = false,
groups = {dig_immediate=3,mushroom=1,attached_node=1,dig_by_water=1,destroy_by_lava_flow=1,dig_by_piston=1,enderman_takable=1,deco_block=1}, groups = {
attached_node = 1, deco_block = 1, destroy_by_lava_flow = 1,
dig_immediate = 3, dig_by_water = 1, dig_by_piston = 1,
mushroom = 1, enderman_takable = 1, compostability = 65
},
sounds = mcl_sounds.node_sound_leaves_defaults(), sounds = mcl_sounds.node_sound_leaves_defaults(),
selection_box = { selection_box = {
type = "fixed", type = "fixed",

View file

@ -174,7 +174,7 @@ minetest.register_node("mcl_nether:nether_wart_block", {
stack_max = 64, stack_max = 64,
tiles = {"mcl_nether_nether_wart_block.png"}, tiles = {"mcl_nether_nether_wart_block.png"},
is_ground_content = false, is_ground_content = false,
groups = {handy=1, hoey=1, building_block=1}, groups = {handy=1, hoey=1, building_block=1, compostability = 85},
sounds = mcl_sounds.node_sound_leaves_defaults( sounds = mcl_sounds.node_sound_leaves_defaults(
{ {
footstep={name="default_dirt_footstep", gain=0.7}, footstep={name="default_dirt_footstep", gain=0.7},

View file

@ -110,6 +110,7 @@ minetest.register_craftitem("mcl_nether:nether_wart_item", {
_doc_items_usagehelp = S("Place this item on soul sand to plant it and watch it grow."), _doc_items_usagehelp = S("Place this item on soul sand to plant it and watch it grow."),
inventory_image = "mcl_nether_nether_wart.png", inventory_image = "mcl_nether_nether_wart.png",
wield_image = "mcl_nether_nether_wart.png", wield_image = "mcl_nether_nether_wart.png",
groups = {craftitem = 1, brewitem = 1, compostability = 30},
on_place = function(itemstack, placer, pointed_thing) on_place = function(itemstack, placer, pointed_thing)
if pointed_thing.type ~= "node" then if pointed_thing.type ~= "node" then
return itemstack return itemstack
@ -143,7 +144,6 @@ minetest.register_craftitem("mcl_nether:nether_wart_item", {
end end
end end
end, end,
groups = { craftitem = 1, brewitem=1 },
}) })
local names = {"mcl_nether:nether_wart_0", "mcl_nether:nether_wart_1", "mcl_nether:nether_wart_2"} local names = {"mcl_nether:nether_wart_0", "mcl_nether:nether_wart_1", "mcl_nether:nether_wart_2"}

View file

@ -741,7 +741,7 @@ minetest.register_craftitem("mcl_ocean:kelp", {
inventory_image = "mcl_ocean_kelp_item.png", inventory_image = "mcl_ocean_kelp_item.png",
wield_image = "mcl_ocean_kelp_item.png", wield_image = "mcl_ocean_kelp_item.png",
on_place = kelp.kelp_on_place, on_place = kelp.kelp_on_place,
groups = { deco_block = 1 }, groups = {deco_block = 1, compostability = 30},
}) })
if mod_doc then if mod_doc then
@ -756,7 +756,7 @@ minetest.register_craftitem("mcl_ocean:dried_kelp", {
_doc_items_longdesc = S("Dried kelp is a food item."), _doc_items_longdesc = S("Dried kelp is a food item."),
inventory_image = "mcl_ocean_dried_kelp.png", inventory_image = "mcl_ocean_dried_kelp.png",
wield_image = "mcl_ocean_dried_kelp.png", wield_image = "mcl_ocean_dried_kelp.png",
groups = { food = 2, eatable = 1 }, groups = {food = 2, eatable = 1, compostability = 30},
on_place = minetest.item_eat(1), on_place = minetest.item_eat(1),
on_secondary_use = minetest.item_eat(1), on_secondary_use = minetest.item_eat(1),
_mcl_saturation = 0.6, _mcl_saturation = 0.6,
@ -773,7 +773,10 @@ minetest.register_node("mcl_ocean:dried_kelp_block", {
description = S("Dried Kelp Block"), description = S("Dried Kelp Block"),
_doc_items_longdesc = S("A decorative block that serves as a great furnace fuel."), _doc_items_longdesc = S("A decorative block that serves as a great furnace fuel."),
tiles = { "mcl_ocean_dried_kelp_top.png", "mcl_ocean_dried_kelp_bottom.png", "mcl_ocean_dried_kelp_side.png" }, tiles = { "mcl_ocean_dried_kelp_top.png", "mcl_ocean_dried_kelp_bottom.png", "mcl_ocean_dried_kelp_side.png" },
groups = { handy = 1, hoey = 1, building_block = 1, flammable = 2, fire_encouragement = 30, fire_flammability = 60 }, groups = {
handy = 1, hoey = 1, building_block = 1, compostability = 50,
flammable = 2, fire_encouragement = 30, fire_flammability = 60
},
sounds = mcl_sounds.node_sound_leaves_defaults(), sounds = mcl_sounds.node_sound_leaves_defaults(),
paramtype2 = "facedir", paramtype2 = "facedir",
on_place = mcl_util.rotate_axis, on_place = mcl_util.rotate_axis,

View file

@ -106,7 +106,10 @@ for s=1,4 do
}, },
inventory_image = img, inventory_image = img,
wield_image = img, wield_image = img,
groups = { dig_immediate = 3, deco_block = 1, sea_pickle=1, not_in_creative_inventory=nici }, groups = {
dig_immediate = 3, deco_block = 1, sea_pickle = 1,
not_in_creative_inventory=nici, compostability = 65
},
-- Light level: 6 at size 1, +3 for each additional stage -- Light level: 6 at size 1, +3 for each additional stage
light_source = math.min(6 + (s-1)*3, minetest.LIGHT_MAX), light_source = math.min(6 + (s-1)*3, minetest.LIGHT_MAX),
selection_box = { selection_box = {

View file

@ -85,7 +85,7 @@ minetest.register_craftitem("mcl_ocean:seagrass", {
inventory_image = "mcl_ocean_seagrass.png^[verticalframe:12:0", inventory_image = "mcl_ocean_seagrass.png^[verticalframe:12:0",
wield_image = "mcl_ocean_seagrass.png^[verticalframe:12:0", wield_image = "mcl_ocean_seagrass.png^[verticalframe:12:0",
on_place = seagrass_on_place, on_place = seagrass_on_place,
groups = { deco_block = 1 }, groups = {deco_block = 1, compostability = 30},
}) })
-- Seagrass nodes: seagrass on a surface node -- Seagrass nodes: seagrass on a surface node