Move 3D papyrus to default
[minetest_hades/hades_revisited.git] / mods / default / plants.lua
blob451728cceeeecd8c6dec6e4361ca42184f0ee5fb
2 minetest.register_node("default:dry_shrub", {
3 description = "Dry Shrub",
4 drawtype = "plantlike",
5 visual_scale = 1.0,
6 tiles = {"default_dry_shrub.png"},
7 inventory_image = "default_dry_shrub.png",
8 wield_image = "default_dry_shrub.png",
9 paramtype = "light",
10 waving = 1,
11 walkable = false,
12 is_ground_content = true,
13 buildable_to = true,
14 groups = {snappy=3,flammable=3,attached_node=1},
15 sounds = default.node_sound_leaves_defaults(),
16 selection_box = {
17 type = "fixed",
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",
30 paramtype = "light",
31 walkable = false,
32 is_ground_content = true,
33 buildable_to = true,
34 groups = {snappy=3,flammable=3,flora=1,grass=1,attached_node=1},
35 sounds = default.node_sound_leaves_defaults(),
36 selection_box = {
37 type = "fixed",
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()))
45 end,
48 for i=2,5 do
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",
55 paramtype = "light",
56 walkable = false,
57 buildable_to = true,
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(),
62 selection_box = {
63 type = "fixed",
64 fixed = {-6/16, -0.5, -6/16, 6/16, -3/16, 6/16},
67 end
69 minetest.register_node("default:junglegrass", {
70 description = "Jungle Grass",
71 drawtype = "plantlike",
72 visual_scale = 1.3,
73 tiles = {"default_junglegrass.png"},
74 inventory_image = "default_junglegrass.png",
75 wield_image = "default_junglegrass.png",
76 paramtype = "light",
77 walkable = false,
78 buildable_to = true,
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(),
82 selection_box = {
83 type = "fixed",
84 fixed = {-7/16, -0.5, -7/16, 7/16, 0.9, 7/16},
88 minetest.register_node("default:snag", {
89 description = "Snag",
90 tiles = {"default_tree.png", "default_tree.png", "default_tree.png"},
91 paramtype = "light",
92 -- paramtype2 = "facedir",
93 is_ground_content = true,
94 drawtype = "nodebox",
95 node_box = {
96 type = "fixed",
97 fixed = {
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},
109 drop = {
110 max_items = 1,
111 items = {
113 -- player will get sapling with 1/5 chance
114 items = {'default:snag'},
115 rarity = 5,
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"},
131 paramtype = "light",
132 paramtype2 = "facedir",
133 is_ground_content = true,
134 drawtype = "nodebox",
135 node_box = {
136 type = "fixed",
137 fixed = {
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,
171 light_source = 5,
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",
179 tiles = {
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",
189 paramtype = "light",
190 is_ground_content = true,
191 walkable = false,
192 selection_box = {
193 type = "fixed",
194 fixed = {-0.4375, -0.5, -0.4375, 0.4375, 0.5, 0.4375}
196 node_box = {
197 type = "fixed",
198 fixed = {
199 --papyrus 1
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},
202 --papyrus 2
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},
205 --papyrus 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},
208 --papyrus 4
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},
211 --papyrus 5
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},
214 --papyrus 6
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)
224 end,
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",
233 paramtype = "light",
234 walkable = false,
235 is_ground_content = true,
236 selection_box = {
237 type = "fixed",
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)
245 end,