Skip to content

Commit

Permalink
Fix not_in_creative_inventory
Browse files Browse the repository at this point in the history
Update
  • Loading branch information
Rui914 authored and paramat committed Jul 17, 2015
1 parent 26866e4 commit da9789e
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 9 deletions.
36 changes: 28 additions & 8 deletions mods/default/nodes.lua
Expand Up @@ -946,7 +946,33 @@ for i=2,5 do
})
end
for i = 1, 5 do
minetest.register_node("default:dry_grass_1", {
description = "Dry Grass",
drawtype = "plantlike",
waving = 1,
tiles = {"default_dry_grass_1.png"},
inventory_image = "default_dry_grass_3.png",
wield_image = "default_dry_grass_3.png",
paramtype = "light",
sunlight_propagates = true,
walkable = false,
buildable_to = true,
groups = {snappy=3,flammable=3,flora=1,attached_node=1},
sounds = default.node_sound_leaves_defaults(),
selection_box = {
type = "fixed",
fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},
},
on_place = function(itemstack, placer, pointed_thing)
-- place a random dry grass node
local stack = ItemStack("default:dry_grass_"..math.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,
})
for i=2,5 do
minetest.register_node("default:dry_grass_"..i, {
description = "Dry Grass",
drawtype = "plantlike",
Expand All @@ -958,13 +984,7 @@ for i = 1, 5 do
sunlight_propagates = true,
walkable = false,
buildable_to = true,
groups = {
snappy = 3,
flammable = 3,
flora = 1,
attached_node = 1,
not_in_creative_inventory = 1
},
groups = {snappy=3,flammable=3,flora=1,attached_node=1,not_in_creative_inventory=1},
drop = "default:dry_grass_1",
sounds = default.node_sound_leaves_defaults(),
selection_box = {
Expand Down
2 changes: 1 addition & 1 deletion mods/flowers/init.lua
Expand Up @@ -74,7 +74,7 @@ for _, m in pairs(mushrooms_datas) do
sunlight_propagates = true,
walkable = false,
buildable_to = true,
groups = {snappy=3,flammable=3,attached_node=1,not_in_creative_inventory=1},
groups = {snappy=3,flammable=3,attached_node=1},
sounds = default.node_sound_leaves_defaults(),
on_use = minetest.item_eat(nut),
selection_box = {
Expand Down

0 comments on commit da9789e

Please sign in to comment.