1
0
Fork 0

Add plant group to plants, required for farmland

This commit is contained in:
Wuzzy 2017-05-14 21:37:21 +02:00
parent 2270121d03
commit c201ee7533
11 changed files with 38 additions and 35 deletions

View File

@ -128,6 +128,9 @@ These groups are used mostly for informational purposes
* `container=1`: Other/unspecified container type
* `spawn_egg=1`: Spawn egg
* `plant=1`: Plant or part of a plant
* `double_plant`: Part of a double-sized plant. 1 = lower part, 2 = upper part
* `weapon=1`: Item is primarily (!) a weapon
* `tool=1`: Item is primarily (!) a tool
* `craftitem=1`: Item is primarily (!) used for crafting

View File

@ -706,7 +706,7 @@ minetest.register_node("mcl_core:sapling", {
fixed = {-0.3, -0.5, -0.3, 0.3, 0.35, 0.3}
},
stack_max = 64,
groups = {dig_immediate=3, sapling=1,non_mycelium_plant=1,non_mycelium_plant=1,attached_node=1,dig_by_water=1,deco_block=1},
groups = {dig_immediate=3, plant=1,sapling=1,non_mycelium_plant=1,attached_node=1,dig_by_water=1,deco_block=1},
sounds = mcl_sounds.node_sound_leaves_defaults(),
on_construct = function(pos)
local meta = minetest.get_meta(pos)
@ -792,7 +792,7 @@ minetest.register_node("mcl_core:darksapling", {
fixed = {-0.3, -0.5, -0.3, 0.3, 0.35, 0.3}
},
stack_max = 64,
groups = {dig_immediate=3, sapling=1,non_mycelium_plant=1,non_mycelium_plant=1,attached_node=1,dig_by_water=1,deco_block=1},
groups = {dig_immediate=3, plant=1,sapling=1,non_mycelium_plant=1,attached_node=1,dig_by_water=1,deco_block=1},
sounds = mcl_sounds.node_sound_leaves_defaults(),
on_construct = function(pos)
local meta = minetest.get_meta(pos)
@ -936,7 +936,7 @@ minetest.register_node("mcl_core:junglesapling", {
fixed = {-0.3, -0.5, -0.3, 0.3, 0.35, 0.3}
},
stack_max = 64,
groups = {dig_immediate=3, sapling=1,non_mycelium_plant=1,non_mycelium_plant=1,attached_node=1,dig_by_water=1,deco_block=1},
groups = {dig_immediate=3, plant=1,sapling=1,non_mycelium_plant=1,attached_node=1,dig_by_water=1,deco_block=1},
sounds = mcl_sounds.node_sound_leaves_defaults(),
on_construct = function(pos)
local meta = minetest.get_meta(pos)
@ -1022,7 +1022,7 @@ minetest.register_node("mcl_core:acaciasapling", {
node_placement_prediction = "",
on_place = mcl_util.on_place_non_mycelium_plant,
stack_max = 64,
groups = {dig_immediate=3, sapling=1,non_mycelium_plant=1,non_mycelium_plant=1,attached_node=1,dig_by_water=1,deco_block=1},
groups = {dig_immediate=3, plant=1,sapling=1,non_mycelium_plant=1,attached_node=1,dig_by_water=1,deco_block=1},
sounds = mcl_sounds.node_sound_leaves_defaults(),
_mcl_blast_resistance = 0,
_mcl_hardness = 0,
@ -1101,7 +1101,7 @@ minetest.register_node("mcl_core:sprucesapling", {
fixed = {-0.3, -0.5, -0.3, 0.3, 0.35, 0.3}
},
stack_max = 64,
groups = {dig_immediate=3, sapling=1,non_mycelium_plant=1,non_mycelium_plant=1,attached_node=1,dig_by_water=1,deco_block=1},
groups = {dig_immediate=3, plant=1,sapling=1,non_mycelium_plant=1,attached_node=1,dig_by_water=1,deco_block=1},
sounds = mcl_sounds.node_sound_leaves_defaults(),
on_construct = function(pos)
local meta = minetest.get_meta(pos)
@ -1181,7 +1181,7 @@ minetest.register_node("mcl_core:birchsapling", {
fixed = {-0.3, -0.5, -0.3, 0.3, 0.35, 0.3}
},
stack_max = 64,
groups = {dig_immediate=3, sapling=1,non_mycelium_plant=1,non_mycelium_plant=1,attached_node=1,dig_by_water=1,deco_block=1},
groups = {dig_immediate=3, plant=1,sapling=1,non_mycelium_plant=1,attached_node=1,dig_by_water=1,deco_block=1},
sounds = mcl_sounds.node_sound_leaves_defaults(),
on_construct = function(pos)
local meta = minetest.get_meta(pos)
@ -1201,7 +1201,7 @@ minetest.register_node("mcl_core:cactus", {
tiles = {"default_cactus_top.png", "default_cactus_bottom.png", "default_cactus_side.png","default_cactus_side.png","default_cactus_side.png","default_cactus_side.png"},
is_ground_content = true,
stack_max = 64,
groups = {handy=1, attached_node=1, deco_block=1, dig_by_piston=1},
groups = {handy=1, attached_node=1, plant=1, deco_block=1, dig_by_piston=1},
sounds = mcl_sounds.node_sound_wood_defaults(),
paramtype = "light",
node_placement_prediction = "",
@ -1290,7 +1290,7 @@ minetest.register_node("mcl_core:reeds", {
},
},
stack_max = 64,
groups = {dig_immediate=3, craftitem=1, non_mycelium_plant=1, dig_by_piston=1},
groups = {dig_immediate=3, craftitem=1, plant=1, non_mycelium_plant=1, dig_by_piston=1},
sounds = mcl_sounds.node_sound_leaves_defaults(),
node_placement_prediction = "",
on_place = mcl_util.on_place_non_mycelium_plant,
@ -1808,7 +1808,7 @@ minetest.register_node("mcl_core:deadbush", {
walkable = false,
stack_max = 64,
buildable_to = true,
groups = {dig_immediate=3, flammable=3,attached_node=1,non_mycelium_plant=1,dig_by_water=1,deco_block=1},
groups = {dig_immediate=3, flammable=3,attached_node=1,plant=1,non_mycelium_plant=1,dig_by_water=1,deco_block=1},
drop = {
max_items = 1,
items = {

View File

@ -30,7 +30,7 @@ minetest.register_node("mcl_farming:beetroot_0", {
{-0.5, -0.5, -0.5, 0.5, -5/16, 0.5}
},
},
groups = {dig_immediate=3, not_in_creative_inventory=1,attached_node=1,dig_by_water=1,dig_by_piston=1},
groups = {dig_immediate=3, not_in_creative_inventory=1,plant=1,attached_node=1,dig_by_water=1,dig_by_piston=1},
sounds = mcl_sounds.node_sound_leaves_defaults(),
_mcl_blast_resistance = 0,
})
@ -54,7 +54,7 @@ minetest.register_node("mcl_farming:beetroot_1", {
{-0.5, -0.5, -0.5, 0.5, -3/16, 0.5}
},
},
groups = {dig_immediate=3, not_in_creative_inventory=1,attached_node=1,dig_by_water=1,dig_by_piston=1},
groups = {dig_immediate=3, not_in_creative_inventory=1,plant=1,attached_node=1,dig_by_water=1,dig_by_piston=1},
sounds = mcl_sounds.node_sound_leaves_defaults(),
_mcl_blast_resistance = 0,
})
@ -78,7 +78,7 @@ minetest.register_node("mcl_farming:beetroot_2", {
{-0.5, -0.5, -0.5, 0.5, 2/16, 0.5}
},
},
groups = {dig_immediate=3, not_in_creative_inventory=1,attached_node=1,dig_by_water=1,dig_by_piston=1},
groups = {dig_immediate=3, not_in_creative_inventory=1,plant=1,attached_node=1,dig_by_water=1,dig_by_piston=1},
sounds = mcl_sounds.node_sound_leaves_defaults(),
_mcl_blast_resistance = 0,
})
@ -111,7 +111,7 @@ minetest.register_node("mcl_farming:beetroot", {
{-0.5, -0.5, -0.5, 0.5, 3/16, 0.5}
},
},
groups = {dig_immediate=3, not_in_creative_inventory=1,attached_node=1,dig_by_water=1,dig_by_piston=1,beetroot=4},
groups = {dig_immediate=3, not_in_creative_inventory=1,plant=1,attached_node=1,dig_by_water=1,dig_by_piston=1,beetroot=4},
sounds = mcl_sounds.node_sound_leaves_defaults(),
_mcl_blast_resistance = 0,
})

View File

@ -40,7 +40,7 @@ for i=1, 7 do
{-0.5, -0.5, -0.5, 0.5, sel_height, 0.5}
},
},
groups = {dig_immediate=3, not_in_creative_inventory=1,attached_node=1,dig_by_water=1,dig_by_piston=1},
groups = {dig_immediate=3, not_in_creative_inventory=1,plant=1,attached_node=1,dig_by_water=1,dig_by_piston=1},
sounds = mcl_sounds.node_sound_leaves_defaults(),
_mcl_blast_resistance = 0,
})
@ -73,7 +73,7 @@ minetest.register_node("mcl_farming:carrot", {
{-0.5, -0.5, -0.5, 0.5, 4/16, 0.5}
},
},
groups = {dig_immediate=3, not_in_creative_inventory=1,attached_node=1,dig_by_water=1,dig_by_piston=1},
groups = {dig_immediate=3, not_in_creative_inventory=1,plant=1,attached_node=1,dig_by_water=1,dig_by_piston=1},
sounds = mcl_sounds.node_sound_leaves_defaults(),
_mcl_blast_resistance = 0,
})

View File

@ -18,7 +18,7 @@ local melon_base_def = {
_doc_items_longdesc = "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,
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, building_block=1,dig_by_piston=1},
groups = {handy=1,axey=1, plant=1,building_block=1,dig_by_piston=1},
drop = {
max_items = 1,
items = {
@ -84,7 +84,7 @@ for s=1,7 do
{-0.15, -0.5, -0.15, 0.15, -0.5+h, 0.15}
},
},
groups = {dig_immediate=3, not_in_creative_inventory=1, attached_node=1, dig_by_water=1, plant_melon_stem=s},
groups = {dig_immediate=3, not_in_creative_inventory=1, plant=1,attached_node=1, dig_by_water=1, plant_melon_stem=s},
sounds = mcl_sounds.node_sound_leaves_defaults(),
_mcl_blast_resistance = 0,
})

View File

@ -42,7 +42,7 @@ for i=1, 7 do
type = "fixed",
fixed = { selbox },
},
groups = {dig_immediate=3, not_in_creative_inventory=1,attached_node=1,dig_by_water=1,dig_by_piston=1},
groups = {dig_immediate=3, not_in_creative_inventory=1,plant=1,attached_node=1,dig_by_water=1,dig_by_piston=1},
sounds = mcl_sounds.node_sound_leaves_defaults(),
_mcl_blast_resistance = 0,
})
@ -74,7 +74,7 @@ minetest.register_node("mcl_farming:potato", {
{ -0.5, -0.5, -0.5, 0.5, 1/16, 0.5 }
}
},
groups = {dig_immediate=3, not_in_creative_inventory=1,attached_node=1,dig_by_water=1,dig_by_piston=1},
groups = {dig_immediate=3, not_in_creative_inventory=1,plant=1,attached_node=1,dig_by_water=1,dig_by_piston=1},
sounds = mcl_sounds.node_sound_leaves_defaults(),
_mcl_blast_resistance = 0,
})

View File

@ -59,7 +59,7 @@ for s=1,7 do
{-0.15, -0.5, -0.15, 0.15, -0.5+h, 0.15}
},
},
groups = {dig_immediate=3, not_in_creative_inventory=1, attached_node=1, dig_by_water=1},
groups = {dig_immediate=3, not_in_creative_inventory=1, plant=1,attached_node=1, dig_by_water=1},
sounds = mcl_sounds.node_sound_leaves_defaults(),
_mcl_blast_resistance = 0,
})
@ -79,7 +79,7 @@ local pumpkin_base_def = {
stack_max = 64,
paramtype2 = "facedir",
tiles = {"farming_pumpkin_top.png", "farming_pumpkin_top.png", "farming_pumpkin_side.png", "farming_pumpkin_side.png", "farming_pumpkin_side.png", "farming_pumpkin_face.png"},
groups = {handy=1,axey=1, building_block=1, dig_by_piston=1},
groups = {handy=1,axey=1, plant=1,building_block=1, dig_by_piston=1},
sounds = mcl_sounds.node_sound_wood_defaults(),
_mcl_blast_resistance = 5,
_mcl_hardness = 1,

View File

@ -200,7 +200,7 @@ function mcl_farming:add_gourd(full_unconnected_stem, connected_stem_basename, s
stem_def.drop = stem_drop
end
if stem_def.groups == nil then
stem_def.groups = {dig_immediate=3, not_in_creative_inventory=1, attached_node=1, dig_by_water=1}
stem_def.groups = {dig_immediate=3, not_in_creative_inventory=1, plant=1,attached_node=1, dig_by_water=1}
end
if stem_def.sounds == nil then
stem_def.sounds = mcl_sounds.node_sound_leaves_defaults()
@ -277,7 +277,7 @@ function mcl_farming:add_gourd(full_unconnected_stem, connected_stem_basename, s
fixed = connected_stem_selectionbox[i]
},
tiles = connected_stem_tiles[i],
groups = {dig_immediate=3, not_in_creative_inventory=1, attached_node=1, dig_by_water=1},
groups = {dig_immediate=3, not_in_creative_inventory=1, plant=1,attached_node=1, dig_by_water=1},
sounds = mcl_sounds.node_sound_leaves_defaults(),
_mcl_blast_resistance = 0,
})

View File

@ -51,7 +51,7 @@ for i=1,7 do
{-0.5, -0.5, -0.5, 0.5, sel_heights[i], 0.5}
},
},
groups = {dig_immediate=3, not_in_creative_inventory=1, attached_node=1, dig_by_water=1, dig_by_piston=1},
groups = {dig_immediate=3, not_in_creative_inventory=1, plant=1,attached_node=1, dig_by_water=1, dig_by_piston=1},
sounds = mcl_sounds.node_sound_leaves_defaults(),
_mcl_blast_resistance = 0,
})
@ -78,7 +78,7 @@ minetest.register_node("mcl_farming:wheat", {
{ items = {'mcl_farming:wheat_item'} }
}
},
groups = {dig_immediate=3, not_in_creative_inventory=1, attached_node=1, dig_by_water=1, dig_by_piston=1},
groups = {dig_immediate=3, not_in_creative_inventory=1, plant=1,attached_node=1, dig_by_water=1, dig_by_piston=1},
sounds = mcl_sounds.node_sound_leaves_defaults(),
_mcl_blast_resistance = 0,
})

View File

@ -18,7 +18,7 @@ local function add_simple_flower(name, desc, image, simple_selection_box)
paramtype = "light",
walkable = false,
stack_max = 64,
groups = {dig_immediate=3,flammable=2,flower=1,non_mycelium_plant=1,attached_node=1,dig_by_water=1,dig_by_piston=1,deco_block=1},
groups = {dig_immediate=3,flammable=2,plant=1,flower=1,non_mycelium_plant=1,attached_node=1,dig_by_water=1,dig_by_piston=1,deco_block=1},
sounds = mcl_sounds.node_sound_leaves_defaults(),
node_placement_prediction = "",
on_place = mcl_util.on_place_non_mycelium_plant,
@ -68,7 +68,7 @@ minetest.register_node("mcl_flowers:tallgrass", {
buildable_to = true,
is_ground_content = true,
-- CHECKME: How does tall grass behave when pushed by a piston?
groups = {dig_immediate=3, flammable=3,attached_node=1,non_mycelium_plant=1,dig_by_water=1,deco_block=1},
groups = {dig_immediate=3, flammable=3,attached_node=1,plant=1,non_mycelium_plant=1,dig_by_water=1,deco_block=1},
sounds = mcl_sounds.node_sound_leaves_defaults(),
drop = wheat_seed_drop,
after_dig_node = function(pos, oldnode, oldmetadata, user)
@ -96,7 +96,7 @@ minetest.register_node("mcl_flowers:fern", {
walkable = false,
stack_max = 64,
-- CHECKME: How does a fern behave when pushed by a piston?
groups = {dig_immediate=3,flammable=2,attached_node=1,non_mycelium_plant=1,dig_by_water=1,deco_block=1},
groups = {dig_immediate=3,flammable=2,attached_node=1,plant=1,non_mycelium_plant=1,dig_by_water=1,deco_block=1},
buildable_to = true,
sounds = mcl_sounds.node_sound_leaves_defaults(),
after_dig_node = function(pos, oldnode, oldmetadata, user)
@ -183,7 +183,7 @@ local function add_large_plant(name, desc, longdesc, bottom_img, top_img, inv_im
minetest.remove_node(top)
end
end,
groups = {dig_immediate=3,flammable=2,flower=flowergroup,non_mycelium_plant=1,attached_node=1, dig_by_water=1,dig_by_piston=1, double_plant=1,deco_block=1},
groups = {dig_immediate=3,flammable=2,flower=flowergroup,non_mycelium_plant=1,attached_node=1, dig_by_water=1,dig_by_piston=1, plant=1,double_plant=1,deco_block=1},
sounds = mcl_sounds.node_sound_leaves_defaults(),
})
@ -206,7 +206,7 @@ local function add_large_plant(name, desc, longdesc, bottom_img, top_img, inv_im
minetest.dig_node(bottom)
end
end,
groups = {dig_immediate=3,flammable=2,flower=flowergroup,non_mycelium_plant=1,dig_by_water=1,dig_by_piston=1, not_in_creative_inventory = 1, double_plant=2},
groups = {dig_immediate=3,flammable=2,flower=flowergroup,non_mycelium_plant=1,dig_by_water=1,dig_by_piston=1, not_in_creative_inventory = 1, plant=1,double_plant=2},
sounds = mcl_sounds.node_sound_leaves_defaults(),
})
@ -239,7 +239,7 @@ minetest.register_node("mcl_flowers:waterlily", {
liquids_pointable = true,
walkable = true,
sunlight_propagates = true,
groups = {dig_immediate = 3, dig_by_water = 1, dig_by_piston = 1, deco_block=1},
groups = {dig_immediate = 3, plant=1, dig_by_water = 1, dig_by_piston = 1, deco_block=1},
sounds = mcl_sounds.node_sound_leaves_defaults(),
node_placement_prediction = "",
node_box = {

View File

@ -14,7 +14,7 @@ minetest.register_node("mcl_nether:nether_wart_0", {
{-0.5, -0.5, -0.5, 0.5, -0.125, 0.5}
},
},
groups = {dig_immediate=3, not_in_creative_inventory=1,attached_node=1,dig_by_water=1,dig_by_piston=1},
groups = {dig_immediate=3, not_in_creative_inventory=1,plant=1,attached_node=1,dig_by_water=1,dig_by_piston=1},
sounds = mcl_sounds.node_sound_leaves_defaults(),
})
@ -34,7 +34,7 @@ minetest.register_node("mcl_nether:nether_wart_1", {
{-0.5, -0.5, -0.5, 0.5, 0.15, 0.5}
},
},
groups = {dig_immediate=3, not_in_creative_inventory=1,attached_node=1,dig_by_water=1,dig_by_piston=1},
groups = {dig_immediate=3, not_in_creative_inventory=1,plant=1,attached_node=1,dig_by_water=1,dig_by_piston=1},
sounds = mcl_sounds.node_sound_leaves_defaults(),
})
@ -54,7 +54,7 @@ minetest.register_node("mcl_nether:nether_wart_2", {
{-0.5, -0.5, -0.5, 0.5, 0.15, 0.5}
},
},
groups = {dig_immediate=3, not_in_creative_inventory=1,attached_node=1,dig_by_water=1,dig_by_piston=1},
groups = {dig_immediate=3, not_in_creative_inventory=1,plant=1,attached_node=1,dig_by_water=1,dig_by_piston=1},
sounds = mcl_sounds.node_sound_leaves_defaults(),
})
@ -81,7 +81,7 @@ minetest.register_node("mcl_nether:nether_wart", {
{-0.5, -0.5, -0.5, 0.5, 0.45, 0.5}
},
},
groups = {dig_immediate=3, not_in_creative_inventory=1,attached_node=1,dig_by_water=1,dig_by_piston=1},
groups = {dig_immediate=3, not_in_creative_inventory=1,plant=1,attached_node=1,dig_by_water=1,dig_by_piston=1},
sounds = mcl_sounds.node_sound_leaves_defaults(),
})