Cake+cauldron+endportalfr. put signal 4 comparator
[MineClone/MineClone2.git] / mods / ITEMS / mcl_nether / init.lua
blobb0bb771a1d5ec0a201e4cb0c86ce5470a6087b85
1 minetest.register_node("mcl_nether:glowstone", {
2 description = "Glowstone",
3 _doc_items_longdesc = "Glowstone is a naturally-glowing block which is home to the Nether.",
4 tiles = {"mcl_nether_glowstone.png"},
5 is_ground_content = true,
6 stack_max = 64,
7 groups = {handy=1,building_block=1, material_glass=1},
8 drop = {
9 max_items = 1,
10 items = {
11 {items = {'mcl_nether:glowstone_dust 4'},rarity = 3},
12 {items = {'mcl_nether:glowstone_dust 3'},rarity = 3},
13 {items = {'mcl_nether:glowstone_dust 2'}},
16 paramtype = "light",
17 -- Real light level: 15 (but Minetest caps at 14)
18 light_source = 14,
19 sounds = mcl_sounds.node_sound_glass_defaults(),
20 _mcl_blast_resistance = 1.5,
21 _mcl_hardness = 0.3,
24 minetest.register_node("mcl_nether:quartz_ore", {
25 description = "Nether Quartz Ore",
26 _doc_items_longdesc = "Nether quartz ore is an ore containing nether quartz. It is commonly found around netherrack in the Nether.",
27 stack_max = 64,
28 tiles = {"mcl_nether_quartz_ore.png"},
29 is_ground_content = true,
30 groups = {pickaxey=1, building_block=1, material_stone=1},
31 drop = 'mcl_nether:quartz',
32 sounds = mcl_sounds.node_sound_stone_defaults(),
33 _mcl_blast_resistance = 15,
34 _mcl_hardness = 3,
37 -- For eternal fire on top of netherrack and magma blocks
38 -- (this code does not require a dependency on mcl_fire)
39 local eternal_after_destruct = function(pos, oldnode)
40 pos.y = pos.y + 1
41 if minetest.get_node(pos).name == "mcl_fire:eternal_fire" then
42 minetest.remove_node(pos)
43 end
44 end
45 local eternal_on_ignite = function(player, pointed_thing)
46 local pos = pointed_thing.under
47 local flame_pos = {x = pos.x, y = pos.y + 1, z = pos.z}
48 local fn = minetest.get_node(flame_pos)
49 if fn.name == "air" and not minetest.is_protected(flame_pos, "fire") and pointed_thing.under.y < pointed_thing.above.y then
50 minetest.set_node(flame_pos, {name = "mcl_fire:eternal_fire"})
51 return true
52 else
53 return false
54 end
55 end
57 minetest.register_node("mcl_nether:netherrack", {
58 description = "Netherrack",
59 _doc_items_longdesc = "Netherrack is a stone-like block home to the Nether. Starting a fire on this block will create an eternal fire.",
60 stack_max = 64,
61 tiles = {"mcl_nether_netherrack.png"},
62 is_ground_content = true,
63 groups = {pickaxey=1, building_block=1, material_stone=1, enderman_takable=1},
64 sounds = mcl_sounds.node_sound_stone_defaults(),
65 _mcl_blast_resistance = 2,
66 _mcl_hardness = 0.4,
68 -- Eternal fire on top
69 after_destruct = eternal_after_destruct,
70 _on_ignite = eternal_on_ignite,
73 minetest.register_node("mcl_nether:magma", {
74 description = "Magma Block",
75 _doc_items_longdesc = "Magma blocks are hot solid blocks which hurt anyone standing on it, unless they have fire resistance. Starting a fire on this block will create an eternal fire.",
76 stack_max = 64,
77 tiles = {{name="mcl_nether_magma.png", animation={type="vertical_frames", aspect_w=32, aspect_h=32, length=1.5}}},
78 is_ground_content = true,
79 light_source = 3,
80 sunlight_propagates = false,
81 groups = {pickaxey=1, building_block=1, material_stone=1},
82 sounds = mcl_sounds.node_sound_stone_defaults(),
83 -- From walkover mod
84 on_walk_over = function(loc, nodeiamon, player)
85 -- Hurt players standing on top of this block
86 if player:get_hp() > 0 then
87 mcl_death_messages.player_damage(player, string.format("%s stood too long on a magma block.", player:get_player_name()))
88 player:set_hp(player:get_hp() - 1)
89 end
90 end,
91 _mcl_blast_resistance = 2.5,
92 _mcl_hardness = 0.5,
94 -- Eternal fire on top
95 after_destruct = eternal_after_destruct,
96 _on_ignite = eternal_on_ignite,
99 minetest.register_node("mcl_nether:soul_sand", {
100 description = "Soul Sand",
101 _doc_items_longdesc = "Soul sand is a block from the Nether. One can only slowly walk on soul sand. The slowing effect is amplified when the soul sand is on top of ice, packed ice or a slime block.",
102 stack_max = 64,
103 tiles = {"mcl_nether_soul_sand.png"},
104 is_ground_content = true,
105 groups = {handy=1,shovely=1, building_block=1,soil_nether_wart=1, material_sand=1},
106 collision_box = {
107 type = "fixed",
108 fixed = { -0.5, -0.5, -0.5, 0.5, 0.5 - 2/16, 0.5 },
110 sounds = mcl_sounds.node_sound_sand_defaults(),
111 _mcl_blast_resistance = 2.5,
112 _mcl_hardness = 0.5,
113 -- Movement handling is done in mcl_playerplus mod
116 minetest.register_node("mcl_nether:nether_brick", {
117 -- Original name: Nether Brick
118 description = "Nether Brick Block",
119 _doc_items_longdesc = doc.sub.items.temp.build,
120 stack_max = 64,
121 tiles = {"mcl_nether_nether_brick.png"},
122 is_ground_content = false,
123 groups = {pickaxey=1, building_block=1, material_stone=1},
124 sounds = mcl_sounds.node_sound_stone_defaults(),
125 _mcl_blast_resistance = 30,
126 _mcl_hardness = 2,
129 minetest.register_node("mcl_nether:red_nether_brick", {
130 -- Original name: Red Nether Brick
131 description = "Red Nether Brick Block",
132 _doc_items_longdesc = doc.sub.items.temp.build,
133 stack_max = 64,
134 tiles = {"mcl_nether_red_nether_brick.png"},
135 is_ground_content = false,
136 groups = {pickaxey=1, building_block=1, material_stone=1},
137 sounds = mcl_sounds.node_sound_stone_defaults(),
138 _mcl_blast_resistance = 30,
139 _mcl_hardness = 2,
143 minetest.register_node("mcl_nether:nether_wart_block", {
144 description = "Nether Wart Block",
145 _doc_items_longdesc = "A nether wart block is a purely decorational block made from nether wart.",
146 stack_max = 64,
147 tiles = {"mcl_nether_nether_wart_block.png"},
148 is_ground_content = false,
149 groups = {handy=1, building_block=1},
150 sounds = mcl_sounds.node_sound_leaves_defaults(
152 footstep={name="default_dirt_footstep", gain=0.7},
153 dug={name="default_dirt_footstep", gain=1.5},
156 _mcl_blast_resistance = 5,
157 _mcl_hardness = 1,
160 minetest.register_node("mcl_nether:quartz_block", {
161 description = "Block of Quartz",
162 _doc_items_longdesc = doc.sub.items.temp.build,
163 stack_max = 64,
164 is_ground_content = false,
165 tiles = {"mcl_nether_quartz_block_top.png", "mcl_nether_quartz_block_bottom.png", "mcl_nether_quartz_block_side.png"},
166 groups = {pickaxey=1, quartz_block=1,building_block=1, material_stone=1},
167 sounds = mcl_sounds.node_sound_stone_defaults(),
168 _mcl_blast_resistance = 4,
169 _mcl_hardness = 0.8,
172 minetest.register_node("mcl_nether:quartz_chiseled", {
173 description = "Chiseled Quartz Block",
174 _doc_items_longdesc = doc.sub.items.temp.build,
175 stack_max = 64,
176 is_ground_content = false,
177 tiles = {"mcl_nether_quartz_chiseled_top.png", "mcl_nether_quartz_chiseled_top.png", "mcl_nether_quartz_chiseled_side.png"},
178 groups = {pickaxey=1, quartz_block=1,building_block=1, material_stone=1},
179 sounds = mcl_sounds.node_sound_stone_defaults(),
180 _mcl_blast_resistance = 4,
181 _mcl_hardness = 0.8,
184 minetest.register_node("mcl_nether:quartz_pillar", {
185 description = "Pillar Quartz Block",
186 _doc_items_longdesc = doc.sub.items.temp.build,
187 stack_max = 64,
188 paramtype2 = "facedir",
189 is_ground_content = false,
190 on_place = mcl_util.rotate_axis,
191 tiles = {"mcl_nether_quartz_pillar_top.png", "mcl_nether_quartz_pillar_top.png", "mcl_nether_quartz_pillar_side.png"},
192 groups = {pickaxey=1, quartz_block=1,building_block=1, material_stone=1},
193 sounds = mcl_sounds.node_sound_stone_defaults(),
194 _mcl_blast_resistance = 4,
195 _mcl_hardness = 0.8,
197 minetest.register_node("mcl_nether:quartz_smooth", {
198 description = "Smooth Quartz",
199 _doc_items_longdesc = doc.sub.items.temp.build,
200 stack_max = 64,
201 is_ground_content = false,
202 tiles = {"mcl_nether_quartz_block_bottom.png"},
203 groups = {pickaxey=1, quartz_block=1,building_block=1, material_stone=1},
204 sounds = mcl_sounds.node_sound_stone_defaults(),
205 _mcl_blast_resistance = 4,
206 _mcl_hardness = 0.8,
209 minetest.register_craftitem("mcl_nether:glowstone_dust", {
210 description = "Glowstone Dust",
211 _doc_items_longdesc = "Glowstone dust is the dust which comes out of broken glowstones. It is mainly used in crafting.",
212 inventory_image = "mcl_nether_glowstone_dust.png",
213 stack_max = 64,
214 groups = { craftitem=1 },
217 minetest.register_craftitem("mcl_nether:quartz", {
218 description = "Nether Quartz",
219 _doc_items_longdesc = "Nether quartz is a versatile crafting ingredient.",
220 inventory_image = "mcl_nether_quartz.png",
221 stack_max = 64,
222 groups = { craftitem = 1 },
225 minetest.register_craftitem("mcl_nether:netherbrick", {
226 description = "Nether Brick",
227 _doc_items_longdesc = "Nether bricks are the main crafting ingredient for crafting nether brick blocks and nether fences.",
228 inventory_image = "mcl_nether_netherbrick.png",
229 stack_max = 64,
230 groups = { craftitem = 1 },
233 minetest.register_craft({
234 type = "cooking",
235 output = "mcl_nether:quartz",
236 recipe = "mcl_nether:quartz_ore",
237 cooktime = 10,
240 minetest.register_craft({
241 output = 'mcl_nether:quartz_block',
242 recipe = {
243 {'mcl_nether:quartz', 'mcl_nether:quartz'},
244 {'mcl_nether:quartz', 'mcl_nether:quartz'},
248 minetest.register_craft({
249 output = 'mcl_nether:quartz_pillar 2',
250 recipe = {
251 {'mcl_nether:quartz_block'},
252 {'mcl_nether:quartz_block'},
256 minetest.register_craft({
257 output = "mcl_nether:glowstone",
258 recipe = {
259 {'mcl_nether:glowstone_dust', 'mcl_nether:glowstone_dust'},
260 {'mcl_nether:glowstone_dust', 'mcl_nether:glowstone_dust'},
264 minetest.register_craft({
265 output = "mcl_nether:magma",
266 recipe = {
267 {'mcl_mobitems:magma_cream', 'mcl_mobitems:magma_cream'},
268 {'mcl_mobitems:magma_cream', 'mcl_mobitems:magma_cream'},
272 minetest.register_craft({
273 type = "cooking",
274 output = "mcl_nether:netherbrick",
275 recipe = "mcl_nether:netherrack",
276 cooktime = 10,
279 minetest.register_craft({
280 output = "mcl_nether:nether_brick",
281 recipe = {
282 {'mcl_nether:netherbrick', 'mcl_nether:netherbrick'},
283 {'mcl_nether:netherbrick', 'mcl_nether:netherbrick'},
287 minetest.register_craft({
288 output = "mcl_nether:red_nether_brick",
289 recipe = {
290 {'mcl_nether:nether_wart_item', 'mcl_nether:netherbrick'},
291 {'mcl_nether:netherbrick', 'mcl_nether:nether_wart_item'},
294 minetest.register_craft({
295 output = "mcl_nether:red_nether_brick",
296 recipe = {
297 {'mcl_nether:netherbrick', 'mcl_nether:nether_wart_item'},
298 {'mcl_nether:nether_wart_item', 'mcl_nether:netherbrick'},
302 minetest.register_craft({
303 output = "mcl_nether:nether_wart_block",
304 recipe = {
305 {'mcl_nether:nether_wart_item', 'mcl_nether:nether_wart_item', 'mcl_nether:nether_wart_item'},
306 {'mcl_nether:nether_wart_item', 'mcl_nether:nether_wart_item', 'mcl_nether:nether_wart_item'},
307 {'mcl_nether:nether_wart_item', 'mcl_nether:nether_wart_item', 'mcl_nether:nether_wart_item'},
311 dofile(minetest.get_modpath(minetest.get_current_modname()).."/nether_wart.lua")
312 dofile(minetest.get_modpath(minetest.get_current_modname()).."/lava.lua")