forked from mtcontrib/plantlife_modpack
Make bushes mod use any of the junglegrasses
provided by plantlife's junglegrass mod. Make junglegrass mod define its own copy of default:junglegrass if it isn't already defined. Add 'junglegrass=1' to the node's groups in either case.
This commit is contained in:
parent
dce3c3a908
commit
8238d0d9bf
@ -43,7 +43,7 @@ for i, berry in ipairs(bushes_classic.bushes) do
|
||||
minetest.register_craft({
|
||||
output = "bushes:"..berry.."_pie_raw 1",
|
||||
recipe = {
|
||||
{ "bushes:sugar", "default:junglegrass", "bushes:sugar" },
|
||||
{ "bushes:sugar", "group:junglegrass", "bushes:sugar" },
|
||||
{ "bushes:"..berry, "bushes:"..berry, "bushes:"..berry },
|
||||
},
|
||||
})
|
||||
@ -93,7 +93,7 @@ end
|
||||
minetest.register_craft({
|
||||
output = "bushes:strawberry_pie_raw 1",
|
||||
recipe = {
|
||||
{ "bushes:sugar", "default:junglegrass", "bushes:sugar" },
|
||||
{ "bushes:sugar", "group:junglegrass", "bushes:sugar" },
|
||||
{ "farming_plus:strawberry_item", "farming_plus:strawberry_item", "farming_plus:strawberry_item" },
|
||||
},
|
||||
})
|
||||
@ -101,7 +101,7 @@ minetest.register_craft({
|
||||
minetest.register_craft({
|
||||
output = "bushes:mixed_berry_pie_raw 2",
|
||||
recipe = {
|
||||
{ "bushes:sugar", "default:junglegrass", "bushes:sugar" },
|
||||
{ "bushes:sugar", "group:junglegrass", "bushes:sugar" },
|
||||
{ "group:berry", "group:berry", "group:berry" },
|
||||
{ "group:berry", "group:berry", "group:berry" },
|
||||
},
|
||||
|
@ -1,2 +1 @@
|
||||
default
|
||||
plants_lib
|
||||
|
@ -1 +1,2 @@
|
||||
default
|
||||
plants_lib
|
||||
|
@ -14,6 +14,40 @@ local grasses_list = {
|
||||
{"default:junglegrass" , nil}
|
||||
}
|
||||
|
||||
function clone_node(name)
|
||||
node2={}
|
||||
node=minetest.registered_nodes[name]
|
||||
for k,v in pairs(node) do
|
||||
node2[k]=v
|
||||
end
|
||||
return node2
|
||||
end
|
||||
|
||||
if not minetest.registered_nodes["default:junglegrass"] then
|
||||
minetest.register_node(":default:junglegrass", {
|
||||
description = "Jungle Grass",
|
||||
drawtype = "plantlike",
|
||||
visual_scale = 1.3,
|
||||
tiles = {"default_junglegrass.png"},
|
||||
inventory_image = "default_junglegrass.png",
|
||||
wield_image = "default_junglegrass.png",
|
||||
paramtype = "light",
|
||||
walkable = false,
|
||||
buildable_to = true,
|
||||
is_ground_content = true,
|
||||
groups = {snappy=3,flammable=2,flora=1,attached_node=1, junglegrass=1},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},
|
||||
},
|
||||
})
|
||||
else
|
||||
new_junglegrass=clone_node("default:junglegrass")
|
||||
new_junglegrass.groups = {snappy=3,flammable=2,flora=1,attached_node=1, junglegrass=1}
|
||||
minetest.register_node(":default:junglegrass", new_junglegrass)
|
||||
end
|
||||
|
||||
minetest.register_node('junglegrass:medium', {
|
||||
description = "Jungle Grass (medium height)",
|
||||
drawtype = 'plantlike',
|
||||
|
Loading…
Reference in New Issue
Block a user