Skip to content

Commit da9789e

Browse files
Rui914paramat
Rui914
authored andcommittedJul 17, 2015
Fix not_in_creative_inventory
Update
1 parent 26866e4 commit da9789e

File tree

2 files changed

+29
-9
lines changed

2 files changed

+29
-9
lines changed
 

‎mods/default/nodes.lua

+28-8
Original file line numberDiff line numberDiff line change
@@ -946,7 +946,33 @@ for i=2,5 do
946946
})
947947
end
948948

949-
for i = 1, 5 do
949+
minetest.register_node("default:dry_grass_1", {
950+
description = "Dry Grass",
951+
drawtype = "plantlike",
952+
waving = 1,
953+
tiles = {"default_dry_grass_1.png"},
954+
inventory_image = "default_dry_grass_3.png",
955+
wield_image = "default_dry_grass_3.png",
956+
paramtype = "light",
957+
sunlight_propagates = true,
958+
walkable = false,
959+
buildable_to = true,
960+
groups = {snappy=3,flammable=3,flora=1,attached_node=1},
961+
sounds = default.node_sound_leaves_defaults(),
962+
selection_box = {
963+
type = "fixed",
964+
fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},
965+
},
966+
967+
on_place = function(itemstack, placer, pointed_thing)
968+
-- place a random dry grass node
969+
local stack = ItemStack("default:dry_grass_"..math.random(1,5))
970+
local ret = minetest.item_place(stack, placer, pointed_thing)
971+
return ItemStack("default:dry_grass_1 "..itemstack:get_count()-(1-ret:get_count()))
972+
end,
973+
})
974+
975+
for i=2,5 do
950976
minetest.register_node("default:dry_grass_"..i, {
951977
description = "Dry Grass",
952978
drawtype = "plantlike",
@@ -958,13 +984,7 @@ for i = 1, 5 do
958984
sunlight_propagates = true,
959985
walkable = false,
960986
buildable_to = true,
961-
groups = {
962-
snappy = 3,
963-
flammable = 3,
964-
flora = 1,
965-
attached_node = 1,
966-
not_in_creative_inventory = 1
967-
},
987+
groups = {snappy=3,flammable=3,flora=1,attached_node=1,not_in_creative_inventory=1},
968988
drop = "default:dry_grass_1",
969989
sounds = default.node_sound_leaves_defaults(),
970990
selection_box = {

‎mods/flowers/init.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ for _, m in pairs(mushrooms_datas) do
7474
sunlight_propagates = true,
7575
walkable = false,
7676
buildable_to = true,
77-
groups = {snappy=3,flammable=3,attached_node=1,not_in_creative_inventory=1},
77+
groups = {snappy=3,flammable=3,attached_node=1},
7878
sounds = default.node_sound_leaves_defaults(),
7979
on_use = minetest.item_eat(nut),
8080
selection_box = {

0 commit comments

Comments
 (0)
Please sign in to comment.