2 minetest
.register_node("default:dry_shrub", {
3 description
= "Dry Shrub",
4 drawtype
= "plantlike",
6 tiles
= {"default_dry_shrub.png"},
7 inventory_image
= "default_dry_shrub.png",
8 wield_image
= "default_dry_shrub.png",
12 is_ground_content
= true,
14 groups
= {snappy
=3,flammable
=3,attached_node
=1},
15 sounds
= default
.node_sound_leaves_defaults(),
18 fixed
= {-6/16, -0.5, -6/16, 6/16, 4/16, 6/16},
23 minetest
.register_node("default:grass_1", {
24 description
= "Grass",
25 drawtype
= "plantlike",
26 tiles
= {"default_grass_1.png"},
27 -- use a bigger inventory image
28 inventory_image
= "default_grass_3.png",
29 wield_image
= "default_grass_3.png",
32 is_ground_content
= true,
34 groups
= {snappy
=3,flammable
=3,flora
=1,grass
=1,attached_node
=1},
35 sounds
= default
.node_sound_leaves_defaults(),
38 fixed
= {-6/16, -0.5, -6/16, 6/16, -5/16, 6/16},
40 on_place
= function(itemstack
, placer
, pointed_thing
)
41 -- place a random grass node
42 local stack
= ItemStack("default:grass_"..math
.random(1,5))
43 local ret
= minetest
.item_place(stack
, placer
, pointed_thing
)
44 return ItemStack("default:grass_1 "..itemstack
:get_count()-(1-ret
:get_count()))
49 minetest
.register_node("default:grass_"..i
, {
50 description
= "Grass",
51 drawtype
= "plantlike",
52 tiles
= {"default_grass_"..i
..".png"},
53 inventory_image
= "default_grass_"..i
..".png",
54 wield_image
= "default_grass_"..i
..".png",
58 is_ground_content
= true,
59 drop
= "default:grass_1",
60 groups
= {snappy
=3,flammable
=3,flora
=1,grass
=1,attached_node
=1,not_in_creative_inventory
=1},
61 sounds
= default
.node_sound_leaves_defaults(),
64 fixed
= {-6/16, -0.5, -6/16, 6/16, -3/16, 6/16},
69 minetest
.register_node("default:junglegrass", {
70 description
= "Jungle Grass",
71 drawtype
= "plantlike",
73 tiles
= {"default_junglegrass.png"},
74 inventory_image
= "default_junglegrass.png",
75 wield_image
= "default_junglegrass.png",
79 is_ground_content
= true,
80 groups
= {snappy
=3,flammable
=2,flora
=1,grass
=1,attached_node
=1},
81 sounds
= default
.node_sound_leaves_defaults(),
84 fixed
= {-7/16, -0.5, -7/16, 7/16, 0.9, 7/16},
88 minetest
.register_node("default:snag", {
90 tiles
= {"default_tree.png", "default_tree.png", "default_tree.png"},
92 -- paramtype2 = "facedir",
93 is_ground_content
= true,
98 {-0.03125, -0.5, -0.03125, 0.03125, -0.0625, 0.03125},
99 {0.03125, -0.15625, -0.03125, 0.09375, -0.09375, 0.03125},
100 {0.0625, -0.1875, -0.03125, 0.125, 0.0625, 0.03125},
101 {-0.09375, -0.21875, -0.03125, -0.03125, -0.15625, 0.03125},
102 {-0.15625, -0.25, -0.03125, -0.09375, -0.125, 0.03125},
103 {-0.03125, -0.34375, 0.03125, 0.03125, -0.28125, 0.09375},
104 {-0.03125, -0.46875, -0.09375, 0.03125, -0.40625, -0.03125},
105 {-0.03125, -0.375, 0.09375, 0.03125, -0.25, 0.15625},
108 groups
= {choppy
=2,oddly_breakable_by_hand
=1,flammable
=2},
113 -- player will get sapling with 1/5 chance
114 items
= {'default:snag'},
118 -- player will get wood only if he get no saplings,
119 -- this is because max_items is 1
120 items
= {'default:wood'},
124 sounds
= default
.node_sound_wood_defaults(),
125 on_place
= minetest
.rotate_node
128 minetest
.register_node("default:cactus", {
129 description
= "Cactus",
130 tiles
= {"default_cactus_top.png", "default_cactus_top.png", "default_cactus_side.png"},
132 paramtype2
= "facedir",
133 is_ground_content
= true,
134 drawtype
= "nodebox",
138 {-0.35,-0.5,-0.4,0.35,0.5,0.4},
139 {-0.4,-0.5,-0.35, 0.4,0.5,0.35},
140 {-0.25,-0.5,-0.45,0.25,0.5,0.45},
141 {-0.45,-0.5,-0.25, 0.45,0.5,0.25},
142 {-0.15,-0.5,-0.5,0.15,0.5,0.5},
143 {-0.5,-0.5,-0.15, 0.5,0.5,0.15},
146 groups
= {snappy
=1,choppy
=3,flammable
=2},
147 sounds
= default
.node_sound_wood_defaults(),
148 on_place
= minetest
.rotate_node
151 minetest
.register_node("default:cactus_block", {
152 description
= "Cactus Block",
153 tiles
= {"default_cactus_block.png"},
154 is_ground_content
= false,
155 groups
= {choppy
=3,flammable
=2},
156 sounds
= default
.node_sound_wood_defaults(),
159 minetest
.register_node("default:cactus_brick", {
160 description
= "Cactus Brick",
161 tiles
= {"default_cactus_brick.png"},
162 is_ground_content
= false,
163 groups
= {choppy
=3,flammable
=2},
164 sounds
= default
.node_sound_wood_defaults(),
167 minetest
.register_node("default:glowing_cactus_block", {
168 description
= "Glowing Cactus Block",
169 tiles
= {"default_cactus_block.png"},
170 is_ground_content
= false,
172 groups
= {choppy
=3,flammable
=2},
173 sounds
= default
.node_sound_wood_defaults(),
176 minetest
.register_node("default:papyrus", {
177 description
= "Papyrus",
178 drawtype
= "nodebox",
180 "default_papyrus_3d.png",
181 "default_papyrus_3d.png",
182 "default_papyrus_3d_s1.png",
183 "default_papyrus_3d_s1.png",
184 "default_papyrus_3d_s2.png",
185 "default_papyrus_3d_s2.png",
187 inventory_image
= "default_papyrus.png",
188 wield_image
= "default_papyrus.png",
190 is_ground_content
= true,
194 fixed
= {-0.4375, -0.5, -0.4375, 0.4375, 0.5, 0.4375}
200 {-0.03-0.1,-0.5,-0.03-0.1, 0.03-0.1,0.5,0.03-0.1},
201 {-0.06-0.1,-0.02-0.1,-0.06-0.1, 0.06-0.1,0.02-0.1,0.06-0.1},
203 {-0.03-0.4,-0.5,-0.03-0.3, 0.03-0.4,0.5,0.03-0.3},
204 {-0.06-0.4,-0.02-0.2,-0.06-0.3, 0.06-0.4,0.02-0.2,0.06-0.3},
206 {-0.03+0.4,-0.5,-0.03-0.3,0.03+0.4,0.5,0.03-0.3},
207 {-0.06+0.4,-0.02+0.2,-0.06-0.3, 0.06+0.4,0.02+0.2,0.06-0.3},
209 {-0.03-0.4,-0.5,-0.03+0.4, 0.03-0.4,0.5,0.03+0.4},
210 {-0.06-0.4,0.02+0.4,-0.06+0.4, 0.06-0.4,0.02+0.4,0.06+0.4},
212 {-0.03-0.2,-0.5,-0.03+0.2, 0.03-0.2,0.5,0.03+0.2},
213 {-0.06-0.2,0.02-0.4,-0.06+0.2, 0.06-0.2,0.02-0.4,0.06+0.2},
215 {-0.03+0.1,-0.5,-0.03+0.2, 0.03+0.1,0.5,0.03+0.2},
216 {-0.06+0.1,0.02+0.3,-0.06+0.2, 0.06+0.1,0.02+0.3,0.06+0.2},
219 groups
= {snappy
= 3,flammable
= 2},
220 sounds
= default
.node_sound_leaves_defaults(),
222 after_dig_node
= function(pos
, node
, metadata
, digger
)
223 default
.dig_up(pos
, node
, digger
)
227 minetest
.register_node("default:sugarcane", {
228 description
= "Sugarcane",
229 drawtype
= "plantlike",
230 tiles
= {"default_sugarcane.png"},
231 inventory_image
= "default_sugarcane.png",
232 wield_image
= "default_sugarcane.png",
235 is_ground_content
= true,
238 fixed
= {-0.3, -0.5, -0.3, 0.3, 0.5, 0.3}
240 groups
= {snappy
=3,flammable
=2},
241 sounds
= default
.node_sound_leaves_defaults(),
243 after_dig_node
= function(pos
, node
, metadata
, digger
)
244 default
.dig_up(pos
, node
, digger
)