Default: update and improve
@ -466,6 +466,24 @@ minetest.register_craft({
|
||||
-- Fuels
|
||||
--
|
||||
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "group:grass",
|
||||
burntime = 2
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "group:dry_grass",
|
||||
burntime = 2
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "default:junglegrass",
|
||||
burntime = 3
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "group:tree",
|
||||
|
@ -42,6 +42,7 @@ minetest.register_alias("mapgen_mossycobble", "default:mossycobble")
|
||||
minetest.register_alias("mapgen_sandstonebrick", "default:sandstone") -- 0.4 compatibility
|
||||
minetest.register_alias("mapgen_stair_sandstonebrick", "stairs:stair_default_sandstone")
|
||||
|
||||
|
||||
local modpath = minetest.get_modpath("default")
|
||||
|
||||
--
|
||||
@ -656,6 +657,7 @@ function default.register_biomes()
|
||||
heat_point = 50,
|
||||
humidity_point = 35,
|
||||
})
|
||||
|
||||
-- Coniferous forest
|
||||
|
||||
minetest.register_biome({
|
||||
@ -964,14 +966,14 @@ function default.register_mgv6_decorations()
|
||||
-- Long grasses
|
||||
|
||||
minetest.register_decoration({
|
||||
name = "default:grass",
|
||||
name = "default:grass_4",
|
||||
deco_type = "simple",
|
||||
place_on = {"default:dirt_with_grass"},
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.05,
|
||||
y_max = 30,
|
||||
y_min = 1,
|
||||
decoration = "default:grass",
|
||||
decoration = "default:grass_4",
|
||||
})
|
||||
|
||||
-- Dry shrubs
|
||||
@ -998,6 +1000,51 @@ function default.register_mgv6_decorations()
|
||||
end
|
||||
|
||||
|
||||
local function register_grass_decoration(offset, scale, length)
|
||||
minetest.register_decoration({
|
||||
name = "default:grass_" .. length,
|
||||
deco_type = "simple",
|
||||
place_on = {"default:dirt_with_grass"},
|
||||
sidelen = 16,
|
||||
noise_params = {
|
||||
offset = offset,
|
||||
scale = scale,
|
||||
spread = {x = 200, y = 200, z = 200},
|
||||
seed = 329,
|
||||
octaves = 3,
|
||||
persist = 0.6
|
||||
},
|
||||
biomes = {"grassland", "deciduous_forest",
|
||||
"deciduous_forest", "coniferous_forest",
|
||||
"coniferous_forest_dunes"},
|
||||
y_max = 31000,
|
||||
y_min = 1,
|
||||
decoration = "default:grass_" .. length,
|
||||
})
|
||||
end
|
||||
|
||||
local function register_dry_grass_decoration(offset, scale, length)
|
||||
minetest.register_decoration({
|
||||
name = "default:dry_grass_" .. length,
|
||||
deco_type = "simple",
|
||||
place_on = {"default:dirt_with_dry_grass"},
|
||||
sidelen = 16,
|
||||
noise_params = {
|
||||
offset = offset,
|
||||
scale = scale,
|
||||
spread = {x = 200, y = 200, z = 200},
|
||||
seed = 329,
|
||||
octaves = 3,
|
||||
persist = 0.6
|
||||
},
|
||||
biomes = {"savanna"},
|
||||
y_max = 31000,
|
||||
y_min = 1,
|
||||
decoration = "default:dry_grass_" .. length,
|
||||
})
|
||||
end
|
||||
|
||||
|
||||
function default.register_decorations()
|
||||
|
||||
-- Apple tree and log
|
||||
@ -1368,7 +1415,7 @@ function default.register_decorations()
|
||||
biomes = {"grassland", "deciduous_forest"},
|
||||
y_max = 31000,
|
||||
y_min = 1,
|
||||
schematic = minetest.get_modpath("default") .. "/schematics/bush.mts",
|
||||
schematic = modpath .. "/schematics/bush.mts",
|
||||
flags = "place_center_x, place_center_z",
|
||||
})
|
||||
|
||||
@ -1391,7 +1438,7 @@ function default.register_decorations()
|
||||
y_max = 31000,
|
||||
y_min = 1,
|
||||
place_offset_y = 1,
|
||||
schematic = minetest.get_modpath("default") .. "/schematics/blueberry_bush.mts",
|
||||
schematic = modpath .. "/schematics/blueberry_bush.mts",
|
||||
flags = "place_center_x, place_center_z",
|
||||
})
|
||||
|
||||
@ -1400,7 +1447,7 @@ function default.register_decorations()
|
||||
minetest.register_decoration({
|
||||
name = "default:acacia_bush",
|
||||
deco_type = "schematic",
|
||||
place_on = {"default:dry_dirt_with_dry_grass"},
|
||||
place_on = {"default:dirt_with_dry_grass"},
|
||||
sidelen = 16,
|
||||
noise_params = {
|
||||
offset = -0.004,
|
||||
@ -1413,7 +1460,7 @@ function default.register_decorations()
|
||||
biomes = {"savanna"},
|
||||
y_max = 31000,
|
||||
y_min = 1,
|
||||
schematic = minetest.get_modpath("default") .. "/schematics/acacia_bush.mts",
|
||||
schematic = modpath .. "/schematics/acacia_bush.mts",
|
||||
flags = "place_center_x, place_center_z",
|
||||
})
|
||||
|
||||
@ -1435,51 +1482,25 @@ function default.register_decorations()
|
||||
biomes = {"taiga", "snowy_grassland"},
|
||||
y_max = 31000,
|
||||
y_min = 4,
|
||||
schematic = minetest.get_modpath("default") .. "/schematics/pine_bush.mts",
|
||||
schematic = modpath .. "/schematics/pine_bush.mts",
|
||||
flags = "place_center_x, place_center_z",
|
||||
})
|
||||
|
||||
-- Grasses
|
||||
|
||||
minetest.register_decoration({
|
||||
deco_type = "simple",
|
||||
place_on = {"default:dirt_with_grass", "default:sand"},
|
||||
sidelen = 16,
|
||||
noise_params = {
|
||||
offset = 0.15,
|
||||
scale = 0.15,
|
||||
spread = {x = 200, y = 200, z = 200},
|
||||
seed = 329,
|
||||
octaves = 3,
|
||||
persist = 0.6
|
||||
},
|
||||
biomes = {"grassland", "deciduous_forest",
|
||||
"deciduous_forest", "coniferous_forest",
|
||||
"coniferous_forest_dunes"},
|
||||
y_max = 31000,
|
||||
y_min = 1,
|
||||
decoration = "default:grass",
|
||||
})
|
||||
register_grass_decoration(-0.02, 0.1, 5)
|
||||
register_grass_decoration(-0.005, 0.085, 4)
|
||||
register_grass_decoration(0.01, 0.07, 3)
|
||||
register_grass_decoration(0.025, 0.055, 2)
|
||||
register_grass_decoration(0.04, 0.04, 1)
|
||||
|
||||
-- Dry grasses
|
||||
|
||||
minetest.register_decoration({
|
||||
deco_type = "simple",
|
||||
place_on = {"default:dirt_with_dry_grass"},
|
||||
sidelen = 16,
|
||||
noise_params = {
|
||||
offset = 0.15,
|
||||
scale = 0.15,
|
||||
spread = {x = 200, y = 200, z = 200},
|
||||
seed = 329,
|
||||
octaves = 3,
|
||||
persist = 0.6
|
||||
},
|
||||
biomes = {"savanna"},
|
||||
y_max = 31000,
|
||||
y_min = 1,
|
||||
decoration = "default:dry_grass",
|
||||
})
|
||||
register_dry_grass_decoration(0.01, 0.05, 5)
|
||||
register_dry_grass_decoration(0.03, 0.03, 4)
|
||||
register_dry_grass_decoration(0.05, 0.01, 3)
|
||||
register_dry_grass_decoration(0.07, -0.01, 2)
|
||||
register_dry_grass_decoration(0.09, -0.03, 1)
|
||||
|
||||
-- Junglegrass
|
||||
|
||||
|
@ -340,7 +340,7 @@ minetest.register_node("default:sapling", {
|
||||
type = "fixed",
|
||||
fixed = {-0.3, -0.5, -0.3, 0.3, 0.35, 0.3}
|
||||
},
|
||||
groups = {snappy = 2, dig_immediate = 3, flammable = 2,
|
||||
groups = {snappy = 2, dig_immediate = 2, flammable = 2,
|
||||
attached_node = 1, sapling = 1},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
|
||||
@ -418,7 +418,7 @@ minetest.register_node("default:apple_gold", {
|
||||
type = "fixed",
|
||||
fixed = {-3/16, -7/16, -3/16, 3/16, 1/4, 3/16}
|
||||
},
|
||||
groups = {fleshy = 3, dig_immediate = 3, flammable = 2, food = 1},
|
||||
groups = {fleshy = 3, dig_immediate = 1, flammable = 2, food = 1},
|
||||
on_use = minetest.item_eat(8),
|
||||
sounds = default.node_sound_defaults()
|
||||
})
|
||||
@ -481,7 +481,7 @@ minetest.register_node("default:junglesapling", {
|
||||
type = "fixed",
|
||||
fixed = {-0.3, -0.5, -0.3, 0.3, 0.35, 0.3}
|
||||
},
|
||||
groups = {snappy = 2, dig_immediate = 3, flammable = 2,
|
||||
groups = {snappy = 2, dig_immediate = 2, flammable = 2,
|
||||
attached_node = 1, sapling = 1},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
|
||||
@ -559,7 +559,7 @@ minetest.register_node("default:pine_sapling", {
|
||||
type = "fixed",
|
||||
fixed = {-0.3, -0.5, -0.3, 0.3, 0.35, 0.3}
|
||||
},
|
||||
groups = {snappy = 2, dig_immediate = 3, flammable = 3,
|
||||
groups = {snappy = 2, dig_immediate = 2, flammable = 3,
|
||||
attached_node = 1, sapling = 1},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
|
||||
@ -639,7 +639,7 @@ minetest.register_node("default:acacia_sapling", {
|
||||
type = "fixed",
|
||||
fixed = {-0.3, -0.5, -0.3, 0.3, 0.35, 0.3}
|
||||
},
|
||||
groups = {snappy = 2, dig_immediate = 3, flammable = 2,
|
||||
groups = {snappy = 2, dig_immediate = 2, flammable = 2,
|
||||
attached_node = 1, sapling = 1},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
|
||||
@ -716,7 +716,7 @@ minetest.register_node("default:birch_sapling", {
|
||||
type = "fixed",
|
||||
fixed = {-3 / 16, -0.5, -3 / 16, 3 / 16, 0.5, 3 / 16}
|
||||
},
|
||||
groups = {snappy = 2, dig_immediate = 3, flammable = 3,
|
||||
groups = {snappy = 2, dig_immediate = 2, flammable = 3,
|
||||
attached_node = 1, sapling = 1},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
|
||||
@ -773,7 +773,7 @@ minetest.register_node("default:cherry_blossom_sapling", {
|
||||
type = "fixed",
|
||||
fixed = {-0.3, -0.5, -0.3, 0.3, 0.35, 0.3}
|
||||
},
|
||||
groups = {snappy = 2, dig_immediate = 3, flammable = 2,
|
||||
groups = {snappy = 2, dig_immediate = 2, flammable = 2,
|
||||
attached_node = 1, sapling = 1},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
|
||||
@ -1013,47 +1013,254 @@ minetest.register_node("default:junglegrass", {
|
||||
description = "Jungle Grass",
|
||||
drawtype = "plantlike",
|
||||
waving = 1,
|
||||
visual_scale = 1.3,
|
||||
visual_scale = 1.25,
|
||||
tiles = {"default_junglegrass.png"},
|
||||
inventory_image = "default_junglegrass.png",
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
buildable_to = true,
|
||||
groups = {snappy = 3, flora = 1, attached_node = 1, flammable = 1},
|
||||
sounds = default.node_sound_leaves_defaults()
|
||||
groups = {snappy = 3, flora = 1, attached_node = 1, flammable = 1,
|
||||
dig_immediate = 2},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.5, -0.5, -0.5, 0.5, 12 / 16, 0.5}
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_node("default:grass", {
|
||||
-- Grass
|
||||
|
||||
minetest.register_node("default:grass_1", {
|
||||
description = "Grass",
|
||||
drawtype = "plantlike",
|
||||
waving = 1,
|
||||
tiles = {"default_tallgrass.png"},
|
||||
inventory_image = "default_tallgrass.png",
|
||||
tiles = {"default_grass_1.png"},
|
||||
-- Use texture of a taller grass stage in inventory
|
||||
inventory_image = "default_grass_4.png",
|
||||
wield_image = "default_grass_4.png",
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
buildable_to = true,
|
||||
groups = {snappy = 3, flora = 1, attached_node = 1, grass = 1,
|
||||
flammable = 1, dig_immediate = 3},
|
||||
sounds = default.node_sound_leaves_defaults()
|
||||
groups = {snappy = 3, flora = 1, attached_node = 1, flammable = 1,
|
||||
grass = 1, dig_immediate = 3},
|
||||
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)
|
||||
if pointed_thing.type == "node" then
|
||||
local under = pointed_thing.under
|
||||
local node = minetest.get_node(under)
|
||||
local node_def = minetest.registered_nodes[node.name]
|
||||
if node_def and node_def.on_rightclick and
|
||||
not (placer and placer:is_player() and
|
||||
placer:get_player_control().sneak) then
|
||||
return node_def.on_rightclick(under, node, placer, itemstack,
|
||||
pointed_thing) or itemstack
|
||||
end
|
||||
|
||||
-- place a random grass node
|
||||
local stack = ItemStack("default:grass_" .. random(1, 5))
|
||||
local ret = minetest.item_place(stack, placer, pointed_thing)
|
||||
return ItemStack("default:grass_1 " ..
|
||||
itemstack:get_count() - (1 - ret:get_count()))
|
||||
end
|
||||
|
||||
return itemstack
|
||||
end
|
||||
})
|
||||
|
||||
minetest.register_node("default:dry_grass", {
|
||||
for i = 2, 5 do
|
||||
minetest.register_node("default:grass_" .. i, {
|
||||
description = "Grass",
|
||||
drawtype = "plantlike",
|
||||
waving = 1,
|
||||
tiles = {"default_grass_" .. i .. ".png"},
|
||||
inventory_image = "default_grass_" .. i .. ".png",
|
||||
wield_image = "default_grass_" .. i .. ".png",
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
buildable_to = true,
|
||||
drop = "default:grass_1",
|
||||
groups = {snappy = 3, flora = 1, attached_node = 1, flammable = 1,
|
||||
grass = 1, dig_immediate = 3, not_in_creative_inventory = 1},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-6 / 16, -0.5, -6 / 16, 6 / 16, (-1 / 16 + i / 12), 6 / 16}
|
||||
}
|
||||
})
|
||||
end
|
||||
|
||||
-- Compatiability Grass node
|
||||
minetest.register_node("default:grass", {
|
||||
description = "Grass",
|
||||
drawtype = "plantlike",
|
||||
waving = 1,
|
||||
tiles = {"default_grass_4.png"},
|
||||
inventory_image = "default_grass_4.png",
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
buildable_to = true,
|
||||
drop = "default:grass_1",
|
||||
groups = {snappy = 3, flora = 1, attached_node = 1, flammable = 1,
|
||||
grass = 1, dig_immediate = 3},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
if pointed_thing.type == "node" then
|
||||
local under = pointed_thing.under
|
||||
local node = minetest.get_node(under)
|
||||
local node_def = minetest.registered_nodes[node.name]
|
||||
if node_def and node_def.on_rightclick and
|
||||
not (placer and placer:is_player() and
|
||||
placer:get_player_control().sneak) then
|
||||
return node_def.on_rightclick(under, node, placer, itemstack,
|
||||
pointed_thing) or itemstack
|
||||
end
|
||||
|
||||
-- place a random grass node
|
||||
local stack = ItemStack("default:grass_" .. random(1, 5))
|
||||
local ret = minetest.item_place(stack, placer, pointed_thing)
|
||||
return ItemStack("default:grass_1 " ..
|
||||
itemstack:get_count() - (1 - ret:get_count()))
|
||||
end
|
||||
|
||||
return itemstack
|
||||
end
|
||||
})
|
||||
|
||||
-- LBM for updating Grass
|
||||
minetest.register_lbm({
|
||||
label = "Grass updater",
|
||||
name = "default:grass_updater",
|
||||
nodenames = "default:grass",
|
||||
action = function(pos)
|
||||
minetest.swap_node(pos, {name = "default:grass_" .. random(1, 5)})
|
||||
end
|
||||
})
|
||||
|
||||
-- Dry Grass
|
||||
|
||||
minetest.register_node("default:dry_grass_1", {
|
||||
description = "Dry Grass",
|
||||
drawtype = "plantlike",
|
||||
waving = 1,
|
||||
tiles = {"default_dry_tallgrass.png"},
|
||||
inventory_image = "default_dry_tallgrass.png",
|
||||
tiles = {"default_dry_grass_1.png"},
|
||||
inventory_image = "default_dry_grass_4.png",
|
||||
wield_image = "default_dry_grass_4.png",
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
buildable_to = true,
|
||||
groups = {snappy = 3, flammable = 3, flora = 1, attached_node = 1,
|
||||
dry_grass = 1, dig_immediate = 3},
|
||||
sounds = default.node_sound_leaves_defaults()
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-6 / 16, -0.5, -6 / 16, 6 / 16, -3 / 16, 6 / 16}
|
||||
},
|
||||
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
if pointed_thing.type == "node" then
|
||||
local under = pointed_thing.under
|
||||
local node = minetest.get_node(under)
|
||||
local node_def = minetest.registered_nodes[node.name]
|
||||
if node_def and node_def.on_rightclick and
|
||||
not (placer and placer:is_player() and
|
||||
placer:get_player_control().sneak) then
|
||||
return node_def.on_rightclick(under, node, placer, itemstack,
|
||||
pointed_thing) or itemstack
|
||||
end
|
||||
|
||||
-- place a random dry grass node
|
||||
local stack = ItemStack("default:dry_grass_" .. random(1, 5))
|
||||
local ret = minetest.item_place(stack, placer, pointed_thing)
|
||||
return ItemStack("default:dry_grass_1 " ..
|
||||
itemstack:get_count() - (1 - ret:get_count()))
|
||||
end
|
||||
|
||||
return itemstack
|
||||
end
|
||||
})
|
||||
|
||||
-- Compatiability Dry Grass node
|
||||
minetest.register_node("default:dry_grass", {
|
||||
description = "Dry Grass",
|
||||
drawtype = "plantlike",
|
||||
waving = 1,
|
||||
tiles = {"default_dry_grass_4.png"},
|
||||
inventory_image = "default_dry_grass_4.png",
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
buildable_to = true,
|
||||
groups = {snappy = 3, flammable = 3, flora = 1, attached_node = 1,
|
||||
dry_grass = 1, dig_immediate = 3},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
if pointed_thing.type == "node" then
|
||||
local under = pointed_thing.under
|
||||
local node = minetest.get_node(under)
|
||||
local node_def = minetest.registered_nodes[node.name]
|
||||
if node_def and node_def.on_rightclick and
|
||||
not (placer and placer:is_player() and
|
||||
placer:get_player_control().sneak) then
|
||||
return node_def.on_rightclick(under, node, placer, itemstack,
|
||||
pointed_thing) or itemstack
|
||||
end
|
||||
|
||||
-- place a random dry grass node
|
||||
local stack = ItemStack("default:dry_grass_" .. random(1, 5))
|
||||
local ret = minetest.item_place(stack, placer, pointed_thing)
|
||||
return ItemStack("default:dry_grass_1 " ..
|
||||
itemstack:get_count() - (1 - ret:get_count()))
|
||||
end
|
||||
|
||||
return itemstack
|
||||
end
|
||||
})
|
||||
|
||||
-- LBM for updating Dry Grass
|
||||
minetest.register_lbm({
|
||||
label = "Dry Grass updater",
|
||||
name = "default:dry_grass_updater",
|
||||
nodenames = "default:dry_grass",
|
||||
action = function(pos)
|
||||
minetest.swap_node(pos, {name = "default:dry_grass_" .. random(1, 5)})
|
||||
end
|
||||
})
|
||||
|
||||
for i = 2, 5 do
|
||||
minetest.register_node("default:dry_grass_" .. i, {
|
||||
description = "Dry Grass",
|
||||
drawtype = "plantlike",
|
||||
waving = 1,
|
||||
tiles = {"default_dry_grass_" .. i .. ".png"},
|
||||
inventory_image = "default_dry_grass_" .. i .. ".png",
|
||||
wield_image = "default_dry_grass_" .. i .. ".png",
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
buildable_to = true,
|
||||
groups = {snappy = 3, flammable = 3, flora = 1, attached_node = 1,
|
||||
dry_grass = 1, not_in_creative_inventory = 1},
|
||||
drop = "default:dry_grass_1",
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-6 / 16, -0.5, -6 / 16, 6 / 16, (-1 / 16 + i / 12), 6 / 16}
|
||||
}
|
||||
})
|
||||
end
|
||||
|
||||
minetest.register_node("default:bush_stem", {
|
||||
description = "Bush Stem",
|
||||
drawtype = "plantlike",
|
||||
@ -1104,7 +1311,7 @@ minetest.register_node("default:bush_sapling", {
|
||||
type = "fixed",
|
||||
fixed = {-4 / 16, -0.5, -4 / 16, 4 / 16, 2 / 16, 4 / 16}
|
||||
},
|
||||
groups = {snappy = 2, dig_immediate = 3, flammable = 2,
|
||||
groups = {snappy = 2, dig_immediate = 2, flammable = 2,
|
||||
attached_node = 1, sapling = 1},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
|
||||
@ -1150,7 +1357,9 @@ minetest.register_node("default:blueberry_bush_leaves_with_berries", {
|
||||
walkable = false,
|
||||
groups = {snappy = 3, flammable = 2, leaves = 1, dig_immediate = 2},
|
||||
drop = "default:blueberries",
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
sounds = default.node_sound_leaves_defaults({
|
||||
dig = {name = "default_dig_snappy", gain = 0.5}
|
||||
}),
|
||||
node_dig_prediction = "default:blueberry_bush_leaves",
|
||||
|
||||
on_punch = function(pos)
|
||||
@ -1275,7 +1484,7 @@ minetest.register_node("default:acacia_bush_sapling", {
|
||||
type = "fixed",
|
||||
fixed = {-3 / 16, -0.5, -3 / 16, 3 / 16, 2 / 16, 3 / 16}
|
||||
},
|
||||
groups = {snappy = 2, dig_immediate = 3, flammable = 2,
|
||||
groups = {snappy = 2, dig_immediate = 2, flammable = 2,
|
||||
attached_node = 1, sapling = 1},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
|
||||
@ -1345,7 +1554,7 @@ minetest.register_node("default:pine_bush_sapling", {
|
||||
type = "fixed",
|
||||
fixed = {-4 / 16, -0.5, -4 / 16, 4 / 16, 2 / 16, 4 / 16}
|
||||
},
|
||||
groups = {snappy = 2, dig_immediate = 3, flammable = 2,
|
||||
groups = {snappy = 2, dig_immediate = 2, flammable = 2,
|
||||
attached_node = 1, sapling = 1},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
|
||||
|
BIN
files/default/textures/default_dry_grass_1.png
Normal file
After Width: | Height: | Size: 278 B |
BIN
files/default/textures/default_dry_grass_2.png
Normal file
After Width: | Height: | Size: 426 B |
BIN
files/default/textures/default_dry_grass_3.png
Normal file
After Width: | Height: | Size: 565 B |
BIN
files/default/textures/default_dry_grass_4.png
Normal file
After Width: | Height: | Size: 729 B |
BIN
files/default/textures/default_dry_grass_5.png
Normal file
After Width: | Height: | Size: 813 B |
Before Width: | Height: | Size: 838 B |
Before Width: | Height: | Size: 594 B After Width: | Height: | Size: 594 B |
BIN
files/default/textures/default_grass_1.png
Normal file
After Width: | Height: | Size: 278 B |
BIN
files/default/textures/default_grass_2.png
Normal file
After Width: | Height: | Size: 426 B |
BIN
files/default/textures/default_grass_3.png
Normal file
After Width: | Height: | Size: 565 B |
BIN
files/default/textures/default_grass_4.png
Normal file
After Width: | Height: | Size: 729 B |
BIN
files/default/textures/default_grass_5.png
Normal file
After Width: | Height: | Size: 813 B |
Before Width: | Height: | Size: 669 B After Width: | Height: | Size: 668 B |
Before Width: | Height: | Size: 7.0 KiB After Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 888 B |
BIN
files/default/textures/formspec_cell_s.png
Normal file
After Width: | Height: | Size: 164 B |
Before Width: | Height: | Size: 384 B After Width: | Height: | Size: 588 B |
@ -62,7 +62,7 @@ minetest.register_craft({
|
||||
-- Manually add flowers recipes
|
||||
local flowers_recipes = {
|
||||
"blue", "orange", "red",
|
||||
"violet", "white", "yellow"
|
||||
"violet", "yellow"
|
||||
}
|
||||
|
||||
for _, name in pairs(flowers_recipes) do
|
||||
@ -74,6 +74,13 @@ for _, name in pairs(flowers_recipes) do
|
||||
})
|
||||
end
|
||||
|
||||
minetest.register_craft({
|
||||
output = "dye:white",
|
||||
recipe = {
|
||||
{"group:flower,color_white"}
|
||||
}
|
||||
})
|
||||
|
||||
-- Mix recipes
|
||||
local dye_recipes = {
|
||||
-- src1, src2, dst
|
||||
|
@ -3,24 +3,28 @@
|
||||
--
|
||||
|
||||
-- Pumpkin
|
||||
minetest.override_item("default:dry_grass", {drop = {
|
||||
max_items = 1,
|
||||
items = {
|
||||
{items = {"farming_addons:seed_pumpkin"}, rarity = 6},
|
||||
{items = {"default:dry_grass"}}
|
||||
}
|
||||
}})
|
||||
for i = 1, 5 do
|
||||
minetest.override_item("default:dry_grass_" .. i, {drop = {
|
||||
max_items = 1,
|
||||
items = {
|
||||
{items = {"farming_addons:seed_pumpkin"}, rarity = 5},
|
||||
{items = {"default:dry_grass_1"}}
|
||||
}
|
||||
}})
|
||||
end
|
||||
|
||||
-- Carrot
|
||||
-- Wheat
|
||||
minetest.override_item("default:grass", {drop = {
|
||||
max_items = 1,
|
||||
items = {
|
||||
{items = {"farming:seed_wheat"}, rarity = 5},
|
||||
{items = {"farming_addons:seed_carrot"}, rarity = 12},
|
||||
{items = {"default:grass"}}
|
||||
}
|
||||
}})
|
||||
for i = 1, 5 do
|
||||
minetest.override_item("default:grass_" .. i, {drop = {
|
||||
max_items = 1,
|
||||
items = {
|
||||
{items = {"farming:seed_wheat"}, rarity = 5},
|
||||
{items = {"farming_addons:seed_carrot"}, rarity = 12},
|
||||
{items = {"default:grass_1"}}
|
||||
}
|
||||
}})
|
||||
end
|
||||
|
||||
-- Potato
|
||||
minetest.override_item("default:junglegrass", {drop = {
|
||||
|
@ -75,10 +75,14 @@ end
|
||||
local function get_tile(def)
|
||||
local tiles = {"flowerpot.png"}
|
||||
local drawtype = def.drawtype
|
||||
local inventory_image = def.inventory_image
|
||||
|
||||
if drawtype == "mesh" then
|
||||
tiles[2] = "[combine:64x64:0,10=" .. def.inventory_image
|
||||
tiles[3] = b
|
||||
elseif inventory_image ~= "" then
|
||||
tiles[2] = inventory_image
|
||||
tiles[3] = b
|
||||
else
|
||||
local tile = def.tiles[1]
|
||||
if type(tile) == "table" then
|
||||
@ -94,7 +98,6 @@ local function get_tile(def)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
return tiles
|
||||
end
|
||||
|
||||
@ -191,11 +194,18 @@ minetest.register_craft({
|
||||
local function register_pots()
|
||||
local register_pot = flowerpot.register_node
|
||||
for node, def in pairs(minetest.registered_nodes) do
|
||||
local groups = def.groups or {}
|
||||
if groups.flora or groups.sapling then
|
||||
register_pot(node)
|
||||
if not def.groups.grass and not def.groups.dry_grass then
|
||||
local groups = def.groups or {}
|
||||
if groups.flora or groups.sapling then
|
||||
register_pot(node)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
register_pot("default:grass_1")
|
||||
register_pot("default:dry_grass_1")
|
||||
minetest.register_alias("flowerpot:default_grass", "flowerpot:default_grass_1")
|
||||
minetest.register_alias("flowerpot:default_dry_grass", "flowerpot:default_dry_grass_1")
|
||||
end
|
||||
|
||||
if minetest.register_on_mods_loaded then
|
||||
|
@ -231,7 +231,7 @@ pep.register_potion({
|
||||
longdesc = "Drinking it will make you walk slower for 60 seconds",
|
||||
effect_type = "pepspeedminus",
|
||||
duration = 60,
|
||||
recipe = {"default:dry_grass", "default:ice", "vessels:glass_bottle"}
|
||||
recipe = {"group:dry_grass", "default:ice", "vessels:glass_bottle"}
|
||||
})
|
||||
|
||||
playereffects.register_effect_type("pepbreath", S("Perfect Breath"), "pep_breath.png", {"breath"},
|
||||
@ -330,7 +330,7 @@ pep.register_potion({
|
||||
effect_type = "pepjumpplus",
|
||||
duration = 60,
|
||||
recipe = {
|
||||
"flowers:tulip", "default:grass", "mesecons:wire_00000000_off",
|
||||
"flowers:tulip", "group:grass", "mesecons:wire_00000000_off",
|
||||
"mesecons:wire_00000000_off", "vessels:glass_bottle"
|
||||
}
|
||||
})
|
||||
|