forked from mtcontrib/plantlife_modpack
Exclude fruitless bush from creative inventory
The fruitless bush isn't an independent item, but a node type used only for its appearance, representing the the fruitless state of some specific type of fruit bush. One should never have a fruitless bush in inventory, and it makes no sense to plant a fruitless bush per se.
This commit is contained in:
parent
5adbd3f043
commit
49c1d35ddb
@ -164,11 +164,13 @@ for i, bush_name in ipairs(bushes_classic.bushes) do
|
|||||||
|
|
||||||
local texture_top, texture_bottom
|
local texture_top, texture_bottom
|
||||||
|
|
||||||
|
local groups = {snappy = 3, bush = 1, flammable = 2, attached_node=1}
|
||||||
if bush_name == "mixed_berry" then
|
if bush_name == "mixed_berry" then
|
||||||
bush_name = "fruitless";
|
bush_name = "fruitless";
|
||||||
desc = S("currently fruitless");
|
desc = S("currently fruitless");
|
||||||
texture_top = "bushes_fruitless_bush_top.png"
|
texture_top = "bushes_fruitless_bush_top.png"
|
||||||
texture_bottom = "bushes_fruitless_bush_bottom.png"
|
texture_bottom = "bushes_fruitless_bush_bottom.png"
|
||||||
|
groups.not_in_creative_inventory = 1
|
||||||
else
|
else
|
||||||
texture_top = "bushes_bush_top.png"
|
texture_top = "bushes_bush_top.png"
|
||||||
texture_bottom = "bushes_bush_bottom.png"
|
texture_bottom = "bushes_bush_bottom.png"
|
||||||
@ -195,7 +197,7 @@ for i, bush_name in ipairs(bushes_classic.bushes) do
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
groups = {snappy = 3, bush = 1, flammable = 2, attached_node=1},
|
groups = groups,
|
||||||
sounds = default.node_sound_leaves_defaults(),
|
sounds = default.node_sound_leaves_defaults(),
|
||||||
drop = "",
|
drop = "",
|
||||||
after_dig_node = function( pos, oldnode, oldmetadata, digger )
|
after_dig_node = function( pos, oldnode, oldmetadata, digger )
|
||||||
|
Loading…
Reference in New Issue
Block a user