2015-06-29 20:55:56 +03:00
-- mods/default/nodes.lua
2017-05-22 21:58:57 +03:00
local WATER_ALPHA = 179
2017-01-27 14:45:21 +02:00
local WATER_VISC = 1
local LAVA_VISC = 7
2015-06-29 20:55:56 +03:00
--
-- Node definitions
--
2017-02-01 00:32:56 +02:00
minetest.register_node ( " mcl_core:barrier " , {
2017-01-04 10:57:20 +02:00
description = " Barrier " ,
2017-03-02 22:55:25 +02:00
_doc_items_longdesc = " Barriers are invisble walkable blocks. They are used to create boundaries of adventure maps and the like. Monsters and animals won't appear on barriers, and fences do not connect to barriers. Other blocks can be built on barriers like on any other block. " ,
_doc_items_usagehelp = " When you hold a barrier in hand, you reveal all placed barriers in a short distance around you. " ,
2017-01-04 10:57:20 +02:00
drawtype = " airlike " ,
paramtype = " light " ,
2017-05-26 02:06:54 +03:00
inventory_image = " mcl_core_barrier.png " ,
wield_image = " mcl_core_barrier.png " ,
2017-03-02 23:55:07 +02:00
tiles = { " blank.png " } ,
2017-01-04 10:57:20 +02:00
stack_max = 64 ,
sunlight_propagates = true ,
is_ground_content = false ,
2017-02-25 17:19:24 +02:00
groups = { creative_breakable = 1 , not_in_creative_inventory = 1 , not_solid = 1 } ,
2017-01-04 10:57:20 +02:00
on_blast = function ( ) end ,
2017-02-21 17:25:41 +02:00
drop = " " ,
2017-02-22 16:40:22 +02:00
_mcl_blast_resistance = 18000003 ,
2017-02-24 16:56:46 +02:00
_mcl_hardness = - 1 ,
2017-02-24 07:24:16 +02:00
after_place_node = function ( pos , placer , itemstack , pointed_thing )
if placer == nil then
return
end
minetest.add_particle ( {
pos = pos ,
expirationtime = 1 ,
size = 8 ,
2017-05-26 02:06:54 +03:00
texture = " mcl_core_barrier.png " ,
2017-02-24 07:24:16 +02:00
playername = placer : get_player_name ( )
} )
end ,
2017-01-04 10:57:20 +02:00
} )
2017-05-23 01:52:31 +03:00
-- The void below the bedrock. Void damage is handled in mcl_playerplus.
2017-02-22 16:40:22 +02:00
-- The void does not exist as a block in Minecraft but we register it as a
-- block here to make things easier for us.
2017-02-20 07:56:17 +02:00
minetest.register_node ( " mcl_core:void " , {
2017-02-20 07:24:04 +02:00
description = " Void " ,
2017-03-02 20:53:53 +02:00
_doc_items_create_entry = false ,
2017-02-20 07:24:04 +02:00
drawtype = " airlike " ,
paramtype = " light " ,
pointable = false ,
walkable = false ,
floodable = false ,
buildable_to = false ,
2017-03-21 21:01:30 +02:00
inventory_image = " mcl_core_void.png " ,
wield_image = " mcl_core_void.png " ,
2017-02-20 07:24:04 +02:00
stack_max = 64 ,
sunlight_propagates = true ,
is_ground_content = false ,
groups = { not_in_creative_inventory = 1 } ,
on_blast = function ( ) end ,
2017-02-21 17:25:41 +02:00
drop = " " ,
2017-02-22 16:40:22 +02:00
-- Infinite blast resistance; it should never be destroyed by explosions
_mcl_blast_resistance = - 1 ,
2017-02-24 16:56:46 +02:00
_mcl_hardness = - 1 ,
2017-02-20 07:24:04 +02:00
} )
2017-02-01 00:32:56 +02:00
minetest.register_node ( " mcl_core:stone " , {
2015-06-29 20:55:56 +03:00
description = " Stone " ,
2017-03-14 06:59:58 +02:00
_doc_items_longdesc = " One of the most common blocks in the world, almost the entire underground consists of stone. It sometimes contains ores. Stone may be created when water meets lava. " ,
2017-03-20 17:38:16 +02:00
_doc_items_hidden = false ,
2015-06-29 20:55:56 +03:00
tiles = { " default_stone.png " } ,
is_ground_content = true ,
stack_max = 64 ,
2017-03-11 06:34:58 +02:00
groups = { pickaxey = 1 , stone = 1 , building_block = 1 , deco_block = 1 , material_stone = 1 } ,
2017-02-01 00:32:56 +02:00
drop = ' mcl_core:cobble ' ,
2017-02-11 19:46:23 +02:00
sounds = mcl_sounds.node_sound_stone_defaults ( ) ,
2017-02-22 16:40:22 +02:00
_mcl_blast_resistance = 30 ,
2017-02-24 16:56:46 +02:00
_mcl_hardness = 1.5 ,
2015-06-29 20:55:56 +03:00
} )
2017-02-01 00:32:56 +02:00
minetest.register_node ( " mcl_core:stone_with_coal " , {
2015-06-29 20:55:56 +03:00
description = " Coal Ore " ,
2017-03-10 23:27:27 +02:00
_doc_items_longdesc = " Some coal contained in stone, it is very common and can be found inside stone in medium to large clusters at nearly every height. " ,
2017-03-20 17:38:16 +02:00
_doc_items_hidden = false ,
2017-05-26 02:06:54 +03:00
tiles = { " mcl_core_coal_ore.png " } ,
2015-06-29 20:55:56 +03:00
is_ground_content = true ,
stack_max = 64 ,
2017-03-11 06:34:58 +02:00
groups = { pickaxey = 1 , building_block = 1 , material_stone = 1 } ,
2017-02-01 00:32:56 +02:00
drop = ' mcl_core:coal_lump ' ,
2017-02-11 19:46:23 +02:00
sounds = mcl_sounds.node_sound_stone_defaults ( ) ,
2017-02-22 16:40:22 +02:00
_mcl_blast_resistance = 15 ,
2017-02-24 16:56:46 +02:00
_mcl_hardness = 3 ,
2015-06-29 20:55:56 +03:00
} )
2017-02-01 00:32:56 +02:00
minetest.register_node ( " mcl_core:stone_with_iron " , {
2015-06-29 20:55:56 +03:00
description = " Iron Ore " ,
2017-03-10 23:27:27 +02:00
_doc_items_longdesc = " Some iron contained in stone, it is prety common and can be found below sea level. " ,
2017-05-26 02:06:54 +03:00
tiles = { " mcl_core_iron_ore.png " } ,
2015-06-29 20:55:56 +03:00
is_ground_content = true ,
stack_max = 64 ,
2017-03-11 06:34:58 +02:00
groups = { pickaxey = 3 , building_block = 1 , material_stone = 1 } ,
2017-02-01 00:32:56 +02:00
drop = ' mcl_core:stone_with_iron ' ,
2017-02-11 19:46:23 +02:00
sounds = mcl_sounds.node_sound_stone_defaults ( ) ,
2017-02-22 16:40:22 +02:00
_mcl_blast_resistance = 15 ,
2017-02-24 16:56:46 +02:00
_mcl_hardness = 3 ,
2015-06-29 20:55:56 +03:00
} )
2017-02-01 00:32:56 +02:00
minetest.register_node ( " mcl_core:stone_with_gold " , {
2015-06-29 20:55:56 +03:00
description = " Gold Ore " ,
2017-03-10 23:27:27 +02:00
_doc_items_longdesc = " This stone contains pure gold, a rare metal. " ,
2017-05-26 02:06:54 +03:00
tiles = { " mcl_core_gold_ore.png " } ,
2015-06-29 20:55:56 +03:00
is_ground_content = true ,
stack_max = 64 ,
2017-03-11 06:34:58 +02:00
groups = { pickaxey = 4 , building_block = 1 , material_stone = 1 } ,
2017-02-01 00:32:56 +02:00
drop = " mcl_core:stone_with_gold " ,
2017-02-11 19:46:23 +02:00
sounds = mcl_sounds.node_sound_stone_defaults ( ) ,
2017-02-22 16:40:22 +02:00
_mcl_blast_resistance = 15 ,
2017-02-24 16:56:46 +02:00
_mcl_hardness = 3 ,
2015-06-29 20:55:56 +03:00
} )
2017-01-04 11:27:12 +02:00
local redstone_timer = 68.28
2017-01-13 00:58:42 +02:00
local redstone_ore_activate = function ( pos )
2017-02-01 00:32:56 +02:00
minetest.swap_node ( pos , { name = " mcl_core:stone_with_redstone_lit " } )
2017-01-13 00:58:42 +02:00
local t = minetest.get_node_timer ( pos )
t : start ( redstone_timer )
end
2017-02-01 00:32:56 +02:00
minetest.register_node ( " mcl_core:stone_with_redstone " , {
2015-06-29 20:55:56 +03:00
description = " Redstone Ore " ,
2017-03-10 23:27:27 +02:00
_doc_items_longdesc = " Redstone ore is commonly found near the bottom of the world. It glows when it is punched or walked upon. " ,
2017-05-26 02:06:54 +03:00
tiles = { " mcl_core_redstone_ore.png " } ,
2015-06-29 20:55:56 +03:00
is_ground_content = true ,
stack_max = 64 ,
2017-03-11 06:34:58 +02:00
groups = { pickaxey = 4 , building_block = 1 , material_stone = 1 } ,
2017-01-04 09:01:40 +02:00
drop = {
items = {
max_items = 1 ,
{
2017-01-09 19:45:34 +02:00
items = { " mesecons:redstone 4 " } ,
2017-01-04 09:01:40 +02:00
rarity = 2 ,
} ,
{
2017-01-09 19:45:34 +02:00
items = { " mesecons:redstone 5 " } ,
2017-01-04 09:01:40 +02:00
} ,
}
} ,
2017-02-11 19:46:23 +02:00
sounds = mcl_sounds.node_sound_stone_defaults ( ) ,
2017-01-13 00:58:42 +02:00
on_punch = redstone_ore_activate ,
on_walk_over = redstone_ore_activate , -- Uses walkover mod
2017-02-22 16:40:22 +02:00
_mcl_blast_resistance = 15 ,
2017-02-24 16:56:46 +02:00
_mcl_hardness = 3 ,
2017-01-04 11:27:12 +02:00
} )
2017-01-13 00:58:42 +02:00
local redstone_ore_reactivate = function ( pos )
local t = minetest.get_node_timer ( pos )
t : start ( redstone_timer )
end
2017-01-04 11:27:12 +02:00
-- Light the redstone ore up when it has been touched
2017-02-01 00:32:56 +02:00
minetest.register_node ( " mcl_core:stone_with_redstone_lit " , {
2017-01-04 11:27:12 +02:00
description = " Lit Redstone Ore " ,
2017-03-02 20:53:53 +02:00
_doc_items_create_entry = false ,
2017-05-26 02:06:54 +03:00
tiles = { " mcl_core_redstone_ore.png " } ,
2017-01-04 11:27:12 +02:00
paramtype = " light " ,
2017-02-01 23:12:08 +02:00
light_source = 9 ,
2017-01-04 11:27:12 +02:00
is_ground_content = true ,
stack_max = 64 ,
2017-03-11 06:34:58 +02:00
groups = { pickaxey = 4 , not_in_creative_inventory = 1 , material_stone = 1 } ,
2017-01-04 11:27:12 +02:00
drop = {
items = {
max_items = 1 ,
{
2017-01-09 19:45:34 +02:00
items = { " mesecons:redstone 4 " } ,
2017-01-04 11:27:12 +02:00
rarity = 2 ,
} ,
{
2017-01-09 19:45:34 +02:00
items = { " mesecons:redstone 5 " } ,
2017-01-04 11:27:12 +02:00
} ,
}
} ,
2017-02-11 19:46:23 +02:00
sounds = mcl_sounds.node_sound_stone_defaults ( ) ,
2017-01-13 00:58:42 +02:00
-- Reset timer after re-punching or stepping on
on_punch = redstone_ore_reactivate ,
on_walk_over = redstone_ore_reactivate , -- Uses walkover mod
2017-01-04 11:27:12 +02:00
-- Turn back to normal node after some time has passed
on_timer = function ( pos , elapsed )
2017-02-01 00:32:56 +02:00
minetest.swap_node ( pos , { name = " mcl_core:stone_with_redstone " } )
2017-01-04 11:27:12 +02:00
end ,
2017-02-22 16:40:22 +02:00
_mcl_blast_resistance = 15 ,
2017-02-24 16:56:46 +02:00
_mcl_hardness = 3 ,
2015-06-29 20:55:56 +03:00
} )
2017-02-01 00:32:56 +02:00
minetest.register_node ( " mcl_core:stone_with_lapis " , {
2015-06-29 20:55:56 +03:00
description = " Lapis Lazuli Ore " ,
2017-03-10 23:27:27 +02:00
_doc_items_longdesc = " Lapis lazuli ore is the ore of lapis lazuli. It can be rarely found in clusters near the bottom of the world. " ,
2017-05-26 02:06:54 +03:00
tiles = { " mcl_core_lapis_ore.png " } ,
2015-06-29 20:55:56 +03:00
is_ground_content = true ,
stack_max = 64 ,
2017-03-11 06:34:58 +02:00
groups = { pickaxey = 3 , building_block = 1 , material_stone = 1 } ,
2015-06-29 20:55:56 +03:00
drop = {
2017-01-04 09:01:40 +02:00
max_items = 1 ,
2015-06-29 20:55:56 +03:00
items = {
2017-01-30 16:33:04 +02:00
{ items = { ' mcl_dye:blue 8 ' } , rarity = 5 } ,
{ items = { ' mcl_dye:blue 7 ' } , rarity = 5 } ,
{ items = { ' mcl_dye:blue 6 ' } , rarity = 5 } ,
{ items = { ' mcl_dye:blue 5 ' } , rarity = 5 } ,
{ items = { ' mcl_dye:blue 4 ' } } ,
2015-06-29 20:55:56 +03:00
}
} ,
2017-02-11 19:46:23 +02:00
sounds = mcl_sounds.node_sound_stone_defaults ( ) ,
2017-02-22 16:40:22 +02:00
_mcl_blast_resistance = 15 ,
2017-02-24 16:56:46 +02:00
_mcl_hardness = 3 ,
2015-06-29 20:55:56 +03:00
} )
2017-02-01 00:32:56 +02:00
minetest.register_node ( " mcl_core:stone_with_emerald " , {
2015-06-29 20:55:56 +03:00
description = " Emerald Ore " ,
2017-03-10 23:27:27 +02:00
_doc_items_longdesc = " Emerald ore is the ore of emeralds. It is very rare and can be found alone, not in clusters. " ,
2017-05-26 02:06:54 +03:00
tiles = { " mcl_core_emerald_ore.png " } ,
2015-06-29 20:55:56 +03:00
is_ground_content = true ,
stack_max = 64 ,
2017-03-11 06:34:58 +02:00
groups = { pickaxey = 4 , building_block = 1 , material_stone = 1 } ,
2017-02-01 00:32:56 +02:00
drop = " mcl_core:emerald " ,
2017-02-11 19:46:23 +02:00
sounds = mcl_sounds.node_sound_stone_defaults ( ) ,
2017-02-22 16:40:22 +02:00
_mcl_blast_resistance = 15 ,
2017-02-24 16:56:46 +02:00
_mcl_hardness = 3 ,
2015-06-29 20:55:56 +03:00
} )
2017-02-01 00:32:56 +02:00
minetest.register_node ( " mcl_core:stone_with_diamond " , {
2017-01-04 07:20:13 +02:00
description = " Diamond Ore " ,
2017-03-10 23:27:27 +02:00
_doc_items_longdesc = " Diamond ore is rare and can be found in clusters near the bottom of the world. " ,
2017-05-26 02:06:54 +03:00
tiles = { " mcl_core_diamond_ore.png " } ,
2015-06-29 20:55:56 +03:00
is_ground_content = true ,
stack_max = 64 ,
2017-03-11 06:34:58 +02:00
groups = { pickaxey = 4 , building_block = 1 , material_stone = 1 } ,
2017-02-01 00:32:56 +02:00
drop = " mcl_core:diamond " ,
2017-02-11 19:46:23 +02:00
sounds = mcl_sounds.node_sound_stone_defaults ( ) ,
2017-02-22 16:40:22 +02:00
_mcl_blast_resistance = 15 ,
2017-02-24 16:56:46 +02:00
_mcl_hardness = 3 ,
2015-06-29 20:55:56 +03:00
} )
2017-02-01 00:32:56 +02:00
minetest.register_node ( " mcl_core:stonebrick " , {
2017-01-04 07:20:13 +02:00
description = " Stone Bricks " ,
2017-03-18 19:01:28 +02:00
_doc_items_longdesc = doc.sub . items.temp . build ,
2015-06-29 20:55:56 +03:00
tiles = { " default_stone_brick.png " } ,
stack_max = 64 ,
2017-03-11 06:34:58 +02:00
groups = { pickaxey = 1 , stone = 1 , stonebrick = 1 , building_block = 1 , deco_block = 1 , material_stone = 1 } ,
2017-02-11 19:46:23 +02:00
sounds = mcl_sounds.node_sound_stone_defaults ( ) ,
2017-03-11 17:36:05 +02:00
is_ground_content = false ,
2017-02-22 16:40:22 +02:00
_mcl_blast_resistance = 30 ,
2017-02-24 16:56:46 +02:00
_mcl_hardness = 1.5 ,
2015-06-29 20:55:56 +03:00
} )
2017-02-01 00:32:56 +02:00
minetest.register_node ( " mcl_core:stonebrickcarved " , {
2017-01-04 07:20:13 +02:00
description = " Chiseled Stone Bricks " ,
2017-03-18 19:01:28 +02:00
_doc_items_longdesc = doc.sub . items.temp . build ,
2017-05-26 02:06:54 +03:00
tiles = { " mcl_core_stonebrick_carved.png " } ,
2017-01-04 23:36:51 +02:00
is_ground_content = false ,
2015-06-29 20:55:56 +03:00
stack_max = 64 ,
2017-03-11 06:34:58 +02:00
groups = { pickaxey = 1 , stone = 1 , stonebrick = 1 , building_block = 1 , deco_block = 1 , material_stone = 1 } ,
2017-02-11 19:46:23 +02:00
sounds = mcl_sounds.node_sound_stone_defaults ( ) ,
2017-03-11 17:36:05 +02:00
is_ground_content = false ,
2017-02-22 16:40:22 +02:00
_mcl_blast_resistance = 30 ,
2017-02-24 16:56:46 +02:00
_mcl_hardness = 1.5 ,
2015-06-29 20:55:56 +03:00
} )
2017-02-01 00:32:56 +02:00
minetest.register_node ( " mcl_core:stonebrickcracked " , {
2017-01-04 07:20:13 +02:00
description = " Cracked Stone Bricks " ,
2017-03-18 19:01:28 +02:00
_doc_items_longdesc = doc.sub . items.temp . build ,
2017-05-26 02:06:54 +03:00
tiles = { " mcl_core_stonebrick_cracked.png " } ,
2017-01-04 23:36:51 +02:00
is_ground_content = false ,
2015-06-29 20:55:56 +03:00
stack_max = 64 ,
2017-03-11 06:34:58 +02:00
groups = { pickaxey = 1 , stone = 1 , stonebrick = 1 , building_block = 1 , deco_block = 1 , material_stone = 1 } ,
2017-02-11 19:46:23 +02:00
sounds = mcl_sounds.node_sound_stone_defaults ( ) ,
2017-03-11 17:36:05 +02:00
is_ground_content = false ,
2017-02-22 16:40:22 +02:00
_mcl_blast_resistance = 30 ,
2017-02-24 16:56:46 +02:00
_mcl_hardness = 1.5 ,
2015-06-29 20:55:56 +03:00
} )
2017-02-01 00:32:56 +02:00
minetest.register_node ( " mcl_core:stonebrickmossy " , {
2017-01-04 07:20:13 +02:00
description = " Mossy Stone Bricks " ,
2017-03-18 19:01:28 +02:00
_doc_items_longdesc = doc.sub . items.temp . build ,
2017-05-26 02:06:54 +03:00
tiles = { " mcl_core_stonebrick_mossy.png " } ,
2015-06-29 20:55:56 +03:00
stack_max = 64 ,
2017-03-11 06:34:58 +02:00
groups = { pickaxey = 1 , stone = 1 , stonebrick = 1 , building_block = 1 , deco_block = 1 , material_stone = 1 } ,
2017-02-11 19:46:23 +02:00
sounds = mcl_sounds.node_sound_stone_defaults ( ) ,
2017-03-11 17:36:05 +02:00
is_ground_content = false ,
2017-02-22 16:40:22 +02:00
_mcl_blast_resistance = 30 ,
2017-02-24 16:56:46 +02:00
_mcl_hardness = 1.5 ,
2015-06-29 20:55:56 +03:00
} )
2017-02-01 00:32:56 +02:00
minetest.register_node ( " mcl_core:granite " , {
2017-01-08 02:59:50 +02:00
description = " Granite " ,
2017-03-10 23:27:27 +02:00
_doc_items_longdesc = " Granite is an igneous rock. " ,
2017-05-26 02:06:54 +03:00
tiles = { " mcl_core_granite.png " } ,
2017-01-08 02:59:50 +02:00
is_ground_content = true ,
stack_max = 64 ,
2017-03-11 06:34:58 +02:00
groups = { pickaxey = 1 , stone = 1 , building_block = 1 , material_stone = 1 } ,
2017-02-11 19:46:23 +02:00
sounds = mcl_sounds.node_sound_stone_defaults ( ) ,
2017-02-22 16:40:22 +02:00
_mcl_blast_resistance = 30 ,
2017-02-24 16:56:46 +02:00
_mcl_hardness = 1.5 ,
2017-01-08 02:59:50 +02:00
} )
2017-02-01 00:32:56 +02:00
minetest.register_node ( " mcl_core:granite_smooth " , {
2017-01-08 02:59:50 +02:00
description = " Polished Granite " ,
2017-03-10 23:27:27 +02:00
_doc_items_longdesc = " Polished granite is a decorational building block made from granite. " ,
2017-05-26 02:06:54 +03:00
tiles = { " mcl_core_granite_smooth.png " } ,
2017-01-08 02:59:50 +02:00
stack_max = 64 ,
2017-03-11 17:36:05 +02:00
is_ground_content = false ,
2017-03-11 06:34:58 +02:00
groups = { pickaxey = 1 , stone = 1 , building_block = 1 , material_stone = 1 } ,
2017-02-11 19:46:23 +02:00
sounds = mcl_sounds.node_sound_stone_defaults ( ) ,
2017-02-22 16:40:22 +02:00
_mcl_blast_resistance = 30 ,
2017-02-24 16:56:46 +02:00
_mcl_hardness = 1.5 ,
2017-01-08 02:59:50 +02:00
} )
2017-02-01 00:32:56 +02:00
minetest.register_node ( " mcl_core:andesite " , {
2017-01-08 02:59:50 +02:00
description = " Andesite " ,
2017-03-10 23:27:27 +02:00
_doc_items_longdesc = " Andesite is an igneous rock. " ,
2017-05-26 02:06:54 +03:00
tiles = { " mcl_core_andesite.png " } ,
2017-01-08 02:59:50 +02:00
is_ground_content = true ,
stack_max = 64 ,
2017-03-11 06:34:58 +02:00
groups = { pickaxey = 1 , stone = 1 , building_block = 1 , material_stone = 1 } ,
2017-02-11 19:46:23 +02:00
sounds = mcl_sounds.node_sound_stone_defaults ( ) ,
2017-02-22 16:40:22 +02:00
_mcl_blast_resistance = 30 ,
2017-02-24 16:56:46 +02:00
_mcl_hardness = 1.5 ,
2017-01-08 02:59:50 +02:00
} )
2017-02-01 00:32:56 +02:00
minetest.register_node ( " mcl_core:andesite_smooth " , {
2017-01-08 02:59:50 +02:00
description = " Polished Andesite " ,
2017-03-10 23:27:27 +02:00
_doc_items_longdesc = " Polished andesite is a decorational building block made from andesite. " ,
2017-05-26 02:06:54 +03:00
tiles = { " mcl_core_andesite_smooth.png " } ,
2017-03-11 17:36:05 +02:00
is_ground_content = false ,
2017-01-08 02:59:50 +02:00
stack_max = 64 ,
2017-03-11 06:34:58 +02:00
groups = { pickaxey = 1 , stone = 1 , building_block = 1 , material_stone = 1 } ,
2017-02-11 19:46:23 +02:00
sounds = mcl_sounds.node_sound_stone_defaults ( ) ,
2017-02-22 16:40:22 +02:00
_mcl_blast_resistance = 30 ,
2017-02-24 16:56:46 +02:00
_mcl_hardness = 1.5 ,
2017-01-08 02:59:50 +02:00
} )
2017-02-01 00:32:56 +02:00
minetest.register_node ( " mcl_core:diorite " , {
2017-01-08 02:59:50 +02:00
description = " Diorite " ,
2017-03-10 23:27:27 +02:00
_doc_items_longdesc = " Diorite is an igneous rock. " ,
2017-05-26 02:06:54 +03:00
tiles = { " mcl_core_diorite.png " } ,
2017-01-08 02:59:50 +02:00
is_ground_content = true ,
stack_max = 64 ,
2017-03-11 06:34:58 +02:00
groups = { pickaxey = 1 , stone = 1 , building_block = 1 , material_stone = 1 } ,
2017-02-11 19:46:23 +02:00
sounds = mcl_sounds.node_sound_stone_defaults ( ) ,
2017-02-22 16:40:22 +02:00
_mcl_blast_resistance = 30 ,
2017-02-24 16:56:46 +02:00
_mcl_hardness = 1.5 ,
2017-01-08 02:59:50 +02:00
} )
2017-02-01 00:32:56 +02:00
minetest.register_node ( " mcl_core:diorite_smooth " , {
2017-01-08 02:59:50 +02:00
description = " Polished Diorite " ,
2017-03-10 23:27:27 +02:00
_doc_items_longdesc = " Polished diorite is a decorational building block made from diorite. " ,
2017-05-26 02:06:54 +03:00
tiles = { " mcl_core_diorite_smooth.png " } ,
2017-03-11 17:36:05 +02:00
is_ground_content = false ,
2017-01-08 02:59:50 +02:00
stack_max = 64 ,
2017-03-11 06:34:58 +02:00
groups = { pickaxey = 1 , stone = 1 , building_block = 1 , material_stone = 1 } ,
2017-02-11 19:46:23 +02:00
sounds = mcl_sounds.node_sound_stone_defaults ( ) ,
2017-02-22 16:40:22 +02:00
_mcl_blast_resistance = 30 ,
2017-02-24 16:56:46 +02:00
_mcl_hardness = 1.5 ,
2017-01-08 02:59:50 +02:00
} )
2017-02-01 00:32:56 +02:00
minetest.register_node ( " mcl_core:dirt_with_grass " , {
2017-01-04 07:20:13 +02:00
description = " Grass Block " ,
2017-05-14 03:51:03 +03:00
_doc_items_longdesc = " A grass block is dirt with a grass cover. Grass blocks are resourceful blocks which allow the growth of all sorts of plants. They can be turned into farmland with a hoe and turned into grass paths with a shovel. In light, the grass slowly spreads onto dirt nearby. Under an opaque block or a liquid, a grass block may turn back to dirt. " ,
2017-03-20 17:38:16 +02:00
_doc_items_hidden = false ,
2017-04-01 07:44:02 +03:00
tiles = { " default_grass.png " , " default_dirt.png " , " default_grass_side.png " } ,
2015-06-29 20:55:56 +03:00
is_ground_content = true ,
stack_max = 64 ,
2017-05-14 00:32:43 +03:00
groups = { handy = 1 , shovely = 1 , soil = 1 , soil_sapling = 2 , soil_sugarcane = 1 , cultivatable = 2 , spreading_dirt_type = 1 , building_block = 1 } ,
2017-02-01 00:32:56 +02:00
drop = ' mcl_core:dirt ' ,
2017-02-11 19:46:23 +02:00
sounds = mcl_sounds.node_sound_dirt_defaults ( {
2015-06-29 20:55:56 +03:00
footstep = { name = " default_grass_footstep " , gain = 0.4 } ,
} ) ,
2017-02-22 16:40:22 +02:00
_mcl_blast_resistance = 3 ,
2017-02-24 16:56:46 +02:00
_mcl_hardness = 0.6 ,
2015-06-29 20:55:56 +03:00
} )
2017-04-01 07:51:55 +03:00
-- NOTE: This block is to be considered equivalent to the grass block
2017-04-01 07:44:02 +03:00
minetest.register_node ( " mcl_core:dirt_with_grass_snow " , {
description = " Snowy Grass Block " ,
_doc_items_create_entry = false ,
tiles = { " default_snow.png " , " default_dirt.png " , " mcl_core_grass_side_snowed.png " } ,
is_ground_content = true ,
stack_max = 64 ,
groups = { handy = 1 , shovely = 1 , soil = 1 , soil_sapling = 2 , soil_sugarcane = 1 , cultivatable = 2 , building_block = 1 , not_in_creative_inventory = 1 } ,
drop = ' mcl_core:dirt ' ,
2017-04-01 08:15:45 +03:00
sounds = mcl_sounds.node_sound_snow_defaults ( {
dug = { name = " default_dirt_footstep " , gain = 1.5 } ,
dig = { name = " default_dig_crumbly " , gain = 1.0 }
} ) ,
2017-04-01 07:44:02 +03:00
_mcl_blast_resistance = 3 ,
_mcl_hardness = 0.6 ,
} )
2017-02-06 20:25:15 +02:00
minetest.register_node ( " mcl_core:grass_path " , {
tiles = { " mcl_core_grass_path_top.png " , " mcl_core_grass_path_side.png " } ,
description = " Grass Path " ,
2017-05-14 23:55:46 +03:00
_doc_items_longdesc = " Grass paths are a decorational variant of grass blocks. Their top has a different color and they are a bit lower than grass blocks, making them useful to build footpaths. Grass paths can be created with a shovel. A grass path turns into dirt when it is below a solid block. " ,
2017-02-06 20:25:15 +02:00
drop = " mcl_core:dirt " ,
is_ground_content = true ,
drawtype = " nodebox " ,
paramtype = " light " ,
node_box = {
type = " fixed " ,
fixed = {
-- 15/16 of the normal height
{ - 0.5 , - 0.5 , - 0.5 , 0.5 , 0.4375 , 0.5 } ,
}
} ,
2017-05-14 23:44:34 +03:00
groups = { handy = 1 , shovely = 1 , cultivatable = 2 , dirtifies_below_solid = 1 , not_in_creative_inventory = 1 , } ,
2017-02-11 19:46:23 +02:00
sounds = mcl_sounds.node_sound_dirt_defaults ( {
2017-02-06 20:29:11 +02:00
footstep = { name = " default_grass_footstep " , gain = 0.4 } ,
} ) ,
2017-02-22 16:40:22 +02:00
_mcl_blast_resistance = 3.25 ,
2017-02-24 16:56:46 +02:00
_mcl_hardness = 0.6 ,
2017-02-06 20:25:15 +02:00
} )
2017-01-10 05:24:42 +02:00
-- TODO: Add particles
2017-02-01 00:32:56 +02:00
minetest.register_node ( " mcl_core:mycelium " , {
2017-01-10 04:54:15 +02:00
description = " Mycelium " ,
2017-05-14 03:51:03 +03:00
_doc_items_longdesc = " Mycelium is a type of dirt and the ideal soil for mushrooms. Unlike other dirt-type blocks, it can not be turned into farmland with a hoe. In light, mycelium slowly spreads over nearby dirt. Under an opaque block or a liquid, it eventually turns back into dirt. " ,
2017-05-26 02:06:54 +03:00
tiles = { " mcl_core_mycelium_top.png " , " default_dirt.png " , " mcl_core_mycelium_side.png " } ,
2017-01-10 04:54:15 +02:00
is_ground_content = true ,
stack_max = 64 ,
2017-05-14 00:32:43 +03:00
groups = { handy = 1 , shovely = 1 , spreading_dirt_type = 1 , building_block = 1 } ,
2017-02-01 00:32:56 +02:00
drop = ' mcl_core:dirt ' ,
2017-02-11 19:46:23 +02:00
sounds = mcl_sounds.node_sound_dirt_defaults ( {
2017-01-10 04:54:15 +02:00
footstep = { name = " default_grass_footstep " , gain = 0.4 } ,
} ) ,
2017-02-22 16:40:22 +02:00
_mcl_blast_resistance = 2.5 ,
2017-02-24 16:56:46 +02:00
_mcl_hardness = 0.6 ,
2017-01-10 04:54:15 +02:00
} )
2017-04-01 07:51:55 +03:00
-- NOTE: This block is to be considered equivalent to mycelium
2017-04-01 07:44:02 +03:00
minetest.register_node ( " mcl_core:mycelium_snow " , {
description = " Snowy Mycelium " ,
_doc_items_create_entry = false ,
-- CHECKME: Are the sides of snowy mycelium supposed to look like this?
tiles = { " default_snow.png " , " default_dirt.png " , " mcl_core_grass_side_snowed.png " } ,
is_ground_content = true ,
stack_max = 64 ,
groups = { handy = 1 , shovely = 1 , building_block = 1 , not_in_creative_inventory = 1 } ,
drop = ' mcl_core:dirt ' ,
2017-04-01 08:15:45 +03:00
sounds = mcl_sounds.node_sound_snow_defaults ( {
dug = { name = " default_dirt_footstep " , gain = 1.5 } ,
dig = { name = " default_dig_crumbly " , gain = 1.0 }
} ) ,
2017-04-01 07:44:02 +03:00
_mcl_blast_resistance = 2.5 ,
_mcl_hardness = 0.6 ,
} )
2017-02-01 00:32:56 +02:00
minetest.register_node ( " mcl_core:podzol " , {
2017-01-10 05:24:42 +02:00
description = " Podzol " ,
2017-03-11 18:32:39 +02:00
_doc_items_longdesc = " Podzol is a type of dirt found in taiga forests. Only a few plants are able to survive on it. " ,
2017-05-26 02:06:54 +03:00
tiles = { " mcl_core_dirt_podzol_top.png " , " default_dirt.png " , " mcl_core_dirt_podzol_side.png " } ,
2017-01-10 05:24:42 +02:00
is_ground_content = true ,
stack_max = 64 ,
2017-02-25 17:19:24 +02:00
groups = { handy = 1 , shovely = 3 , soil = 1 , soil_sapling = 2 , soil_sugarcane = 1 , building_block = 1 } ,
2017-02-01 00:32:56 +02:00
drop = ' mcl_core:dirt ' ,
2017-02-11 19:46:23 +02:00
sounds = mcl_sounds.node_sound_dirt_defaults ( ) ,
2017-02-22 16:40:22 +02:00
_mcl_blast_resistance = 2.5 ,
2017-02-24 16:56:46 +02:00
_mcl_hardness = 0.6 ,
2017-01-10 05:24:42 +02:00
} )
2017-04-01 07:51:55 +03:00
-- NOTE: This block is to be considered equivalent to podzol
2017-04-01 07:44:02 +03:00
minetest.register_node ( " mcl_core:podzol_snow " , {
description = " Snowy Podzol " ,
_doc_items_create_entry = false ,
tiles = { " default_snow.png " , " default_dirt.png " , " mcl_core_grass_side_snowed.png " } ,
is_ground_content = true ,
stack_max = 64 ,
groups = { handy = 1 , shovely = 3 , soil = 1 , soil_sapling = 2 , soil_sugarcane = 1 , building_block = 1 , not_in_creative_inventory = 1 } ,
drop = ' mcl_core:dirt ' ,
2017-04-01 08:15:45 +03:00
sounds = mcl_sounds.node_sound_snow_defaults ( {
dug = { name = " default_dirt_footstep " , gain = 1.5 } ,
dig = { name = " default_dig_crumbly " , gain = 1.0 }
} ) ,
2017-04-01 07:44:02 +03:00
_mcl_blast_resistance = 2.5 ,
_mcl_hardness = 0.6 ,
} )
2017-02-01 00:32:56 +02:00
minetest.register_node ( " mcl_core:dirt " , {
2015-06-29 20:55:56 +03:00
description = " Dirt " ,
2017-05-14 03:51:03 +03:00
_doc_items_longdesc = " Dirt acts as a soil for a few plants. When in light, this block may grow a grass or mycelium cover if such blocks are nearby. " ,
2017-03-20 17:38:16 +02:00
_doc_items_hidden = false ,
2015-06-29 20:55:56 +03:00
tiles = { " default_dirt.png " } ,
is_ground_content = true ,
stack_max = 64 ,
2017-02-25 17:19:24 +02:00
groups = { handy = 1 , shovely = 1 , soil = 1 , soil_sapling = 2 , soil_sugarcane = 1 , cultivatable = 2 , building_block = 1 } ,
2017-02-11 19:46:23 +02:00
sounds = mcl_sounds.node_sound_dirt_defaults ( ) ,
2017-02-22 16:40:22 +02:00
_mcl_blast_resistance = 3 ,
2017-02-24 16:56:46 +02:00
_mcl_hardness = 0.5 ,
2015-06-29 20:55:56 +03:00
} )
2017-02-01 00:32:56 +02:00
minetest.register_node ( " mcl_core:coarse_dirt " , {
2017-01-05 02:28:43 +02:00
description = " Coarse Dirt " ,
2017-05-14 03:51:03 +03:00
_doc_items_longdesc = " Coarse dirt acts as a soil for some plants and is similar to dirt, but it will never grow a cover. " ,
2017-05-26 02:06:54 +03:00
tiles = { " mcl_core_coarse_dirt.png " } ,
2017-01-05 02:28:43 +02:00
is_ground_content = true ,
stack_max = 64 ,
2017-02-25 17:19:24 +02:00
groups = { handy = 1 , shovely = 1 , soil = 1 , soil_sugarcane = 1 , cultivatable = 1 , building_block = 1 } ,
2017-02-11 19:46:23 +02:00
sounds = mcl_sounds.node_sound_dirt_defaults ( ) ,
2017-02-22 16:40:22 +02:00
_mcl_blast_resistance = 3 ,
2017-02-24 16:56:46 +02:00
_mcl_hardness = 0.5 ,
2017-01-05 02:28:43 +02:00
} )
2015-06-29 20:55:56 +03:00
2017-02-01 00:32:56 +02:00
minetest.register_node ( " mcl_core:gravel " , {
2015-06-29 20:55:56 +03:00
description = " Gravel " ,
2017-03-10 23:27:27 +02:00
_doc_items_longdesc = " This block consists of a couple of loose stones and can't support itself. " ,
2015-06-29 20:55:56 +03:00
tiles = { " default_gravel.png " } ,
is_ground_content = true ,
stack_max = 64 ,
2017-03-11 06:34:58 +02:00
groups = { handy = 1 , shovely = 1 , falling_node = 1 , building_block = 1 , material_sand = 1 } ,
2015-06-29 20:55:56 +03:00
drop = {
max_items = 1 ,
items = {
2017-02-01 00:32:56 +02:00
{ items = { ' mcl_core:flint ' } , rarity = 10 } ,
{ items = { ' mcl_core:gravel ' } }
2015-06-29 20:55:56 +03:00
}
} ,
2017-02-11 19:46:23 +02:00
sounds = mcl_sounds.node_sound_dirt_defaults ( {
2015-06-29 20:55:56 +03:00
footstep = { name = " default_gravel_footstep " , gain = 0.45 } ,
} ) ,
2017-02-22 16:40:22 +02:00
_mcl_blast_resistance = 3 ,
2017-02-24 16:56:46 +02:00
_mcl_hardness = 0.6 ,
2015-06-29 20:55:56 +03:00
} )
-- sandstone --
2017-02-01 00:32:56 +02:00
minetest.register_node ( " mcl_core:sand " , {
2015-06-29 20:55:56 +03:00
description = " Sand " ,
2017-03-10 23:27:27 +02:00
_doc_items_longdesc = " Sand is found in large quantities at beaches and deserts. " ,
2017-03-20 17:38:16 +02:00
_doc_items_hidden = false ,
2015-06-29 20:55:56 +03:00
tiles = { " default_sand.png " } ,
is_ground_content = true ,
stack_max = 64 ,
2017-03-11 06:34:58 +02:00
groups = { handy = 1 , shovely = 1 , falling_node = 1 , sand = 1 , soil_sugarcane = 1 , building_block = 1 , material_sand = 1 } ,
2017-02-11 19:46:23 +02:00
sounds = mcl_sounds.node_sound_sand_defaults ( ) ,
2017-02-22 16:40:22 +02:00
_mcl_blast_resistance = 2.5 ,
2017-02-24 16:56:46 +02:00
_mcl_hardness = 0.5 ,
2015-06-29 20:55:56 +03:00
} )
2017-02-01 00:32:56 +02:00
minetest.register_node ( " mcl_core:sandstone " , {
2015-06-29 20:55:56 +03:00
description = " Sandstone " ,
2017-03-20 17:38:16 +02:00
_doc_items_hidden = false ,
2017-03-10 23:27:27 +02:00
_doc_items_longdesc = " Sandstone is compressed sand and is a rather soft kind of stone. " ,
2017-05-26 02:06:54 +03:00
tiles = { " mcl_core_sandstone_top.png " , " mcl_core_sandstone_bottom.png " , " mcl_core_sandstone_normal.png " } ,
2015-06-29 20:55:56 +03:00
is_ground_content = true ,
stack_max = 64 ,
2017-03-11 06:34:58 +02:00
groups = { pickaxey = 2 , sandstone = 1 , building_block = 1 , material_stone = 1 } ,
2017-02-11 19:46:23 +02:00
sounds = mcl_sounds.node_sound_stone_defaults ( ) ,
2017-02-22 16:40:22 +02:00
_mcl_blast_resistance = 4 ,
2017-02-24 16:56:46 +02:00
_mcl_hardness = 0.8 ,
2015-06-29 20:55:56 +03:00
} )
2017-02-01 00:32:56 +02:00
minetest.register_node ( " mcl_core:sandstonesmooth " , {
2017-01-04 07:20:13 +02:00
description = " Smooth Sandstone " ,
2017-03-10 23:27:27 +02:00
_doc_items_longdesc = " Smooth sandstone is a decorational building block. " ,
2017-05-26 02:06:54 +03:00
tiles = { " mcl_core_sandstone_top.png " , " mcl_core_sandstone_bottom.png " , " mcl_core_sandstone_smooth.png " } ,
2015-06-29 20:55:56 +03:00
is_ground_content = true ,
stack_max = 64 ,
2017-03-11 06:34:58 +02:00
groups = { pickaxey = 1 , sandstone = 1 , building_block = 1 , material_stone = 1 } ,
2017-02-11 19:46:23 +02:00
sounds = mcl_sounds.node_sound_stone_defaults ( ) ,
2017-02-22 16:40:22 +02:00
_mcl_blast_resistance = 4 ,
2017-02-24 16:56:46 +02:00
_mcl_hardness = 0.8 ,
2015-06-29 20:55:56 +03:00
} )
2017-02-01 00:32:56 +02:00
minetest.register_node ( " mcl_core:sandstonecarved " , {
2017-01-04 07:20:13 +02:00
description = " Chiseled Sandstone " ,
2017-03-10 23:27:27 +02:00
_doc_items_longdesc = " Chiseled sandstone is a decorational building block. " ,
2017-05-26 02:06:54 +03:00
tiles = { " mcl_core_sandstone_top.png " , " mcl_core_sandstone_bottom.png " , " mcl_core_sandstone_carved.png " } ,
2015-06-29 20:55:56 +03:00
is_ground_content = true ,
stack_max = 64 ,
2017-03-11 06:34:58 +02:00
groups = { pickaxey = 1 , sandstone = 1 , building_block = 1 , material_stone = 1 } ,
2017-02-11 19:46:23 +02:00
sounds = mcl_sounds.node_sound_stone_defaults ( ) ,
2017-02-22 16:40:22 +02:00
_mcl_blast_resistance = 4 ,
2017-02-24 16:56:46 +02:00
_mcl_hardness = 0.8 ,
2015-06-29 20:55:56 +03:00
} )
-- red sandstone --
2017-02-01 00:32:56 +02:00
minetest.register_node ( " mcl_core:redsand " , {
2015-06-29 20:55:56 +03:00
description = " Red Sand " ,
2017-03-14 06:58:10 +02:00
_doc_items_longdesc = " Red sand is found in large quantities in mesa biomes. " ,
2017-05-26 02:06:54 +03:00
tiles = { " mcl_core_red_sand.png " } ,
2015-06-29 20:55:56 +03:00
is_ground_content = true ,
stack_max = 64 ,
2017-03-11 06:34:58 +02:00
groups = { handy = 1 , shovely = 1 , falling_node = 1 , sand = 1 , soil_sugarcane = 1 , building_block = 1 , material_sand = 1 } ,
2017-02-11 19:46:23 +02:00
sounds = mcl_sounds.node_sound_sand_defaults ( ) ,
2017-02-22 16:40:22 +02:00
_mcl_blast_resistance = 2.5 ,
2017-02-24 16:56:46 +02:00
_mcl_hardness = 0.5 ,
2015-06-29 20:55:56 +03:00
} )
2017-02-01 00:32:56 +02:00
minetest.register_node ( " mcl_core:redsandstone " , {
2017-01-04 07:20:13 +02:00
description = " Red Sandstone " ,
2017-03-10 23:27:27 +02:00
_doc_items_longdesc = " Red sandstone is compressed red sand and is a rather soft kind of stone. " ,
2017-05-26 02:06:54 +03:00
tiles = { " mcl_core_red_sandstone_top.png " , " mcl_core_red_sandstone_bottom.png " , " mcl_core_red_sandstone_normal.png " } ,
2015-06-29 20:55:56 +03:00
is_ground_content = true ,
stack_max = 64 ,
2017-03-11 06:34:58 +02:00
groups = { pickaxey = 1 , redsandstone = 1 , building_block = 1 , material_stone = 1 } ,
2017-02-11 19:46:23 +02:00
sounds = mcl_sounds.node_sound_stone_defaults ( ) ,
2017-02-22 16:40:22 +02:00
_mcl_blast_resistance = 4 ,
2017-02-24 16:56:46 +02:00
_mcl_hardness = 0.8 ,
2015-06-29 20:55:56 +03:00
} )
2017-02-01 00:32:56 +02:00
minetest.register_node ( " mcl_core:redsandstonesmooth " , {
2017-01-04 07:20:13 +02:00
description = " Smooth Red Sandstone " ,
2017-03-10 23:27:27 +02:00
_doc_items_longdesc = " Smooth red sandstone is a decorational building block. " ,
2017-05-26 02:06:54 +03:00
tiles = { " mcl_core_red_sandstone_top.png " , " mcl_core_red_sandstone_bottom.png " , " mcl_core_red_sandstone_smooth.png " } ,
2015-06-29 20:55:56 +03:00
is_ground_content = true ,
stack_max = 64 ,
2017-03-11 06:34:58 +02:00
groups = { pickaxey = 1 , redsandstone = 1 , building_block = 1 , material_stone = 1 } ,
2017-02-11 19:46:23 +02:00
sounds = mcl_sounds.node_sound_stone_defaults ( ) ,
2017-02-22 16:40:22 +02:00
_mcl_blast_resistance = 4 ,
2017-02-24 16:56:46 +02:00
_mcl_hardness = 0.8 ,
2015-06-29 20:55:56 +03:00
} )
2017-02-01 00:32:56 +02:00
minetest.register_node ( " mcl_core:redsandstonecarved " , {
2017-01-04 07:20:13 +02:00
description = " Chiseled Red Sandstone " ,
2017-03-10 23:27:27 +02:00
_doc_items_longdesc = " Chiseled red sandstone is a decorational building block. " ,
2017-05-26 02:06:54 +03:00
tiles = { " mcl_core_red_sandstone_top.png " , " mcl_core_red_sandstone_bottom.png " , " mcl_core_red_sandstone_carved.png " } ,
2015-06-29 20:55:56 +03:00
is_ground_content = true ,
stack_max = 64 ,
2017-03-11 06:34:58 +02:00
groups = { pickaxey = 1 , redsandstone = 1 , building_block = 1 , material_stone = 1 } ,
2017-02-11 19:46:23 +02:00
sounds = mcl_sounds.node_sound_stone_defaults ( ) ,
2017-02-22 16:40:22 +02:00
_mcl_blast_resistance = 4 ,
2017-02-24 16:56:46 +02:00
_mcl_hardness = 0.8 ,
2015-06-29 20:55:56 +03:00
} )
---
2017-02-01 00:32:56 +02:00
minetest.register_node ( " mcl_core:clay " , {
2017-01-10 04:29:34 +02:00
-- Original name: Clay
description = " Block of Clay " ,
2017-03-10 23:27:27 +02:00
_doc_items_longdesc = " A block of clay is a versatile kind of earth commonly found at beaches underwater. " ,
2017-03-20 17:38:16 +02:00
_doc_items_hidden = false ,
2015-06-29 20:55:56 +03:00
tiles = { " default_clay.png " } ,
is_ground_content = true ,
stack_max = 64 ,
2017-02-25 17:19:24 +02:00
groups = { handy = 1 , shovely = 1 , building_block = 1 } ,
2017-02-01 00:32:56 +02:00
drop = ' mcl_core:clay_lump 4 ' ,
2017-05-23 00:23:53 +03:00
sounds = mcl_sounds.node_sound_dirt_defaults ( ) ,
2017-02-22 16:40:22 +02:00
_mcl_blast_resistance = 3 ,
2017-02-24 16:56:46 +02:00
_mcl_hardness = 0.6 ,
2015-06-29 20:55:56 +03:00
} )
2017-02-01 19:51:26 +02:00
minetest.register_node ( " mcl_core:brick_block " , {
-- Original name: “Bricks”
description = " Brick Block " ,
2017-03-10 23:27:27 +02:00
_doc_items_longdesc = " Brick blocks are a good building material for building solid houses and can take quite a punch. " ,
2015-06-29 20:55:56 +03:00
tiles = { " default_brick.png " } ,
2017-01-04 23:36:51 +02:00
is_ground_content = false ,
2015-06-29 20:55:56 +03:00
stack_max = 64 ,
2017-03-11 06:34:58 +02:00
groups = { pickaxey = 1 , building_block = 1 , material_stone = 1 } ,
2017-02-11 19:46:23 +02:00
sounds = mcl_sounds.node_sound_stone_defaults ( ) ,
2017-02-22 16:40:22 +02:00
_mcl_blast_resistance = 30 ,
2017-02-24 16:56:46 +02:00
_mcl_hardness = 2 ,
2015-06-29 20:55:56 +03:00
} )
2017-02-01 00:32:56 +02:00
minetest.register_node ( " mcl_core:bone_block " , {
2017-01-10 05:49:18 +02:00
description = " Bone Block " ,
2017-03-18 19:01:28 +02:00
_doc_items_longdesc = " Bone blocks are decorational blocks and a compact storage of bone meal. " ,
2017-02-06 18:22:21 +02:00
tiles = { " mcl_core_bone_block_top.png " , " mcl_core_bone_block_top.png " , " mcl_core_bone_block_side.png " } ,
2017-01-10 05:49:18 +02:00
is_ground_content = false ,
paramtype2 = " facedir " ,
2017-02-11 05:37:14 +02:00
on_place = mcl_util.rotate_axis ,
2017-03-11 06:34:58 +02:00
groups = { pickaxey = 1 , building_block = 1 , material_stone = 1 } ,
2017-02-11 19:46:23 +02:00
sounds = mcl_sounds.node_sound_stone_defaults ( ) ,
2017-02-22 16:40:22 +02:00
_mcl_blast_resistance = 10 ,
2017-02-24 16:56:46 +02:00
_mcl_hardness = 2 ,
2017-01-10 05:49:18 +02:00
} )
2015-06-29 20:55:56 +03:00
2017-02-16 21:22:20 +02:00
-- Oak --
2017-02-01 00:32:56 +02:00
minetest.register_node ( " mcl_core:tree " , {
2017-01-07 05:17:08 +02:00
description = " Oak Wood " ,
2017-03-10 23:27:27 +02:00
_doc_items_longdesc = " The trunk of an oak tree. " ,
2017-03-20 17:38:16 +02:00
_doc_items_hidden = false ,
2015-06-29 20:55:56 +03:00
tiles = { " default_tree_top.png " , " default_tree_top.png " , " default_tree.png " } ,
paramtype2 = " facedir " ,
2017-02-11 05:37:14 +02:00
on_place = mcl_util.rotate_axis ,
2015-06-29 20:55:56 +03:00
stack_max = 64 ,
2017-03-11 06:34:58 +02:00
groups = { handy = 1 , axey = 1 , tree = 1 , flammable = 2 , building_block = 1 , material_wood = 1 } ,
2017-02-11 19:46:23 +02:00
sounds = mcl_sounds.node_sound_wood_defaults ( ) ,
2017-02-22 16:40:22 +02:00
_mcl_blast_resistance = 10 ,
2017-02-24 16:56:46 +02:00
_mcl_hardness = 2 ,
2015-06-29 20:55:56 +03:00
} )
2017-02-01 00:32:56 +02:00
minetest.register_node ( " mcl_core:sapling " , {
2017-01-04 07:20:13 +02:00
description = " Oak Sapling " ,
2017-03-20 19:56:00 +02:00
_doc_items_longdesc = " When placed on soil (such as dirt) and exposed to light, an oak sapling will grow into an oak tree after some time. If the tree can't grow because of darkness, the sapling will uproot. " ,
2017-03-20 17:38:16 +02:00
_doc_items_hidden = false ,
2015-06-29 20:55:56 +03:00
drawtype = " plantlike " ,
visual_scale = 1.0 ,
tiles = { " default_sapling.png " } ,
inventory_image = " default_sapling.png " ,
wield_image = " default_sapling.png " ,
paramtype = " light " ,
2017-03-20 19:56:00 +02:00
sunlight_propagates = true ,
2015-06-29 20:55:56 +03:00
walkable = false ,
selection_box = {
type = " fixed " ,
2017-06-06 13:44:58 +03:00
fixed = { - 6 / 16 , - 0.5 , - 6 / 16 , 6 / 16 , 0.5 , 6 / 16 }
2015-06-29 20:55:56 +03:00
} ,
stack_max = 64 ,
2017-05-20 05:11:14 +03:00
groups = { dig_immediate = 3 , plant = 1 , sapling = 1 , non_mycelium_plant = 1 , attached_node = 1 , dig_by_water = 1 , destroy_by_lava_flow = 1 , deco_block = 1 } ,
2017-02-20 00:31:06 +02:00
sounds = mcl_sounds.node_sound_leaves_defaults ( ) ,
2017-03-08 00:28:54 +02:00
on_construct = function ( pos )
local meta = minetest.get_meta ( pos )
meta : set_int ( " stage " , 0 )
end ,
2017-05-14 02:45:57 +03:00
node_placement_prediction = " " ,
2017-02-22 16:40:22 +02:00
_mcl_blast_resistance = 0 ,
2017-02-24 16:56:46 +02:00
_mcl_hardness = 0 ,
2015-06-29 20:55:56 +03:00
} )
2017-02-01 00:32:56 +02:00
minetest.register_node ( " mcl_core:leaves " , {
2017-01-04 07:20:13 +02:00
description = " Oak Leaves " ,
2017-03-10 23:27:27 +02:00
_doc_items_longdesc = " Oak leaves are grown from oak trees. " ,
2017-03-20 17:38:16 +02:00
_doc_items_hidden = false ,
2015-06-29 20:55:56 +03:00
drawtype = " allfaces_optional " ,
2017-03-08 01:25:04 +02:00
place_param2 = 1 , -- Prevent leafdecay for placed nodes
2015-06-29 20:55:56 +03:00
visual_scale = 1.3 ,
tiles = { " default_leaves.png " } ,
paramtype = " light " ,
stack_max = 64 ,
2017-03-29 23:58:31 +03:00
groups = { handy = 1 , shearsy = 1 , swordy = 1 , leafdecay = 4 , flammable = 2 , leaves = 1 , deco_block = 1 , dig_by_piston = 1 } ,
2015-06-29 20:55:56 +03:00
drop = {
max_items = 1 ,
items = {
{
-- player will get sapling with 1/20 chance
2017-02-01 00:32:56 +02:00
items = { ' mcl_core:sapling ' } ,
2015-06-29 20:55:56 +03:00
rarity = 20 ,
} ,
2017-01-09 05:54:46 +02:00
{
2017-01-04 09:01:40 +02:00
-- player will get apple with 1/200 chance
2017-02-01 00:32:56 +02:00
items = { ' mcl_core:apple ' } ,
2015-06-29 20:55:56 +03:00
rarity = 200 ,
} ,
}
} ,
2017-02-11 19:46:23 +02:00
sounds = mcl_sounds.node_sound_leaves_defaults ( ) ,
2017-02-22 16:40:22 +02:00
_mcl_blast_resistance = 1 ,
2017-02-24 16:56:46 +02:00
_mcl_hardness = 0.2 ,
2015-06-29 20:55:56 +03:00
} )
2017-02-16 22:24:27 +02:00
minetest.register_node ( " mcl_core:wood " , {
description = " Oak Wood Planks " ,
2017-03-18 19:01:28 +02:00
_doc_items_longdesc = doc.sub . items.temp . build ,
2017-03-20 17:38:16 +02:00
_doc_items_hidden = false ,
2017-02-16 22:24:27 +02:00
tiles = { " default_wood.png " } ,
stack_max = 64 ,
is_ground_content = false ,
2017-03-11 06:34:58 +02:00
groups = { handy = 1 , axey = 1 , flammable = 3 , wood = 1 , building_block = 1 , material_wood = 1 } ,
2017-02-16 22:24:27 +02:00
sounds = mcl_sounds.node_sound_wood_defaults ( ) ,
2017-02-22 16:40:22 +02:00
_mcl_blast_resistance = 15 ,
2017-02-24 16:56:46 +02:00
_mcl_hardness = 2 ,
2017-02-16 22:24:27 +02:00
} )
2017-02-16 21:22:20 +02:00
-- Dark oak --
2017-02-01 00:32:56 +02:00
minetest.register_node ( " mcl_core:darktree " , {
2017-01-09 05:44:07 +02:00
description = " Dark Oak Wood " ,
2017-03-10 23:27:27 +02:00
_doc_items_longdesc = " The trunk of a dark oak tree. " ,
2017-05-26 02:06:54 +03:00
tiles = { " mcl_core_log_big_oak_top.png " , " mcl_core_log_big_oak_top.png " , " mcl_core_log_big_oak.png " } ,
2017-01-09 05:44:07 +02:00
paramtype2 = " facedir " ,
2017-02-11 05:37:14 +02:00
on_place = mcl_util.rotate_axis ,
2017-01-09 05:44:07 +02:00
stack_max = 64 ,
2017-03-11 06:34:58 +02:00
groups = { handy = 1 , axey = 1 , tree = 1 , flammable = 2 , building_block = 1 , material_wood = 1 } ,
2017-02-11 19:46:23 +02:00
sounds = mcl_sounds.node_sound_wood_defaults ( ) ,
2017-02-22 16:40:22 +02:00
_mcl_blast_resistance = 10 ,
2017-02-24 16:56:46 +02:00
_mcl_hardness = 2 ,
2017-01-09 05:44:07 +02:00
} )
2017-02-01 00:32:56 +02:00
minetest.register_node ( " mcl_core:darksapling " , {
2017-01-09 05:44:07 +02:00
description = " Dark Oak Sapling " ,
2017-03-20 19:56:00 +02:00
_doc_items_longdesc = " When placed on soil (such as dirt) and exposed to light, a dark oak sapling will grow into a dark oak tree after some time. If the tree can't grow because of darkness, the sapling will uproot. " ,
2017-01-09 05:44:07 +02:00
drawtype = " plantlike " ,
visual_scale = 1.0 ,
2017-05-26 02:06:54 +03:00
tiles = { " mcl_core_sapling_big_oak.png " } ,
inventory_image = " mcl_core_sapling_big_oak.png " ,
wield_image = " mcl_core_sapling_big_oak.png " ,
2017-01-09 05:44:07 +02:00
paramtype = " light " ,
2017-03-20 19:56:00 +02:00
sunlight_propagates = true ,
2017-01-09 05:44:07 +02:00
walkable = false ,
selection_box = {
type = " fixed " ,
2017-06-06 13:44:58 +03:00
fixed = { - 5.5 / 16 , - 0.5 , - 5.5 / 16 , 5.5 / 16 , 0.5 , 5.5 / 16 }
2017-01-09 05:44:07 +02:00
} ,
stack_max = 64 ,
2017-05-20 05:11:14 +03:00
groups = { dig_immediate = 3 , plant = 1 , sapling = 1 , non_mycelium_plant = 1 , attached_node = 1 , dig_by_water = 1 , destroy_by_lava_flow = 1 , deco_block = 1 } ,
2017-02-20 00:31:06 +02:00
sounds = mcl_sounds.node_sound_leaves_defaults ( ) ,
2017-03-08 00:28:54 +02:00
on_construct = function ( pos )
local meta = minetest.get_meta ( pos )
meta : set_int ( " stage " , 0 )
end ,
2017-05-14 02:45:57 +03:00
node_placement_prediction = " " ,
2017-02-22 16:40:22 +02:00
_mcl_blast_resistance = 0 ,
2017-02-24 16:56:46 +02:00
_mcl_hardness = 0 ,
2017-01-09 05:44:07 +02:00
} )
2017-02-01 00:32:56 +02:00
minetest.register_node ( " mcl_core:darkleaves " , {
2017-01-09 05:44:07 +02:00
description = " Dark Oak Leaves " ,
2017-03-10 23:27:27 +02:00
_doc_items_longdesc = " Dark oak leaves are grown from dark oak trees. " ,
2017-01-09 05:44:07 +02:00
drawtype = " allfaces_optional " ,
2017-03-08 01:25:04 +02:00
place_param2 = 1 , -- Prevent leafdecay for placed nodes
2017-01-09 05:44:07 +02:00
visual_scale = 1.3 ,
2017-05-26 02:06:54 +03:00
tiles = { " mcl_core_leaves_big_oak.png " } ,
2017-01-09 05:44:07 +02:00
paramtype = " light " ,
stack_max = 64 ,
2017-03-29 23:58:31 +03:00
groups = { handy = 1 , shearsy = 1 , swordy = 1 , leafdecay = 4 , flammable = 2 , leaves = 1 , deco_block = 1 , dig_by_piston = 1 } ,
2017-01-09 05:44:07 +02:00
drop = {
max_items = 1 ,
items = {
{
-- player will get sapling with 1/20 chance
2017-02-01 00:32:56 +02:00
items = { ' mcl_core:darksapling ' } ,
2017-01-09 05:44:07 +02:00
rarity = 20 ,
} ,
2017-01-09 05:54:46 +02:00
{
-- player will get apple with 1/200 chance
2017-02-01 00:32:56 +02:00
items = { ' mcl_core:apple ' } ,
2017-01-09 05:54:46 +02:00
rarity = 200 ,
} ,
2017-01-09 05:44:07 +02:00
}
} ,
2017-02-11 19:46:23 +02:00
sounds = mcl_sounds.node_sound_leaves_defaults ( ) ,
2017-02-22 16:40:22 +02:00
_mcl_blast_resistance = 1 ,
2017-02-24 16:56:46 +02:00
_mcl_hardness = 0.2 ,
2017-01-09 05:44:07 +02:00
} )
2017-02-16 22:24:27 +02:00
minetest.register_node ( " mcl_core:darkwood " , {
description = " Dark Oak Wood Planks " ,
2017-03-18 19:01:28 +02:00
_doc_items_longdesc = doc.sub . items.temp . build ,
2017-05-26 02:06:54 +03:00
tiles = { " mcl_core_planks_big_oak.png " } ,
2017-02-16 22:24:27 +02:00
stack_max = 64 ,
is_ground_content = false ,
2017-03-11 06:34:58 +02:00
groups = { handy = 1 , axey = 1 , flammable = 3 , wood = 1 , building_block = 1 , material_wood = 1 } ,
2017-02-16 22:24:27 +02:00
sounds = mcl_sounds.node_sound_wood_defaults ( ) ,
2017-02-22 16:40:22 +02:00
_mcl_blast_resistance = 15 ,
2017-02-24 16:56:46 +02:00
_mcl_hardness = 2 ,
2017-02-16 22:24:27 +02:00
} )
2017-02-16 21:22:20 +02:00
-- Jungle tree --
2015-06-29 20:55:56 +03:00
2017-02-01 00:32:56 +02:00
minetest.register_node ( " mcl_core:jungletree " , {
2017-01-04 07:20:13 +02:00
description = " Jungle Wood " ,
2017-03-11 17:56:37 +02:00
_doc_items_longdesc = " The trunk of a jungle tree. Cocoa beans can be placed on the side of it to plant a cocoa. " ,
2015-06-29 20:55:56 +03:00
tiles = { " default_jungletree_top.png " , " default_jungletree_top.png " , " default_jungletree.png " } ,
stack_max = 64 ,
paramtype2 = " facedir " ,
2017-02-11 05:37:14 +02:00
on_place = mcl_util.rotate_axis ,
2017-02-18 22:07:57 +02:00
-- This is a bad bad workaround which is only done because cocoas are not wallmounted (but should)
-- As long cocoas only EVER stick to jungle trees, and nothing else, this is probably a lesser sin.
after_dig_node = function ( pos , oldnode , oldmetadata , digger )
-- Drop attached cocoas
local posses = {
{ x = pos.x + 1 , y = pos.y , z = pos.z } ,
{ x = pos.x - 1 , y = pos.y , z = pos.z } ,
{ x = pos.x , y = pos.y , z = pos.z + 1 } ,
{ x = pos.x , y = pos.y , z = pos.z - 1 } ,
}
for p = 1 , # posses do
local node = minetest.get_node ( posses [ p ] )
local g = minetest.get_item_group ( node.name , " cocoa " )
if g and g >= 1 then
minetest.remove_node ( posses [ p ] )
local drops = minetest.get_node_drops ( node.name , " " )
for d = 1 , # drops do
minetest.add_item ( posses [ p ] , drops [ d ] )
end
end
end
end ,
2017-02-25 17:19:24 +02:00
groups = { handy = 1 , axey = 1 , tree = 1 , flammable = 2 , building_block = 1 } ,
2017-02-11 19:46:23 +02:00
sounds = mcl_sounds.node_sound_wood_defaults ( ) ,
2017-02-22 16:40:22 +02:00
_mcl_blast_resistance = 10 ,
2017-02-24 16:56:46 +02:00
_mcl_hardness = 2 ,
2015-06-29 20:55:56 +03:00
} )
2017-02-01 00:32:56 +02:00
minetest.register_node ( " mcl_core:junglewood " , {
2017-01-04 07:20:13 +02:00
description = " Jungle Wood Planks " ,
2017-03-18 19:01:28 +02:00
_doc_items_longdesc = doc.sub . items.temp . build ,
2015-06-29 20:55:56 +03:00
tiles = { " default_junglewood.png " } ,
stack_max = 64 ,
2017-01-04 23:36:51 +02:00
is_ground_content = false ,
2017-03-11 06:34:58 +02:00
groups = { handy = 1 , axey = 1 , flammable = 3 , wood = 1 , building_block = 1 , material_wood = 1 } ,
2017-02-11 19:46:23 +02:00
sounds = mcl_sounds.node_sound_wood_defaults ( ) ,
2017-02-22 16:40:22 +02:00
_mcl_blast_resistance = 15 ,
2017-02-24 16:56:46 +02:00
_mcl_hardness = 2 ,
2015-06-29 20:55:56 +03:00
} )
2017-02-01 00:32:56 +02:00
minetest.register_node ( " mcl_core:jungleleaves " , {
2015-06-29 20:55:56 +03:00
description = " Jungle Leaves " ,
2017-03-10 23:27:27 +02:00
_doc_items_longdesc = " Jungle leaves are grown from jungle trees. " ,
2015-06-29 20:55:56 +03:00
drawtype = " allfaces_optional " ,
2017-03-08 01:25:04 +02:00
place_param2 = 1 , -- Prevent leafdecay for placed nodes
2015-06-29 20:55:56 +03:00
visual_scale = 1.3 ,
tiles = { " default_jungleleaves.png " } ,
paramtype = " light " ,
stack_max = 64 ,
2017-03-29 23:58:31 +03:00
groups = { handy = 1 , shearsy = 1 , swordy = 1 , leafdecay = 4 , flammable = 2 , leaves = 1 , deco_block = 1 , dig_by_piston = 1 } ,
2015-06-29 20:55:56 +03:00
drop = {
max_items = 1 ,
items = {
{
2017-02-01 00:32:56 +02:00
items = { ' mcl_core:junglesapling ' } ,
2017-01-04 09:01:40 +02:00
rarity = 40 ,
2015-06-29 20:55:56 +03:00
} ,
}
} ,
2017-02-11 19:46:23 +02:00
sounds = mcl_sounds.node_sound_leaves_defaults ( ) ,
2017-02-22 16:40:22 +02:00
_mcl_blast_resistance = 1 ,
2017-02-24 16:56:46 +02:00
_mcl_hardness = 0.2 ,
2015-06-29 20:55:56 +03:00
} )
2017-02-01 00:32:56 +02:00
minetest.register_node ( " mcl_core:junglesapling " , {
2015-06-29 20:55:56 +03:00
description = " Jungle Sapling " ,
2017-03-20 19:56:00 +02:00
_doc_items_longdesc = " When placed on soil (such as dirt) and exposed to light, a jungle sapling will grow into a jungle tree after some time. If the tree can't grow because of darkness, the sapling will uproot. " ,
2015-06-29 20:55:56 +03:00
drawtype = " plantlike " ,
2017-03-08 01:25:04 +02:00
place_param2 = 1 , -- Prevent leafdecay for placed nodes
2015-06-29 20:55:56 +03:00
visual_scale = 1.0 ,
tiles = { " default_junglesapling.png " } ,
inventory_image = " default_junglesapling.png " ,
wield_image = " default_junglesapling.png " ,
paramtype = " light " ,
2017-03-20 19:56:00 +02:00
sunlight_propagates = true ,
2015-06-29 20:55:56 +03:00
walkable = false ,
selection_box = {
type = " fixed " ,
2017-06-06 13:44:58 +03:00
fixed = { - 4 / 16 , - 0.5 , - 4 / 16 , 4 / 16 , 0.5 , 4 / 16 }
2015-06-29 20:55:56 +03:00
} ,
stack_max = 64 ,
2017-05-20 05:11:14 +03:00
groups = { dig_immediate = 3 , plant = 1 , sapling = 1 , non_mycelium_plant = 1 , attached_node = 1 , dig_by_water = 1 , destroy_by_lava_flow = 1 , deco_block = 1 } ,
2017-02-20 00:31:06 +02:00
sounds = mcl_sounds.node_sound_leaves_defaults ( ) ,
2017-03-08 00:28:54 +02:00
on_construct = function ( pos )
local meta = minetest.get_meta ( pos )
meta : set_int ( " stage " , 0 )
end ,
2017-05-14 02:45:57 +03:00
node_placement_prediction = " " ,
2017-02-22 16:40:22 +02:00
_mcl_blast_resistance = 0 ,
2017-02-24 16:56:46 +02:00
_mcl_hardness = 0 ,
2015-06-29 20:55:56 +03:00
} )
2017-02-16 21:22:20 +02:00
-- Acacia --
2015-06-29 20:55:56 +03:00
2017-02-01 00:32:56 +02:00
minetest.register_node ( " mcl_core:acaciatree " , {
2017-01-04 07:20:13 +02:00
description = " Acacia Wood " ,
2017-03-10 23:27:27 +02:00
_doc_items_longdesc = " The trunk of an acacia. " ,
2017-05-26 02:06:54 +03:00
tiles = { " default_acacia_tree_top.png " , " default_acacia_tree_top.png " , " default_acacia_tree.png " } ,
2015-06-29 20:55:56 +03:00
stack_max = 64 ,
paramtype2 = " facedir " ,
2017-02-11 05:37:14 +02:00
on_place = mcl_util.rotate_axis ,
2017-03-11 06:34:58 +02:00
groups = { handy = 1 , axey = 1 , tree = 1 , flammable = 2 , building_block = 1 , material_wood = 1 } ,
2017-02-11 19:46:23 +02:00
sounds = mcl_sounds.node_sound_wood_defaults ( ) ,
2017-02-22 16:40:22 +02:00
_mcl_blast_resistance = 10 ,
2017-02-24 16:56:46 +02:00
_mcl_hardness = 2 ,
2015-06-29 20:55:56 +03:00
} )
2017-02-01 00:32:56 +02:00
minetest.register_node ( " mcl_core:acaciawood " , {
2017-01-04 07:20:13 +02:00
description = " Acacia Wood Planks " ,
2017-03-18 19:01:28 +02:00
_doc_items_longdesc = doc.sub . items.temp . build ,
2017-05-26 02:06:54 +03:00
tiles = { " default_acacia_wood.png " } ,
2015-06-29 20:55:56 +03:00
stack_max = 64 ,
2017-01-04 23:36:51 +02:00
is_ground_content = false ,
2017-03-11 06:34:58 +02:00
groups = { handy = 1 , axey = 1 , flammable = 3 , wood = 1 , building_block = 1 , material_wood = 1 } ,
2017-02-11 19:46:23 +02:00
sounds = mcl_sounds.node_sound_wood_defaults ( ) ,
2017-02-22 16:40:22 +02:00
_mcl_blast_resistance = 15 ,
2017-02-24 16:56:46 +02:00
_mcl_hardness = 2 ,
2015-06-29 20:55:56 +03:00
} )
2017-02-01 00:32:56 +02:00
minetest.register_node ( " mcl_core:acacialeaves " , {
2015-06-29 20:55:56 +03:00
description = " Acacia Leaves " ,
2017-03-10 23:27:27 +02:00
_doc_items_longdesc = " Acacia leaves are grown from acacia trees. " ,
2015-06-29 20:55:56 +03:00
drawtype = " allfaces_optional " ,
2017-03-08 01:25:04 +02:00
place_param2 = 1 , -- Prevent leafdecay for placed nodes
2015-06-29 20:55:56 +03:00
visual_scale = 1.3 ,
2017-05-26 02:06:54 +03:00
tiles = { " default_acacia_leaves.png " } ,
2015-06-29 20:55:56 +03:00
paramtype = " light " ,
stack_max = 64 ,
2017-03-29 23:58:31 +03:00
groups = { handy = 1 , shearsy = 1 , swordy = 1 , leafdecay = 4 , flammable = 2 , leaves = 1 , deco_block = 1 , dig_by_piston = 1 } ,
2015-06-29 20:55:56 +03:00
drop = {
max_items = 1 ,
items = {
{
2017-02-01 00:32:56 +02:00
items = { ' mcl_core:acaciasapling ' } ,
2015-06-29 20:55:56 +03:00
rarity = 20 ,
} ,
}
} ,
2017-02-11 19:46:23 +02:00
sounds = mcl_sounds.node_sound_leaves_defaults ( ) ,
2017-02-22 16:40:22 +02:00
_mcl_blast_resistance = 1 ,
2017-02-24 16:56:46 +02:00
_mcl_hardness = 0.2 ,
2015-06-29 20:55:56 +03:00
} )
2017-02-01 00:32:56 +02:00
minetest.register_node ( " mcl_core:acaciasapling " , {
2015-06-29 20:55:56 +03:00
description = " Acacia Sapling " ,
2017-03-20 19:56:00 +02:00
_doc_items_longdesc = " When placed on soil (such as dirt) and exposed to light, an acacia sapling will grow into an acacia tree after some time. If the tree can't grow because of darkness, the sapling will uproot. " ,
2015-06-29 20:55:56 +03:00
drawtype = " plantlike " ,
visual_scale = 1.0 ,
2017-05-26 02:06:54 +03:00
tiles = { " default_acacia_sapling.png " } ,
inventory_image = " default_acacia_sapling.png " ,
wield_image = " default_acacia_sapling.png " ,
2015-06-29 20:55:56 +03:00
paramtype = " light " ,
2017-03-20 19:56:00 +02:00
sunlight_propagates = true ,
2015-06-29 20:55:56 +03:00
walkable = false ,
selection_box = {
type = " fixed " ,
fixed = { - 0.3 , - 0.5 , - 0.3 , 0.3 , 0.35 , 0.3 }
} ,
2017-03-08 00:28:54 +02:00
on_construct = function ( pos )
local meta = minetest.get_meta ( pos )
meta : set_int ( " stage " , 0 )
end ,
2017-05-14 02:45:57 +03:00
node_placement_prediction = " " ,
2015-06-29 20:55:56 +03:00
stack_max = 64 ,
2017-05-20 05:11:14 +03:00
groups = { dig_immediate = 3 , plant = 1 , sapling = 1 , non_mycelium_plant = 1 , attached_node = 1 , dig_by_water = 1 , destroy_by_lava_flow = 1 , deco_block = 1 } ,
2017-02-20 00:31:06 +02:00
sounds = mcl_sounds.node_sound_leaves_defaults ( ) ,
2017-02-22 16:40:22 +02:00
_mcl_blast_resistance = 0 ,
2017-02-24 16:56:46 +02:00
_mcl_hardness = 0 ,
2015-06-29 20:55:56 +03:00
} )
2017-02-16 21:22:20 +02:00
-- Spruce --
2015-06-29 20:55:56 +03:00
2017-02-01 00:32:56 +02:00
minetest.register_node ( " mcl_core:sprucetree " , {
2017-01-04 07:20:13 +02:00
description = " Spruce Wood " ,
2017-03-10 23:27:27 +02:00
_doc_items_longdesc = " The trunk of a spruce tree. " ,
2017-05-26 02:06:54 +03:00
tiles = { " mcl_core_log_spruce_top.png " , " mcl_core_log_spruce_top.png " , " mcl_core_log_spruce.png " } ,
2015-06-29 20:55:56 +03:00
stack_max = 64 ,
paramtype2 = " facedir " ,
2017-02-11 05:37:14 +02:00
on_place = mcl_util.rotate_axis ,
2017-03-11 06:34:58 +02:00
groups = { handy = 1 , axey = 1 , tree = 1 , flammable = 2 , building_block = 1 , material_wood = 1 } ,
2017-02-11 19:46:23 +02:00
sounds = mcl_sounds.node_sound_wood_defaults ( ) ,
2017-02-22 16:40:22 +02:00
_mcl_blast_resistance = 10 ,
2017-02-24 16:56:46 +02:00
_mcl_hardness = 2 ,
2015-06-29 20:55:56 +03:00
} )
2017-02-01 00:32:56 +02:00
minetest.register_node ( " mcl_core:sprucewood " , {
2017-01-04 07:20:13 +02:00
description = " Spruce Wood Planks " ,
2017-03-18 19:01:28 +02:00
_doc_items_longdesc = doc.sub . items.temp . build ,
2017-05-26 02:06:54 +03:00
tiles = { " mcl_core_planks_spruce.png " } ,
2015-06-29 20:55:56 +03:00
stack_max = 64 ,
2017-01-04 23:36:51 +02:00
is_ground_content = false ,
2017-03-11 06:34:58 +02:00
groups = { handy = 1 , axey = 1 , flammable = 3 , wood = 1 , building_block = 1 , material_wood = 1 } ,
2017-02-11 19:46:23 +02:00
sounds = mcl_sounds.node_sound_wood_defaults ( ) ,
2017-02-22 16:40:22 +02:00
_mcl_blast_resistance = 15 ,
2017-02-24 16:56:46 +02:00
_mcl_hardness = 2 ,
2015-06-29 20:55:56 +03:00
} )
2017-02-01 00:32:56 +02:00
minetest.register_node ( " mcl_core:spruceleaves " , {
2015-06-29 20:55:56 +03:00
description = " Spruce Leaves " ,
2017-03-10 23:27:27 +02:00
_doc_items_longdesc = " Spruce leaves are grown from spruce trees. " ,
2015-06-29 20:55:56 +03:00
drawtype = " allfaces_optional " ,
2017-03-08 01:25:04 +02:00
place_param2 = 1 , -- Prevent leafdecay for placed nodes
2015-06-29 20:55:56 +03:00
visual_scale = 1.3 ,
2017-05-26 02:06:54 +03:00
tiles = { " mcl_core_leaves_spruce.png " } ,
2015-06-29 20:55:56 +03:00
paramtype = " light " ,
stack_max = 64 ,
2017-03-29 23:58:31 +03:00
groups = { handy = 1 , shearsy = 1 , swordy = 1 , leafdecay = 4 , flammable = 2 , leaves = 1 , deco_block = 1 , dig_by_piston = 1 } ,
2015-06-29 20:55:56 +03:00
drop = {
max_items = 1 ,
items = {
{
-- player will get sapling with 1/20 chance
2017-02-01 00:32:56 +02:00
items = { ' mcl_core:sprucesapling ' } ,
2015-06-29 20:55:56 +03:00
rarity = 20 ,
} ,
{
-- player will get leaves only if he get no saplings,
-- this is because max_items is 1
items = { ' ' } ,
}
}
} ,
2017-02-11 19:46:23 +02:00
sounds = mcl_sounds.node_sound_leaves_defaults ( ) ,
2017-02-22 16:40:22 +02:00
_mcl_blast_resistance = 1 ,
2017-02-24 16:56:46 +02:00
_mcl_hardness = 0.2 ,
2015-06-29 20:55:56 +03:00
} )
2017-02-01 00:32:56 +02:00
minetest.register_node ( " mcl_core:sprucesapling " , {
2015-06-29 20:55:56 +03:00
description = " Spruce Sapling " ,
2017-03-20 19:56:00 +02:00
_doc_items_longdesc = " When placed on soil (such as dirt) and exposed to light, a spruce sapling will grow into a spruce tree after some time. If the tree can't grow because of darkness, the sapling will uproot. " ,
2015-06-29 20:55:56 +03:00
drawtype = " plantlike " ,
visual_scale = 1.0 ,
2017-05-26 02:06:54 +03:00
tiles = { " mcl_core_sapling_spruce.png " } ,
inventory_image = " mcl_core_sapling_spruce.png " ,
wield_image = " mcl_core_sapling_spruce.png " ,
2015-06-29 20:55:56 +03:00
paramtype = " light " ,
2017-03-20 19:56:00 +02:00
sunlight_propagates = true ,
2015-06-29 20:55:56 +03:00
walkable = false ,
selection_box = {
type = " fixed " ,
fixed = { - 0.3 , - 0.5 , - 0.3 , 0.3 , 0.35 , 0.3 }
} ,
stack_max = 64 ,
2017-05-20 05:11:14 +03:00
groups = { dig_immediate = 3 , plant = 1 , sapling = 1 , non_mycelium_plant = 1 , attached_node = 1 , dig_by_water = 1 , destroy_by_lava_flow = 1 , deco_block = 1 } ,
2017-02-20 00:31:06 +02:00
sounds = mcl_sounds.node_sound_leaves_defaults ( ) ,
2017-03-08 00:28:54 +02:00
on_construct = function ( pos )
local meta = minetest.get_meta ( pos )
meta : set_int ( " stage " , 0 )
end ,
2017-05-14 02:45:57 +03:00
node_placement_prediction = " " ,
2017-02-22 16:40:22 +02:00
_mcl_blast_resistance = 0 ,
2017-02-24 16:56:46 +02:00
_mcl_hardness = 0 ,
2015-06-29 20:55:56 +03:00
} )
2017-02-16 21:22:20 +02:00
-- Birch
2017-02-01 00:32:56 +02:00
minetest.register_node ( " mcl_core:birchtree " , {
2017-01-10 03:38:08 +02:00
description = " Birch Wood " ,
2017-03-10 23:27:27 +02:00
_doc_items_longdesc = " The trunk of a birch tree. " ,
2017-05-26 02:06:54 +03:00
tiles = { " mcl_core_log_birch_top.png " , " mcl_core_log_birch_top.png " , " mcl_core_log_birch.png " } ,
2017-01-10 03:38:08 +02:00
stack_max = 64 ,
paramtype2 = " facedir " ,
2017-02-11 05:37:14 +02:00
on_place = mcl_util.rotate_axis ,
2017-03-11 06:34:58 +02:00
groups = { handy = 1 , axey = 1 , tree = 1 , flammable = 2 , building_block = 1 , material_wood = 1 } ,
2017-02-11 19:46:23 +02:00
sounds = mcl_sounds.node_sound_wood_defaults ( ) ,
2017-02-22 16:40:22 +02:00
_mcl_blast_resistance = 10 ,
2017-02-24 16:56:46 +02:00
_mcl_hardness = 2 ,
2017-01-10 03:38:08 +02:00
} )
2015-06-29 20:55:56 +03:00
2017-02-01 00:32:56 +02:00
minetest.register_node ( " mcl_core:birchwood " , {
2017-01-10 03:38:08 +02:00
description = " Birch Wood Planks " ,
2017-03-18 19:01:28 +02:00
_doc_items_longdesc = doc.sub . items.temp . build ,
2017-05-26 02:06:54 +03:00
tiles = { " mcl_core_planks_birch.png " } ,
2017-01-10 03:38:08 +02:00
stack_max = 64 ,
is_ground_content = false ,
2017-03-11 06:34:58 +02:00
groups = { handy = 1 , axey = 1 , flammable = 3 , wood = 1 , building_block = 1 , material_wood = 1 } ,
2017-02-11 19:46:23 +02:00
sounds = mcl_sounds.node_sound_wood_defaults ( ) ,
2017-02-22 16:40:22 +02:00
_mcl_blast_resistance = 15 ,
2017-02-24 16:56:46 +02:00
_mcl_hardness = 2 ,
2017-01-10 03:38:08 +02:00
} )
2017-02-01 00:32:56 +02:00
minetest.register_node ( " mcl_core:birchleaves " , {
2017-01-10 03:38:08 +02:00
description = " Birch Leaves " ,
2017-03-10 23:27:27 +02:00
_doc_items_longdesc = " Birch leaves are grown from birch trees. " ,
2017-01-10 03:38:08 +02:00
drawtype = " allfaces_optional " ,
2017-03-08 01:25:04 +02:00
place_param2 = 1 , -- Prevent leafdecay for placed nodes
2017-01-10 03:38:08 +02:00
visual_scale = 1.3 ,
2017-05-26 02:06:54 +03:00
tiles = { " mcl_core_leaves_birch.png " } ,
2017-01-10 03:38:08 +02:00
paramtype = " light " ,
stack_max = 64 ,
2017-03-29 23:58:31 +03:00
groups = { handy = 1 , shearsy = 1 , swordy = 1 , leafdecay = 4 , flammable = 2 , leaves = 1 , deco_block = 1 , dig_by_piston = 1 } ,
2017-01-10 03:38:08 +02:00
drop = {
max_items = 1 ,
items = {
{
-- player will get sapling with 1/20 chance
2017-02-01 00:32:56 +02:00
items = { ' mcl_core:birchsapling ' } ,
2017-01-10 03:38:08 +02:00
rarity = 20 ,
} ,
}
} ,
2017-02-11 19:46:23 +02:00
sounds = mcl_sounds.node_sound_leaves_defaults ( ) ,
2017-02-22 16:40:22 +02:00
_mcl_blast_resistance = 1 ,
2017-02-24 16:56:46 +02:00
_mcl_hardness = 0.2 ,
2017-01-10 03:38:08 +02:00
} )
2017-02-01 00:32:56 +02:00
minetest.register_node ( " mcl_core:birchsapling " , {
2017-01-10 03:38:08 +02:00
description = " Birch Sapling " ,
2017-03-20 19:56:00 +02:00
_doc_items_longdesc = " When placed on soil (such as dirt) and exposed to light, a birch sapling will grow into a birch tree after some time. If the tree can't grow because of darkness, the sapling will uproot. " ,
2017-01-10 03:38:08 +02:00
drawtype = " plantlike " ,
visual_scale = 1.0 ,
2017-05-26 02:06:54 +03:00
tiles = { " mcl_core_sapling_birch.png " } ,
inventory_image = " mcl_core_sapling_birch.png " ,
wield_image = " mcl_core_sapling_birch.png " ,
2017-01-10 03:38:08 +02:00
paramtype = " light " ,
2017-03-20 19:56:00 +02:00
sunlight_propagates = true ,
2017-01-10 03:38:08 +02:00
walkable = false ,
selection_box = {
type = " fixed " ,
2017-06-06 13:44:58 +03:00
fixed = { - 6 / 16 , - 0.5 , - 6 / 16 , 6 / 16 , 0.5 , 6 / 16 }
2017-01-10 03:38:08 +02:00
} ,
stack_max = 64 ,
2017-05-20 05:11:14 +03:00
groups = { dig_immediate = 3 , plant = 1 , sapling = 1 , non_mycelium_plant = 1 , attached_node = 1 , dig_by_water = 1 , destroy_by_lava_flow = 1 , deco_block = 1 } ,
2017-02-20 00:31:06 +02:00
sounds = mcl_sounds.node_sound_leaves_defaults ( ) ,
2017-03-08 00:28:54 +02:00
on_construct = function ( pos )
local meta = minetest.get_meta ( pos )
meta : set_int ( " stage " , 0 )
end ,
2017-05-14 02:45:57 +03:00
node_placement_prediction = " " ,
2017-02-22 16:40:22 +02:00
_mcl_blast_resistance = 0 ,
2017-02-24 16:56:46 +02:00
_mcl_hardness = 0 ,
2017-01-10 03:38:08 +02:00
} )
2015-06-29 20:55:56 +03:00
2017-02-01 00:32:56 +02:00
minetest.register_node ( " mcl_core:cactus " , {
2015-06-29 20:55:56 +03:00
description = " Cactus " ,
2017-03-10 23:27:27 +02:00
_doc_items_longdesc = " This is a piece of cactus commonly found in dry areas, especially deserts. Over time, cacti will grow up to 3 blocks high on sand or red sand. A cactus hurts living beings touching it with a damage of 1 HP every half second. When a cactus block is broken, all cactus blocks connected above it will break as well. " ,
2017-03-21 22:48:26 +02:00
_doc_items_usagehelp = " A cactus can only be placed on top of another cactus or any sand. " ,
2015-06-29 20:55:56 +03:00
drawtype = " nodebox " ,
2017-05-26 02:06:54 +03:00
tiles = { " default_cactus_top.png " , " mcl_core_cactus_bottom.png " , " default_cactus_side.png " , " default_cactus_side.png " , " default_cactus_side.png " , " default_cactus_side.png " } ,
2015-06-29 20:55:56 +03:00
is_ground_content = true ,
stack_max = 64 ,
2017-05-14 22:37:21 +03:00
groups = { handy = 1 , attached_node = 1 , plant = 1 , deco_block = 1 , dig_by_piston = 1 } ,
2017-02-11 19:46:23 +02:00
sounds = mcl_sounds.node_sound_wood_defaults ( ) ,
2015-06-29 20:55:56 +03:00
paramtype = " light " ,
2017-03-21 22:48:26 +02:00
node_placement_prediction = " " ,
2015-06-29 20:55:56 +03:00
node_box = {
type = " fixed " ,
fixed = {
2017-03-21 22:52:22 +02:00
{ - 7 / 16 , - 8 / 16 , - 7 / 16 , 7 / 16 , 8 / 16 , 7 / 16 } , -- Main body
{ - 8 / 16 , - 8 / 16 , - 7 / 16 , 8 / 16 , 8 / 16 , - 7 / 16 } , -- Spikes
{ - 8 / 16 , - 8 / 16 , 7 / 16 , 8 / 16 , 8 / 16 , 7 / 16 } , -- Spikes
{ - 7 / 16 , - 8 / 16 , - 8 / 16 , - 7 / 16 , 8 / 16 , 8 / 16 } , -- Spikes
{ 7 / 16 , - 8 / 16 , 8 / 16 , 7 / 16 , 8 / 16 , - 8 / 16 } , -- Spikes
} ,
} ,
collision_box = {
type = " fixed " ,
2017-03-21 23:18:54 +02:00
fixed = { - 7 / 16 , - 8 / 16 , - 7 / 16 , 7 / 16 , 7 / 16 , 7 / 16 } , -- Main body. slightly lower than node box
2015-06-29 20:55:56 +03:00
} ,
selection_box = {
type = " fixed " ,
fixed = {
{ - 7 / 16 , - 8 / 16 , - 7 / 16 , 7 / 16 , 8 / 16 , 7 / 16 } ,
} ,
} ,
2017-03-21 22:48:26 +02:00
-- Only allow to place cactus on sand or cactus
2017-06-09 22:13:02 +03:00
on_place = mcl_util.generate_on_place_plant_function ( function ( pos , node )
local node_below = minetest.get_node_or_nil ( { x = pos.x , y = pos.y - 1 , z = pos.z } )
if not node_below then return false end
return ( node_below.name == " mcl_core:cactus " or minetest.get_item_group ( node_below.name , " sand " ) == 1 )
end ) ,
2017-02-22 16:40:22 +02:00
_mcl_blast_resistance = 2 ,
2017-02-24 16:56:46 +02:00
_mcl_hardness = 0.4 ,
2015-06-29 20:55:56 +03:00
} )
2017-02-01 00:32:56 +02:00
minetest.register_node ( " mcl_core:reeds " , {
2017-01-04 07:20:13 +02:00
description = " Sugar Canes " ,
2017-03-10 23:27:27 +02:00
_doc_items_longdesc = " Sugar canes are a plant which has some uses in crafting. Sugar canes will slowly grow up to 3 blocks when they are next to water and are placed on a grass block, dirt, sand, red sand, podzol or coarse dirt. When a sugar cane is broken, all sugar canes connected above will break as well. " ,
2017-06-09 22:07:00 +03:00
_doc_items_usagehelp = " Sugar canes can only be placed on blocks on which they would grow. " ,
2015-06-29 20:55:56 +03:00
drawtype = " plantlike " ,
tiles = { " default_papyrus.png " } ,
2017-05-26 02:06:54 +03:00
inventory_image = " mcl_core_reeds.png " ,
wield_image = " mcl_core_reeds.png " ,
2015-06-29 20:55:56 +03:00
paramtype = " light " ,
walkable = false ,
is_ground_content = true ,
node_box = {
type = " fixed " ,
fixed = {
{ - 7 / 16 , - 8 / 16 , - 7 / 16 , 7 / 16 , 8 / 16 , 7 / 16 } , -- Main Body
{ - 8 / 16 , - 8 / 16 , - 7 / 16 , 8 / 16 , 8 / 16 , - 7 / 16 } , -- Spikes
{ - 8 / 16 , - 8 / 16 , 7 / 16 , 8 / 16 , 8 / 16 , 7 / 16 } , -- Spikes
{ - 7 / 16 , - 8 / 16 , - 8 / 16 , - 7 / 16 , 8 / 16 , 8 / 16 } , -- Spikes
{ 7 / 16 , - 8 / 16 , 8 / 16 , 7 / 16 , 8 / 16 , - 8 / 16 } , -- Spikes
} ,
} ,
selection_box = {
type = " fixed " ,
fixed = {
2017-06-06 13:44:58 +03:00
{ - 6 / 16 , - 8 / 16 , - 6 / 16 , 6 / 16 , 8 / 16 , 6 / 16 } ,
2015-06-29 20:55:56 +03:00
} ,
} ,
stack_max = 64 ,
2017-05-14 22:37:21 +03:00
groups = { dig_immediate = 3 , craftitem = 1 , plant = 1 , non_mycelium_plant = 1 , dig_by_piston = 1 } ,
2017-02-11 19:46:23 +02:00
sounds = mcl_sounds.node_sound_leaves_defaults ( ) ,
2017-05-14 02:45:57 +03:00
node_placement_prediction = " " ,
2017-06-09 22:07:00 +03:00
on_place = mcl_util.generate_on_place_plant_function ( function ( place_pos , place_node )
local soil_pos = { x = place_pos.x , y = place_pos.y - 1 , z = place_pos.z }
local soil_node = minetest.get_node_or_nil ( soil_pos )
if not soil_node then return false end
local snn = soil_node.name -- soil node name
-- Placement rules:
-- * On group:soil_sugarcane
-- * Next to water or frosted ice
if minetest.get_item_group ( snn , " soil_sugarcane " ) == 0 then
return false
end
local posses = {
{ x = 0 , y = 0 , z = 1 } ,
{ x = 0 , y = 0 , z =- 1 } ,
{ x = 1 , y = 0 , z = 0 } ,
{ x =- 1 , y = 0 , z = 0 } ,
}
for p = 1 , # posses do
local checknode = minetest.get_node ( vector.add ( soil_pos , posses [ p ] ) )
if minetest.get_item_group ( checknode.name , " water " ) ~= 0 or minetest.get_item_group ( checknode.name , " frosted_ice " ) ~= 0 then
-- Water found! Sugar canes are happy! :-)
return true
end
end
-- No water found! Sugar canes are not amuzed and refuses to be placed. :-(
return false
end ) ,
2017-02-22 16:40:22 +02:00
_mcl_blast_resistance = 0 ,
2017-02-24 16:56:46 +02:00
_mcl_hardness = 0 ,
2015-06-29 20:55:56 +03:00
} )
2017-02-01 00:32:56 +02:00
minetest.register_node ( " mcl_core:bedrock " , {
2015-06-29 20:55:56 +03:00
description = " Bedrock " ,
2017-03-10 23:27:27 +02:00
_doc_items_longdesc = " Bedrock is a very hard type of rock. It can not be broken, destroyed, collected or moved by normal means, unless in Creative Mode. " ,
2017-05-26 02:06:54 +03:00
tiles = { " mcl_core_bedrock.png " } ,
2015-06-29 20:55:56 +03:00
stack_max = 64 ,
2017-03-11 06:34:58 +02:00
groups = { creative_breakable = 1 , building_block = 1 , material_stone = 1 } ,
2017-02-11 19:46:23 +02:00
sounds = mcl_sounds.node_sound_stone_defaults ( ) ,
2017-01-04 10:42:25 +02:00
is_ground_content = false ,
on_blast = function ( ) end ,
2017-01-05 02:00:43 +02:00
drop = ' ' ,
2017-02-22 16:40:22 +02:00
_mcl_blast_resistance = 18000000 ,
2017-02-24 16:56:46 +02:00
_mcl_hardness = - 1 ,
2015-06-29 20:55:56 +03:00
} )
2017-02-01 00:32:56 +02:00
minetest.register_node ( " mcl_core:slimeblock " , {
2015-06-29 20:55:56 +03:00
description = " Slime Block " ,
2017-03-10 23:27:27 +02:00
_doc_items_longdesc = " Slime blocks are very bouncy and prevent fall damage. " ,
2015-06-29 20:55:56 +03:00
drawtype = " nodebox " ,
paramtype = " light " ,
2017-01-04 23:36:51 +02:00
is_ground_content = false ,
2015-06-29 20:55:56 +03:00
node_box = {
type = " fixed " ,
fixed = {
{ - 0.25 , - 0.25 , - 0.25 , 0.25 , 0.25 , 0.25 } ,
{ - 0.5 , - 0.5 , - 0.5 , 0.5 , 0.5 , 0.5 } ,
}
} ,
2017-05-26 02:06:54 +03:00
tiles = { " mcl_core_slime.png " } ,
2015-06-29 20:55:56 +03:00
paramtype = " light " ,
use_texture_alpha = true ,
sunlight_propagates = true ,
stack_max = 64 ,
2017-01-04 08:19:15 +02:00
-- According to Minecraft Wiki, bouncing off a slime block from a height off 255 blocks should result in a bounce height of 50 blocks
-- bouncy=44 makes the player bounce up to 49.6. This value was chosen by experiment.
2017-06-09 01:40:48 +03:00
-- bouncy=80 was chosen because it is higher than 66 (bounciness of bed)
groups = { dig_immediate = 3 , bouncy = 80 , fall_damage_add_percent =- 100 , deco_block = 1 } ,
2017-05-26 02:33:26 +03:00
sounds = {
dug = { name = " slimenodes_dug " , gain = 0.6 } ,
place = { name = " slimenodes_place " , gain = 0.6 } ,
footstep = { name = " slimenodes_step " , gain = 0.3 } ,
} ,
2017-02-22 16:40:22 +02:00
_mcl_blast_resistance = 0 ,
2017-02-24 16:56:46 +02:00
_mcl_hardness = 0 ,
2015-06-29 20:55:56 +03:00
} )
2017-02-01 00:32:56 +02:00
minetest.register_node ( " mcl_core:glass " , {
2015-06-29 20:55:56 +03:00
description = " Glass " ,
2017-03-10 23:27:27 +02:00
_doc_items_longdesc = " A decorational and mostly transparent block. " ,
2015-06-29 20:55:56 +03:00
drawtype = " glasslike " ,
2017-01-04 23:36:51 +02:00
is_ground_content = false ,
2015-06-29 20:55:56 +03:00
tiles = { " default_glass.png " } ,
paramtype = " light " ,
sunlight_propagates = true ,
stack_max = 64 ,
2017-03-11 06:34:58 +02:00
groups = { handy = 1 , glass = 1 , building_block = 1 , material_glass = 1 } ,
2017-02-11 19:46:23 +02:00
sounds = mcl_sounds.node_sound_glass_defaults ( ) ,
2015-06-29 20:55:56 +03:00
drop = " " ,
2017-02-22 16:40:22 +02:00
_mcl_blast_resistance = 1.5 ,
2017-02-24 16:56:46 +02:00
_mcl_hardness = 0.3 ,
2015-06-29 20:55:56 +03:00
} )
---- colored glass
2017-05-15 21:42:23 +03:00
mcl_core.add_glass ( " Red Stained Glass " , " mcl_dye:red " , " basecolor_red " , " red " )
mcl_core.add_glass ( " Green Stained Glass " , " mcl_dye:dark_green " , " unicolor_dark_green " , " green " )
mcl_core.add_glass ( " Blue Stained Glass " , " mcl_dye:blue " , " basecolor_blue " , " blue " )
mcl_core.add_glass ( " Light Blue Stained Glass " , " mcl_dye:lightblue " , " unicolor_light_blue " , " light_blue " )
mcl_core.add_glass ( " Black Stained Glass " , " mcl_dye:black " , " basecolor_black " , " black " )
mcl_core.add_glass ( " White Stained Glass " , " mcl_dye:white " , " basecolor_white " , " white " )
mcl_core.add_glass ( " Yellow Stained Glass " , " mcl_dye:yellow " , " basecolor_yellow " , " yellow " )
mcl_core.add_glass ( " Brown Stained Glass " , " mcl_dye:brown " , " unicolor_dark_orange " , " brown " )
mcl_core.add_glass ( " Orange Stained Glass " , " mcl_dye:orange " , " excolor_orange " , " orange " )
mcl_core.add_glass ( " Pink Stained Glass " , " mcl_dye:pink " , " unicolor_light_red " , " pink " )
mcl_core.add_glass ( " Grey Stained Glass " , " mcl_dye:dark_grey " , " unicolor_darkgrey " , " gray " )
mcl_core.add_glass ( " Lime Stained Glass " , " mcl_dye:green " , " basecolor_green " , " lime " )
mcl_core.add_glass ( " Light Grey Stained Glass " , " mcl_dye:grey " , " basecolor_grey " , " silver " )
mcl_core.add_glass ( " Magenta Stained Glass " , " mcl_dye:magenta " , " basecolor_magenta " , " magenta " )
mcl_core.add_glass ( " Purple Stained Glass " , " mcl_dye:violet " , " excolor_violet " , " purple " )
mcl_core.add_glass ( " Cyan Stained Glass " , " mcl_dye:cyan " , " basecolor_cyan " , " cyan " )
2017-02-01 00:32:56 +02:00
minetest.register_node ( " mcl_core:ladder " , {
2015-06-29 20:55:56 +03:00
description = " Ladder " ,
2017-03-10 23:27:27 +02:00
_doc_items_longdesc = " A piece of ladder which allows you to climb vertically. Ladders can only be placed on the side of solid blocks and not on glass, leaves, ice, slabs, glowstone, nor sea lanterns. " ,
2015-06-29 20:55:56 +03:00
drawtype = " signlike " ,
2017-01-04 23:36:51 +02:00
is_ground_content = false ,
2015-06-29 20:55:56 +03:00
tiles = { " default_ladder.png " } ,
inventory_image = " default_ladder.png " ,
wield_image = " default_ladder.png " ,
paramtype = " light " ,
2017-03-01 16:41:06 +02:00
sunlight_propagates = true ,
2015-06-29 20:55:56 +03:00
paramtype2 = " wallmounted " ,
2017-03-01 16:40:30 +02:00
walkable = true ,
2015-06-29 20:55:56 +03:00
climbable = true ,
2017-03-01 16:40:30 +02:00
node_box = {
type = " wallmounted " ,
wall_side = { - 0.5 , - 0.5 , - 0.5 , - 7 / 16 , 0.5 , 0.5 } ,
} ,
2015-06-29 20:55:56 +03:00
selection_box = {
type = " wallmounted " ,
2017-03-01 16:40:30 +02:00
wall_side = { - 0.5 , - 0.5 , - 0.5 , - 7 / 16 , 0.5 , 0.5 } ,
2015-06-29 20:55:56 +03:00
} ,
stack_max = 64 ,
2017-03-29 23:58:31 +03:00
groups = { handy = 1 , axey = 1 , attached_node = 1 , deco_block = 1 , dig_by_piston = 1 } ,
2017-02-11 19:46:23 +02:00
sounds = mcl_sounds.node_sound_wood_defaults ( ) ,
2017-03-01 16:18:23 +02:00
node_placement_prediction = " " ,
-- Restrict placement of ladders
on_place = function ( itemstack , placer , pointed_thing )
if pointed_thing.type ~= " node " then
-- no interaction possible with entities
return itemstack
end
local under = pointed_thing.under
local node = minetest.get_node ( under )
local def = minetest.registered_nodes [ node.name ]
2017-03-01 16:32:51 +02:00
local groups = def.groups
2017-03-01 16:47:36 +02:00
-- Don't allow to place the ladder at particular nodes
2017-03-01 16:32:51 +02:00
if ( groups and ( groups.glass or groups.leaves or groups.slab ) ) or
2017-03-01 16:47:36 +02:00
node.name == " mcl_core:ladder " or node.name == " mcl_core:ice " or node.name == " mcl_nether:glowstone " or node.name == " mcl_ocean:sea_lantern " then
2017-03-01 16:32:51 +02:00
return itemstack
end
-- Check special rightclick action of pointed node
2017-03-01 16:18:23 +02:00
if def and def.on_rightclick then
2017-03-01 16:32:51 +02:00
if not placer : get_player_control ( ) . sneak then
return def.on_rightclick ( under , node , placer , itemstack ,
pointed_thing ) or itemstack , false
end
2017-03-01 16:18:23 +02:00
end
local above = pointed_thing.above
-- Ladders may not be placed on ceiling or floor
if under.y ~= above.y then
return itemstack
end
2017-03-10 21:32:06 +02:00
local idef = itemstack : get_definition ( )
2017-03-01 16:18:23 +02:00
local success = minetest.item_place_node ( itemstack , placer , pointed_thing )
2017-03-04 17:55:57 +02:00
if success then
if idef.sounds and idef.sounds . place then
minetest.sound_play ( idef.sounds . place , { pos = above , gain = 1 } )
end
2017-03-01 16:18:23 +02:00
end
return itemstack
end ,
2017-02-22 16:40:22 +02:00
_mcl_blast_resistance = 2 ,
2017-02-24 16:56:46 +02:00
_mcl_hardness = 0.4 ,
2015-06-29 20:55:56 +03:00
} )
2017-02-01 00:32:56 +02:00
minetest.register_node ( " mcl_core:vine " , {
2017-01-04 07:20:13 +02:00
description = " Vines " ,
2017-05-26 21:58:13 +03:00
_doc_items_longdesc = " Vines are climbable blocks which can be placed on the sides solid full-cube blocks. Vines very slowly grow upwards and downwards. " ,
2015-06-29 20:55:56 +03:00
drawtype = " signlike " ,
2017-05-26 02:06:54 +03:00
tiles = { " mcl_core_vine.png " } ,
inventory_image = " mcl_core_vine.png " ,
wield_image = " mcl_core_vine.png " ,
2015-06-29 20:55:56 +03:00
paramtype = " light " ,
2017-02-10 07:02:09 +02:00
sunlight_propagates = true ,
2015-06-29 20:55:56 +03:00
paramtype2 = " wallmounted " ,
walkable = false ,
climbable = true ,
2017-02-10 06:34:42 +02:00
buildable_to = true ,
2015-06-29 20:55:56 +03:00
selection_box = {
type = " wallmounted " ,
} ,
stack_max = 64 ,
2017-05-20 05:11:14 +03:00
groups = { handy = 1 , axey = 1 , shearsy = 1 , swordy = 1 , flammable = 2 , deco_block = 1 , destroy_by_lava_flow = 1 , dig_by_piston = 1 } ,
2017-02-11 19:46:23 +02:00
sounds = mcl_sounds.node_sound_leaves_defaults ( ) ,
2015-06-29 20:55:56 +03:00
drop = " " ,
after_dig_node = function ( pos , oldnode , oldmetadata , user )
2017-03-08 01:33:05 +02:00
local item = user : get_wielded_item ( )
if item : get_name ( ) == " mcl_tools:shears " then
2017-03-08 01:37:07 +02:00
minetest.add_item ( pos , oldnode.name )
2015-06-29 20:55:56 +03:00
end
2017-02-22 16:40:22 +02:00
end ,
2017-03-11 18:04:38 +02:00
node_placement_prediction = " " ,
-- Restrict placement of vines
on_place = function ( itemstack , placer , pointed_thing )
if pointed_thing.type ~= " node " then
-- no interaction possible with entities
return itemstack
end
local under = pointed_thing.under
local node = minetest.get_node ( under )
local def = minetest.registered_nodes [ node.name ]
local groups = def.groups
-- Check special rightclick action of pointed node
if def and def.on_rightclick then
if not placer : get_player_control ( ) . sneak then
return def.on_rightclick ( under , node , placer , itemstack ,
pointed_thing ) or itemstack , false
end
end
-- Only allow placement on solid nodes
if ( not groups ) or ( not groups.solid ) then
return itemstack
end
2017-05-26 21:58:13 +03:00
-- Only place on full cubes
if not mcl_core.supports_vines ( node.name ) then
return
end
2017-03-11 18:04:38 +02:00
local above = pointed_thing.above
2017-05-26 21:58:13 +03:00
-- Vines may not be placed on top or below another block
if under.y ~= above.y then
2017-03-11 18:04:38 +02:00
return itemstack
end
local idef = itemstack : get_definition ( )
2017-05-27 19:31:10 +03:00
local itemstack , success = minetest.item_place_node ( itemstack , placer , pointed_thing )
2017-03-11 18:04:38 +02:00
if success then
if idef.sounds and idef.sounds . place then
minetest.sound_play ( idef.sounds . place , { pos = above , gain = 1 } )
end
end
return itemstack
end ,
2017-02-22 16:40:22 +02:00
_mcl_blast_resistance = 1 ,
2017-02-24 16:56:46 +02:00
_mcl_hardness = 0.2 ,
2015-06-29 20:55:56 +03:00
} )
2017-02-01 00:32:56 +02:00
minetest.register_node ( " mcl_core:water_flowing " , {
2015-06-29 20:55:56 +03:00
description = " Flowing Water " ,
2017-03-10 23:27:27 +02:00
_doc_items_create_entry = false ,
2015-06-29 20:55:56 +03:00
inventory_image = minetest.inventorycube ( " default_water.png " ) ,
drawtype = " flowingliquid " ,
2017-01-05 05:53:52 +02:00
tiles = { name = " default_water_flowing_animated.png " , animation = { type = " vertical_frames " , aspect_w = 32 , aspect_h = 32 , length = 2.0 } } ,
2015-06-29 20:55:56 +03:00
special_tiles = {
{
image = " default_water_flowing_animated.png " ,
backface_culling = false ,
2017-01-05 05:53:52 +02:00
animation = { type = " vertical_frames " , aspect_w = 64 , aspect_h = 64 , length = 2.0 }
2015-06-29 20:55:56 +03:00
} ,
{
image = " default_water_flowing_animated.png " ,
backface_culling = true ,
2017-01-05 05:53:52 +02:00
animation = { type = " vertical_frames " , aspect_w = 64 , aspect_h = 64 , length = 2.0 }
2015-06-29 20:55:56 +03:00
} ,
} ,
2017-06-06 22:10:24 +03:00
sounds = mcl_sounds.node_sound_water_defaults ( table ) ,
2015-06-29 20:55:56 +03:00
alpha = WATER_ALPHA ,
paramtype = " light " ,
paramtype2 = " flowingliquid " ,
walkable = false ,
pointable = false ,
diggable = false ,
buildable_to = true ,
drop = " " ,
2017-01-12 01:59:56 +02:00
drowning = 4 ,
2015-06-29 20:55:56 +03:00
liquidtype = " flowing " ,
2017-02-01 00:32:56 +02:00
liquid_alternative_flowing = " mcl_core:water_flowing " ,
liquid_alternative_source = " mcl_core:water_source " ,
2015-06-29 20:55:56 +03:00
liquid_viscosity = WATER_VISC ,
liquid_range = 7 ,
2017-05-22 21:53:40 +03:00
post_effect_color = { a = 192 , r = 15 , g = 22 , b = 77 } ,
2017-03-29 23:58:31 +03:00
groups = { water = 3 , liquid = 3 , puts_out_fire = 1 , not_in_creative_inventory = 1 , freezes = 1 , melt_around = 1 , dig_by_piston = 1 } ,
2017-02-22 16:40:22 +02:00
_mcl_blast_resistance = 500 ,
2017-03-01 19:49:47 +02:00
-- Hardness intentionally set to infinite instead of 100 (Minecraft value) to avoid problems in creative mode
_mcl_hardness = - 1 ,
2015-06-29 20:55:56 +03:00
} )
2017-02-01 00:32:56 +02:00
minetest.register_node ( " mcl_core:water_source " , {
2017-01-12 02:41:40 +02:00
description = " Still Water " ,
2017-03-10 23:27:27 +02:00
_doc_items_entry_name = " Water " ,
2017-05-23 07:18:57 +03:00
_doc_items_longdesc =
[ [ Water is abundant in oceans and also appears in a few springs in the ground . You can swim easily in water , but you need to catch your breath from time to time .
Water interacts with lava in various ways :
• When water is directly above or horizontally next to still lava , the lava turns into obsidian .
• When flowing water touches flowing lava either from above or horizontally , the lava turns into cobblestone .
• When water is directly below lava , the water turns into stone . ] ] ,
2017-03-20 17:38:16 +02:00
_doc_items_hidden = false ,
2015-06-29 20:55:56 +03:00
inventory_image = minetest.inventorycube ( " default_water.png " ) ,
drawtype = " liquid " ,
tiles = {
{ name = " default_water_source_animated.png " , animation = { type = " vertical_frames " , aspect_w = 32 , aspect_h = 32 , length = 5.0 } }
} ,
special_tiles = {
-- New-style water source material (mostly unused)
{
name = " default_water_source_animated.png " ,
animation = { type = " vertical_frames " , aspect_w = 32 , aspect_h = 32 , length = 5.0 } ,
backface_culling = false ,
}
} ,
2017-06-06 22:10:24 +03:00
sounds = mcl_sounds.node_sound_water_defaults ( table ) ,
2015-06-29 20:55:56 +03:00
alpha = WATER_ALPHA ,
paramtype = " light " ,
walkable = false ,
pointable = false ,
diggable = false ,
buildable_to = true ,
drop = " " ,
2017-01-12 01:59:56 +02:00
drowning = 4 ,
2015-06-29 20:55:56 +03:00
liquidtype = " source " ,
2017-02-01 00:32:56 +02:00
liquid_alternative_flowing = " mcl_core:water_flowing " ,
liquid_alternative_source = " mcl_core:water_source " ,
2015-06-29 20:55:56 +03:00
liquid_viscosity = WATER_VISC ,
liquid_range = 7 ,
2017-05-22 21:53:40 +03:00
post_effect_color = { a = 192 , r = 15 , g = 22 , b = 77 } ,
2015-06-29 20:55:56 +03:00
stack_max = 64 ,
2017-03-29 23:58:31 +03:00
groups = { water = 3 , liquid = 3 , puts_out_fire = 1 , freezes = 1 , not_in_creative_inventory = 1 , dig_by_piston = 1 } ,
2017-02-22 16:40:22 +02:00
_mcl_blast_resistance = 500 ,
2017-03-01 19:49:47 +02:00
-- Hardness intentionally set to infinite instead of 100 (Minecraft value) to avoid problems in creative mode
_mcl_hardness = - 1 ,
2015-06-29 20:55:56 +03:00
} )
2017-02-01 00:32:56 +02:00
minetest.register_node ( " mcl_core:lava_flowing " , {
2015-06-29 20:55:56 +03:00
description = " Flowing Lava " ,
2017-03-10 23:27:27 +02:00
_doc_items_create_entry = false ,
2015-06-29 20:55:56 +03:00
inventory_image = minetest.inventorycube ( " default_lava.png " ) ,
drawtype = " flowingliquid " ,
tiles = { " default_lava.png " } ,
special_tiles = {
{
image = " default_lava_flowing_animated.png " ,
backface_culling = false ,
animation = { type = " vertical_frames " , aspect_w = 64 , aspect_h = 64 , length = 3.3 }
} ,
{
image = " default_lava_flowing_animated.png " ,
backface_culling = true ,
animation = { type = " vertical_frames " , aspect_w = 64 , aspect_h = 64 , length = 3.3 }
} ,
} ,
paramtype = " light " ,
paramtype2 = " flowingliquid " ,
2017-02-01 23:12:08 +02:00
-- Real light level: 15 (but Minetest caps at 14)
2017-01-04 11:11:35 +02:00
light_source = 14 ,
2015-06-29 20:55:56 +03:00
walkable = false ,
pointable = false ,
diggable = false ,
buildable_to = true ,
drop = " " ,
2017-01-12 01:59:56 +02:00
--[[ Drowning in Minecraft deals 2 damage per second.
In Minetest , drowning damage is dealt every 2 seconds so this
translates to 4 drowning damage ] ]
drowning = 4 ,
2015-06-29 20:55:56 +03:00
liquidtype = " flowing " ,
2017-02-01 00:32:56 +02:00
liquid_alternative_flowing = " mcl_core:lava_flowing " ,
liquid_alternative_source = " mcl_core:lava_source " ,
2015-06-29 20:55:56 +03:00
liquid_viscosity = LAVA_VISC ,
liquid_renewable = false ,
2017-05-22 23:31:22 +03:00
liquid_range = 3 ,
2015-06-29 20:55:56 +03:00
damage_per_second = 4 * 2 ,
2017-05-22 20:37:35 +03:00
post_effect_color = { a = 255 , r = 208 , g = 73 , b = 10 } ,
2017-05-20 03:46:47 +03:00
groups = { lava = 3 , liquid = 2 , destroys_items = 1 , not_in_creative_inventory = 1 , dig_by_piston = 1 } ,
2017-02-22 16:40:22 +02:00
_mcl_blast_resistance = 500 ,
2017-03-01 19:49:47 +02:00
-- Hardness intentionally set to infinite instead of 100 (Minecraft value) to avoid problems in creative mode
_mcl_hardness = - 1 ,
2015-06-29 20:55:56 +03:00
} )
2017-02-01 00:32:56 +02:00
minetest.register_node ( " mcl_core:lava_source " , {
2017-01-12 02:41:40 +02:00
description = " Still Lava " ,
2017-03-10 23:27:27 +02:00
_doc_items_entry_name = " Lava " ,
2017-05-23 07:18:57 +03:00
_doc_items_longdesc =
[ [ Lava is hot and rather dangerous . Don ' t touch it, it will hurt you a lot and it is hard to get out.
Still lava sets fire to a couple of air blocks above when they ' re next to a flammable block.
Lava interacts with water various ways :
• When still lava is directly below or horizontally next to water , the lava turns into obsidian .
• When flowing water touches flowing lava either from above or horizontally , the lava turns into cobblestone .
• When lava is directly above water , the water turns into stone . ] ] ,
2015-06-29 20:55:56 +03:00
inventory_image = minetest.inventorycube ( " default_lava.png " ) ,
drawtype = " liquid " ,
tiles = {
{ name = " default_lava_source_animated.png " , animation = { type = " vertical_frames " , aspect_w = 16 , aspect_h = 16 , length = 3.0 } }
} ,
special_tiles = {
-- New-style lava source material (mostly unused)
{
name = " default_lava_source_animated.png " ,
animation = { type = " vertical_frames " , aspect_w = 32 , aspect_h = 32 , length = 3.0 } ,
backface_culling = false ,
}
} ,
paramtype = " light " ,
2017-02-01 23:12:08 +02:00
-- Real light level: 15 (but Minetest caps at 14)
2017-01-04 11:11:35 +02:00
light_source = 14 ,
2015-06-29 20:55:56 +03:00
walkable = false ,
pointable = false ,
diggable = false ,
buildable_to = true ,
drop = " " ,
2017-01-12 01:59:56 +02:00
drowning = 4 ,
2015-06-29 20:55:56 +03:00
liquidtype = " source " ,
2017-02-01 00:32:56 +02:00
liquid_alternative_flowing = " mcl_core:lava_flowing " ,
liquid_alternative_source = " mcl_core:lava_source " ,
2015-06-29 20:55:56 +03:00
liquid_viscosity = LAVA_VISC ,
liquid_renewable = false ,
2017-05-22 23:31:22 +03:00
liquid_range = 3 ,
2015-06-29 20:55:56 +03:00
damage_per_second = 4 * 2 ,
2017-05-22 20:37:35 +03:00
post_effect_color = { a = 255 , r = 208 , g = 73 , b = 10 } ,
2015-06-29 20:55:56 +03:00
stack_max = 64 ,
2017-05-20 03:46:47 +03:00
groups = { lava = 3 , liquid = 2 , destroys_items = 1 , not_in_creative_inventory = 1 , dig_by_piston = 1 } ,
2017-02-22 16:40:22 +02:00
_mcl_blast_resistance = 500 ,
2017-03-01 19:49:47 +02:00
-- Hardness intentionally set to infinite instead of 100 (Minecraft value) to avoid problems in creative mode
_mcl_hardness = - 1 ,
2015-06-29 20:55:56 +03:00
} )
2017-02-01 00:32:56 +02:00
minetest.register_node ( " mcl_core:cobble " , {
2015-06-29 20:55:56 +03:00
description = " Cobblestone " ,
2017-03-18 19:01:28 +02:00
_doc_items_longdesc = doc.sub . items.temp . build ,
2017-03-20 17:38:16 +02:00
_doc_items_hidden = false ,
2015-06-29 20:55:56 +03:00
tiles = { " default_cobble.png " } ,
2017-03-11 17:36:05 +02:00
is_ground_content = false ,
2015-06-29 20:55:56 +03:00
stack_max = 64 ,
2017-03-11 06:34:58 +02:00
groups = { pickaxey = 1 , building_block = 1 , deco_block = 1 , material_stone = 1 } ,
2017-02-11 19:46:23 +02:00
sounds = mcl_sounds.node_sound_stone_defaults ( ) ,
2017-02-22 16:40:22 +02:00
_mcl_blast_resistance = 30 ,
2017-02-24 16:56:46 +02:00
_mcl_hardness = 2 ,
2015-06-29 20:55:56 +03:00
} )
2017-02-01 00:32:56 +02:00
minetest.register_node ( " mcl_core:mossycobble " , {
2017-01-04 07:20:13 +02:00
description = " Moss Stone " ,
2017-03-18 19:01:28 +02:00
_doc_items_longdesc = doc.sub . items.temp . build ,
2015-06-29 20:55:56 +03:00
tiles = { " default_mossycobble.png " } ,
2017-03-11 17:36:05 +02:00
is_ground_content = false ,
2015-06-29 20:55:56 +03:00
stack_max = 64 ,
2017-03-11 06:34:58 +02:00
groups = { pickaxey = 1 , building_block = 1 , material_stone = 1 } ,
2017-02-11 19:46:23 +02:00
sounds = mcl_sounds.node_sound_stone_defaults ( ) ,
2017-02-22 16:40:22 +02:00
_mcl_blast_resistance = 30 ,
2017-02-24 16:56:46 +02:00
_mcl_hardness = 2 ,
2015-06-29 20:55:56 +03:00
} )
2017-02-01 00:32:56 +02:00
minetest.register_node ( " mcl_core:coalblock " , {
2017-01-04 12:44:55 +02:00
description = " Block of Coal " ,
2017-03-10 23:27:27 +02:00
_doc_items_longdesc = " Blocks of coal are useful as a compact storage of coal and very useful as a furnace fuel. A block of coal is as efficient as 10 coal. " ,
2017-01-04 12:44:55 +02:00
tiles = { " default_coal_block.png " } ,
2017-01-04 23:36:51 +02:00
is_ground_content = false ,
2017-01-04 12:44:55 +02:00
stack_max = 64 ,
2017-03-11 06:34:58 +02:00
groups = { pickaxey = 1 , flammable = 1 , building_block = 1 , material_stone = 1 } ,
2017-02-11 19:46:23 +02:00
sounds = mcl_sounds.node_sound_stone_defaults ( ) ,
2017-02-22 16:40:22 +02:00
_mcl_blast_resistance = 30 ,
2017-02-24 16:56:46 +02:00
_mcl_hardness = 5 ,
2017-01-04 12:44:55 +02:00
} )
2017-02-11 22:14:40 +02:00
minetest.register_node ( " mcl_core:ironblock " , {
2017-01-04 06:29:55 +02:00
description = " Block of Iron " ,
2017-03-10 23:27:27 +02:00
_doc_items_longdesc = " A block of iron is mostly a decorational block but also useful as a compact storage of iron ingots. " ,
2015-06-29 20:55:56 +03:00
tiles = { " default_steel_block.png " } ,
2017-01-04 23:36:51 +02:00
is_ground_content = false ,
2015-06-29 20:55:56 +03:00
stack_max = 64 ,
2017-02-25 17:19:24 +02:00
groups = { pickaxey = 2 , building_block = 1 } ,
2017-06-06 22:10:24 +03:00
sounds = mcl_sounds.node_sound_metal_defaults ( ) ,
2017-02-22 16:40:22 +02:00
_mcl_blast_resistance = 30 ,
2017-02-24 16:56:46 +02:00
_mcl_hardness = 5 ,
2015-06-29 20:55:56 +03:00
} )
2017-02-01 00:32:56 +02:00
minetest.register_node ( " mcl_core:goldblock " , {
2017-01-04 07:20:13 +02:00
description = " Block of Gold " ,
2017-03-10 23:27:27 +02:00
_doc_items_longdesc = " A block of gold is mostly a shiny decorational block but also useful as a compact storage of gold ingots. " ,
2015-06-29 20:55:56 +03:00
tiles = { " default_gold_block.png " } ,
2017-01-04 23:36:51 +02:00
is_ground_content = false ,
2015-06-29 20:55:56 +03:00
stack_max = 64 ,
2017-02-25 17:19:24 +02:00
groups = { pickaxey = 4 , building_block = 1 } ,
2017-06-06 22:10:24 +03:00
sounds = mcl_sounds.node_sound_metal_defaults ( ) ,
2017-02-22 16:40:22 +02:00
_mcl_blast_resistance = 30 ,
2017-02-24 16:56:46 +02:00
_mcl_hardness = 5 ,
2015-06-29 20:55:56 +03:00
} )
2017-02-01 00:32:56 +02:00
minetest.register_node ( " mcl_core:diamondblock " , {
2017-01-04 07:20:13 +02:00
description = " Block of Diamond " ,
2017-03-10 23:27:27 +02:00
_doc_items_longdesc = " A block of diamond mostly a shiny decorational block but also useful as a compact storage of diamonds. " ,
2015-06-29 20:55:56 +03:00
tiles = { " default_diamond_block.png " } ,
2017-01-04 23:36:51 +02:00
is_ground_content = false ,
2015-06-29 20:55:56 +03:00
stack_max = 64 ,
2017-02-25 17:19:24 +02:00
groups = { pickaxey = 4 , building_block = 1 } ,
2017-02-11 19:46:23 +02:00
sounds = mcl_sounds.node_sound_stone_defaults ( ) ,
2017-02-22 16:40:22 +02:00
_mcl_blast_resistance = 30 ,
2017-02-24 16:56:46 +02:00
_mcl_hardness = 5 ,
2015-06-29 20:55:56 +03:00
} )
2017-02-01 00:32:56 +02:00
minetest.register_node ( " mcl_core:lapisblock " , {
2017-02-09 01:10:37 +02:00
description = " Lapis Lazuli Block " ,
2017-03-10 23:27:27 +02:00
_doc_items_longdesc = " A lapis lazuli block is mostly a decorational block but also useful as a compact storage of lapis lazuli. " ,
2017-05-26 02:06:54 +03:00
tiles = { " mcl_core_lapis_block.png " } ,
2017-01-04 23:36:51 +02:00
is_ground_content = false ,
2015-06-29 20:55:56 +03:00
stack_max = 64 ,
2017-02-25 17:19:24 +02:00
groups = { pickaxey = 3 , building_block = 1 } ,
2017-02-11 19:46:23 +02:00
sounds = mcl_sounds.node_sound_stone_defaults ( ) ,
2017-02-22 16:40:22 +02:00
_mcl_blast_resistance = 15 ,
2017-02-24 16:56:46 +02:00
_mcl_hardness = 3 ,
2015-06-29 20:55:56 +03:00
} )
2017-02-01 00:32:56 +02:00
minetest.register_node ( " mcl_core:emeraldblock " , {
2017-01-04 07:20:13 +02:00
description = " Block of Emerald " ,
2017-03-10 23:27:27 +02:00
_doc_items_longdesc = " A block of emerald is mostly a shiny decorational block but also useful as a compact storage of emeralds. " ,
2017-05-26 02:06:54 +03:00
tiles = { " mcl_core_emerald_block.png " } ,
2017-01-04 23:36:51 +02:00
is_ground_content = false ,
2015-06-29 20:55:56 +03:00
stack_max = 64 ,
2017-02-25 17:19:24 +02:00
groups = { pickaxey = 4 , building_block = 1 } ,
2017-02-11 19:46:23 +02:00
sounds = mcl_sounds.node_sound_stone_defaults ( ) ,
2017-02-22 16:40:22 +02:00
_mcl_blast_resistance = 30 ,
2017-02-24 16:56:46 +02:00
_mcl_hardness = 5 ,
2015-06-29 20:55:56 +03:00
} )
2017-02-01 00:32:56 +02:00
minetest.register_node ( " mcl_core:obsidian " , {
2015-06-29 20:55:56 +03:00
description = " Obsidian " ,
2017-03-10 23:27:27 +02:00
_doc_items_longdesc = " Obsidian is an extremely hard mineral with an enourmous blast-resistance. Obsidian is formed when water meets lava. " ,
2015-06-29 20:55:56 +03:00
tiles = { " default_obsidian.png " } ,
is_ground_content = true ,
2017-02-11 19:46:23 +02:00
sounds = mcl_sounds.node_sound_stone_defaults ( ) ,
2015-06-29 20:55:56 +03:00
stack_max = 64 ,
2017-03-11 06:34:58 +02:00
groups = { pickaxey = 5 , building_block = 1 , material_stone = 1 } ,
2017-02-22 16:40:22 +02:00
_mcl_blast_resistance = 6000 ,
2017-02-24 16:56:46 +02:00
_mcl_hardness = 50 ,
2015-06-29 20:55:56 +03:00
} )
2017-02-11 22:00:42 +02:00
minetest.register_node ( " mcl_core:deadbush " , {
2017-01-04 09:01:40 +02:00
description = " Dead Bush " ,
2017-03-11 18:32:39 +02:00
_doc_items_longdesc = " Dead bushes are unremarkable plants often found in dry areas. They can be harvested for sticks. " ,
2017-03-20 17:38:16 +02:00
_doc_items_hidden = false ,
2015-06-29 20:55:56 +03:00
drawtype = " plantlike " ,
visual_scale = 1.0 ,
tiles = { " default_dry_shrub.png " } ,
inventory_image = " default_dry_shrub.png " ,
wield_image = " default_dry_shrub.png " ,
paramtype = " light " ,
2017-03-20 19:47:44 +02:00
sunlight_propagates = true ,
2015-06-29 20:55:56 +03:00
walkable = false ,
stack_max = 64 ,
2017-03-14 17:24:54 +02:00
buildable_to = true ,
2017-05-20 05:11:14 +03:00
groups = { dig_immediate = 3 , flammable = 3 , attached_node = 1 , plant = 1 , non_mycelium_plant = 1 , dig_by_water = 1 , destroy_by_lava_flow = 1 , deco_block = 1 } ,
2017-01-04 09:01:40 +02:00
drop = {
max_items = 1 ,
items = {
{
2017-02-01 00:32:56 +02:00
items = { " mcl_core:stick 2 " } ,
2017-01-04 09:01:40 +02:00
rarity = 2 ,
} ,
{
2017-02-01 00:32:56 +02:00
items = { " mcl_core:stick 1 " } ,
2017-01-04 09:01:40 +02:00
rarity = 2 ,
} ,
}
} ,
2017-02-11 19:46:23 +02:00
sounds = mcl_sounds.node_sound_leaves_defaults ( ) ,
2015-06-29 20:55:56 +03:00
selection_box = {
type = " fixed " ,
2017-03-14 17:24:54 +02:00
fixed = { - 6 / 16 , - 8 / 16 , - 6 / 16 , 6 / 16 , 8 / 16 , 6 / 16 } ,
2015-06-29 20:55:56 +03:00
} ,
2017-05-14 02:45:57 +03:00
node_placement_prediction = " " ,
2017-02-22 16:40:22 +02:00
_mcl_blast_resistance = 0 ,
2017-02-24 16:56:46 +02:00
_mcl_hardness = 0 ,
2015-06-29 20:55:56 +03:00
} )
2017-02-01 00:32:56 +02:00
minetest.register_node ( " mcl_core:ice " , {
2015-06-29 20:55:56 +03:00
description = " Ice " ,
2017-03-11 18:32:39 +02:00
_doc_items_longdesc = " Ice is a translucent solid block usually found in cold areas. " ,
2015-06-29 20:55:56 +03:00
drawtype = " glasslike " ,
tiles = { " default_ice.png " } ,
is_ground_content = true ,
paramtype = " light " ,
use_texture_alpha = true ,
stack_max = 64 ,
2017-02-25 17:19:24 +02:00
groups = { handy = 1 , pickaxey = 1 , building_block = 1 } ,
2017-01-04 09:01:40 +02:00
drop = " " ,
2017-02-11 19:46:23 +02:00
sounds = mcl_sounds.node_sound_glass_defaults ( ) ,
2017-02-22 16:40:22 +02:00
_mcl_blast_resistance = 2.5 ,
2017-02-24 16:56:46 +02:00
_mcl_hardness = 0.5 ,
2015-06-29 20:55:56 +03:00
} )
2017-02-01 00:32:56 +02:00
minetest.register_node ( " mcl_core:packed_ice " , {
2015-06-29 20:55:56 +03:00
description = " Packed Ice " ,
2017-03-11 18:32:39 +02:00
_doc_items_longdesc = " Packed ice is a compressed form of ice. It is opaque and solid. " ,
2017-05-26 02:06:54 +03:00
tiles = { " mcl_core_ice_packed.png " } ,
2015-06-29 20:55:56 +03:00
is_ground_content = true ,
stack_max = 64 ,
2017-02-25 17:19:24 +02:00
groups = { handy = 1 , pickaxey = 1 , building_block = 1 } ,
2017-01-04 09:01:40 +02:00
drop = " " ,
2017-02-11 19:46:23 +02:00
sounds = mcl_sounds.node_sound_glass_defaults ( ) ,
2017-02-22 16:40:22 +02:00
_mcl_blast_resistance = 2.5 ,
2017-02-24 16:56:46 +02:00
_mcl_hardness = 0.5 ,
2015-06-29 20:55:56 +03:00
} )
2017-01-08 03:49:07 +02:00
-- Frosted Ice (4 nodes)
for i = 0 , 3 do
local ice = { }
ice.increase_age = function ( pos , ice_near , first_melt )
-- Increase age of frosted age or turn to water source if too old
local nn = minetest.get_node ( pos ) . name
local age = tonumber ( string.sub ( nn , - 1 ) )
if age == nil then return end
local nextnode
if age < 3 then
2017-02-01 00:32:56 +02:00
nextnode = " mcl_core:frosted_ice_ " .. ( age + 1 )
2017-01-08 03:49:07 +02:00
else
2017-02-01 00:32:56 +02:00
nextnode = " mcl_core:water_source "
2017-01-08 03:49:07 +02:00
end
minetest.swap_node ( pos , { name = nextnode } )
-- Spread aging to neighbor blocks, but not recursively
if first_melt and i == 3 then
for j = 1 , # ice_near do
ice.increase_age ( ice_near [ j ] , false )
end
end
end
2017-03-20 19:12:05 +02:00
local use_doc = i == 0
2017-03-11 18:32:39 +02:00
local longdesc
2017-03-20 19:12:05 +02:00
if use_doc then
2017-03-11 18:32:39 +02:00
longdesc = " Frosted ice is a short-lived solid translucent block. It melts into a water source within a few seconds. "
end
2017-02-01 00:32:56 +02:00
minetest.register_node ( " mcl_core:frosted_ice_ " .. i , {
2017-01-08 03:49:07 +02:00
description = " Frosted Ice " ,
2017-03-20 19:12:05 +02:00
_doc_items_create_entry = use_doc ,
2017-03-11 18:32:39 +02:00
_doc_items_longdesc = longdesc ,
2017-01-08 03:49:07 +02:00
drawtype = " glasslike " ,
2017-05-26 02:06:54 +03:00
tiles = { " mcl_core_frosted_ice_ " .. i .. " .png " } ,
2017-01-08 03:49:07 +02:00
is_ground_content = false ,
paramtype = " light " ,
use_texture_alpha = true ,
stack_max = 64 ,
2017-02-25 17:19:24 +02:00
groups = { handy = 1 , frosted_ice = 1 , not_in_creative_inventory = 1 } ,
2017-01-08 03:49:07 +02:00
drop = " " ,
2017-02-11 19:46:23 +02:00
sounds = mcl_sounds.node_sound_glass_defaults ( ) ,
2017-01-08 03:49:07 +02:00
on_construct = function ( pos )
local timer = minetest.get_node_timer ( pos )
timer : start ( 1.5 )
end ,
on_timer = function ( pos , elapsed )
local ice_near = minetest.find_nodes_in_area (
{ x = pos.x - 1 , y = pos.y - 1 , z = pos.z - 1 } ,
{ x = pos.x + 1 , y = pos.y + 1 , z = pos.z + 1 } ,
{ " group:frosted_ice " }
)
-- Check condition to increase age
if ( # ice_near < 4 and minetest.get_node_light ( pos ) > ( 11 - i ) ) or math.random ( 1 , 3 ) == 1 then
ice.increase_age ( pos , ice_near , true )
end
local timer = minetest.get_node_timer ( pos )
timer : start ( 1.5 )
end ,
2017-02-22 16:40:22 +02:00
_mcl_blast_resistance = 2.5 ,
2017-02-24 16:56:46 +02:00
_mcl_hardness = 0.5 ,
2017-01-08 03:49:07 +02:00
} )
2017-03-20 19:12:05 +02:00
-- Add entry aliases for the Help
if minetest.get_modpath ( " doc " ) and i > 0 then
doc.add_entry_alias ( " nodes " , " mcl_core:frosted_ice_0 " , " nodes " , " mcl_core:frosted_ice_ " .. i )
end
2017-01-08 03:49:07 +02:00
end
2017-04-01 08:10:05 +03:00
local on_snow_construct = function ( pos )
local npos = { x = pos.x , y = pos.y - 1 , z = pos.z }
local node = minetest.get_node ( npos )
if node.name == " mcl_core:dirt_with_grass " then
minetest.swap_node ( npos , { name = " mcl_core:dirt_with_grass_snow " } )
elseif node.name == " mcl_core:podzol " then
minetest.swap_node ( npos , { name = " mcl_core:podzol_snow " } )
elseif node.name == " mcl_core:mycelium " then
minetest.swap_node ( npos , { name = " mcl_core:mycelium_snow " } )
end
end
2017-04-01 08:29:22 +03:00
local after_snow_destruct = function ( pos , oldnode )
local nn = minetest.get_node ( pos ) . name
-- No-op if snow was replaced with snow
if nn == " mcl_core:snow " or nn == " mcl_core:snowblock " then
return
end
2017-04-01 08:10:05 +03:00
local npos = { x = pos.x , y = pos.y - 1 , z = pos.z }
local node = minetest.get_node ( npos )
if node.name == " mcl_core:dirt_with_grass_snow " then
minetest.swap_node ( npos , { name = " mcl_core:dirt_with_grass " } )
elseif node.name == " mcl_core:podzol_snow " then
minetest.swap_node ( npos , { name = " mcl_core:podzol " } )
elseif node.name == " mcl_core:mycelium_snow " then
minetest.swap_node ( npos , { name = " mcl_core:mycelium " } )
end
end
2017-02-01 00:32:56 +02:00
minetest.register_node ( " mcl_core:snow " , {
2017-01-04 12:26:35 +02:00
description = " Top Snow " ,
2017-03-11 18:32:39 +02:00
_doc_items_longdesc = " Top snow is a thin layer of snow. " ,
2017-03-20 17:38:16 +02:00
_doc_items_hidden = false ,
2015-06-29 20:55:56 +03:00
tiles = { " default_snow.png " } ,
2017-03-02 17:38:56 +02:00
wield_image = " default_snow.png " ,
2017-03-02 18:03:14 +02:00
wield_scale = { x = 1 , y = 1 , z = 1 } ,
2015-06-29 20:55:56 +03:00
is_ground_content = true ,
paramtype = " light " ,
2017-03-02 18:31:21 +02:00
sunlight_propagates = true ,
2015-06-29 20:55:56 +03:00
buildable_to = true ,
drawtype = " nodebox " ,
2017-03-02 17:39:58 +02:00
stack_max = 64 ,
2017-03-02 18:33:50 +02:00
floodable = true ,
2015-06-29 20:55:56 +03:00
node_box = {
type = " fixed " ,
fixed = {
{ - 0.5 , - 0.5 , - 0.5 , 0.5 , - 0.5 + 2 / 16 , 0.5 } ,
} ,
} ,
2017-03-29 23:58:31 +03:00
groups = { shovely = 1 , attached_node = 1 , deco_block = 1 , dig_by_piston = 1 } ,
2017-02-19 20:48:16 +02:00
sounds = mcl_sounds.node_sound_snow_defaults ( ) ,
2017-04-01 08:10:05 +03:00
on_construct = on_snow_construct ,
2017-04-01 08:29:22 +03:00
after_destruct = after_snow_destruct ,
2017-01-17 00:11:04 +02:00
drop = " mcl_throwing:snowball 2 " ,
2017-02-22 16:40:22 +02:00
_mcl_blast_resistance = 0.5 ,
2017-02-24 16:56:46 +02:00
_mcl_hardness = 0.1 ,
2015-06-29 20:55:56 +03:00
} )
2017-02-01 00:32:56 +02:00
minetest.register_node ( " mcl_core:snowblock " , {
2017-01-04 07:20:13 +02:00
description = " Snow " ,
2017-03-11 18:32:39 +02:00
_doc_items_longdesc = " This is a full block of snow. Snow of this thickness is usually found in areas of extreme cold. " ,
2017-03-20 17:38:16 +02:00
_doc_items_hidden = false ,
2015-06-29 20:55:56 +03:00
tiles = { " default_snow.png " } ,
is_ground_content = true ,
stack_max = 64 ,
2017-02-25 17:19:24 +02:00
groups = { shovely = 1 , building_block = 1 } ,
2017-02-19 20:48:16 +02:00
sounds = mcl_sounds.node_sound_snow_defaults ( ) ,
2017-04-01 08:10:05 +03:00
on_construct = on_snow_construct ,
2017-04-01 08:29:22 +03:00
after_destruct = after_snow_destruct ,
2017-01-17 00:11:04 +02:00
drop = " mcl_throwing:snowball 4 " ,
2017-02-22 16:40:22 +02:00
_mcl_blast_resistance = 1 ,
2017-02-24 16:56:46 +02:00
_mcl_hardness = 0.2 ,
2015-06-29 20:55:56 +03:00
} )
2017-02-01 00:32:56 +02:00
minetest.register_node ( " mcl_core:cobweb " , {
2017-03-28 02:34:13 +03:00
description = " Cobweb " ,
2017-03-10 23:27:27 +02:00
_doc_items_longdesc = " Cobwebs can be walked through, but significantly slow you down. " ,
2017-03-28 02:34:13 +03:00
drawtype = " plantlike " ,
2017-01-20 19:56:38 +02:00
paramtype2 = " degrotate " ,
2017-03-28 02:34:13 +03:00
visual_scale = 1.1 ,
stack_max = 64 ,
tiles = { " mcl_core_web.png " } ,
inventory_image = " mcl_core_web.png " ,
paramtype = " light " ,
sunlight_propagates = true ,
liquid_viscosity = 14 ,
liquidtype = " source " ,
liquid_alternative_flowing = " mcl_core:cobweb " ,
liquid_alternative_source = " mcl_core:cobweb " ,
liquid_renewable = false ,
liquid_range = 0 ,
walkable = false ,
2017-05-20 06:09:29 +03:00
groups = { swordy_cobweb = 1 , shearsy = 1 , deco_block = 1 , dig_by_piston = 1 , dig_by_water = 1 , destroy_by_lava_flow = 1 , } ,
2017-03-28 02:34:13 +03:00
drop = " mcl_mobitems:string " ,
sounds = mcl_sounds.node_sound_leaves_defaults ( ) ,
2017-02-22 16:40:22 +02:00
_mcl_blast_resistance = 20 ,
2017-02-24 16:56:46 +02:00
_mcl_hardness = 4 ,
2015-06-29 20:55:56 +03:00
} )
2017-03-22 19:55:02 +02:00
-- Add entry aliases for the Help
if minetest.get_modpath ( " doc " ) then
doc.add_entry_alias ( " nodes " , " mcl_core:stone_with_redstone " , " nodes " , " mcl_core:stone_with_redstone_lit " )
doc.add_entry_alias ( " nodes " , " mcl_core:water_source " , " nodes " , " mcl_core:water_flowing " )
doc.add_entry_alias ( " nodes " , " mcl_core:lava_source " , " nodes " , " mcl_core:lava_flowing " )
2017-04-01 07:44:02 +03:00
doc.add_entry_alias ( " nodes " , " mcl_core:dirt_with_grass " , " nodes " , " mcl_core:dirt_with_grass_snow " )
doc.add_entry_alias ( " nodes " , " mcl_core:podzol " , " nodes " , " mcl_core:podzol_snow " )
doc.add_entry_alias ( " nodes " , " mcl_core:mycelium " , " nodes " , " mcl_core:mycelium_snow " )
2017-03-22 19:55:02 +02:00
end
2017-05-26 03:36:25 +03:00
-- Node aliases
minetest.register_alias ( " default:acacia_tree " , " mcl_core:acaciatree " )
minetest.register_alias ( " default:acacia_leaves " , " mcl_core:acacialeaves " )