From ff386e395fedf48a795e0cca259acfbbb1e05bfe Mon Sep 17 00:00:00 2001 From: seventeenthShulker Date: Sun, 17 Sep 2023 13:47:18 +0200 Subject: [PATCH 01/15] Un-hardcode blast resistance, hardness for walls, now only based on their material --- mods/ITEMS/mcl_blackstone/init.lua | 13 +++++-------- mods/ITEMS/mcl_deepslate/init.lua | 7 ++++++- mods/ITEMS/mcl_ocean/prismarine.lua | 4 ++-- mods/ITEMS/mcl_walls/API.md | 4 +++- mods/ITEMS/mcl_walls/init.lua | 2 +- mods/ITEMS/mcl_walls/register.lua | 30 ++++++++++++++--------------- 6 files changed, 32 insertions(+), 28 deletions(-) diff --git a/mods/ITEMS/mcl_blackstone/init.lua b/mods/ITEMS/mcl_blackstone/init.lua index 63d085877..66dac8558 100644 --- a/mods/ITEMS/mcl_blackstone/init.lua +++ b/mods/ITEMS/mcl_blackstone/init.lua @@ -230,14 +230,11 @@ mcl_walls.register_wall( "mcl_blackstone:wall", S("Blackstone Wall"), "mcl_blackstone:blackstone", - { - "mcl_blackstone_top.png", - "mcl_blackstone_top.png", - "mcl_blackstone_side.png" - }, - "", - { cracky=3, pickaxey=1, material_stone=1 } -) + nil, + nil, + nil, + minetest.registered_nodes["mcl_blackstone:blackstone"]._mcl_hardness, + minetest.registered_nodes["mcl_blackstone:blackstone"]._mcl_blast_resistance) --lavacooling diff --git a/mods/ITEMS/mcl_deepslate/init.lua b/mods/ITEMS/mcl_deepslate/init.lua index 0abb0c579..637030059 100644 --- a/mods/ITEMS/mcl_deepslate/init.lua +++ b/mods/ITEMS/mcl_deepslate/init.lua @@ -221,7 +221,12 @@ local function register_deepslate_variant(item, desc, longdesc) mcl_walls.register_wall( "mcl_deepslate:deepslate"..item.."wall", S(desc.." Wall"), - "mcl_deepslate:deepslate_"..item) + "mcl_deepslate:deepslate_"..item, + nil, + nil, + nil, + minetest.registered_nodes["mcl_deepslate:deepslate"]._mcl_hardness, + minetest.registered_nodes["mcl_deepslate:deepslate"]._mcl_blast_resistance) end end diff --git a/mods/ITEMS/mcl_ocean/prismarine.lua b/mods/ITEMS/mcl_ocean/prismarine.lua index fff07cb7e..71ffb94ce 100644 --- a/mods/ITEMS/mcl_ocean/prismarine.lua +++ b/mods/ITEMS/mcl_ocean/prismarine.lua @@ -52,7 +52,7 @@ minetest.register_node("mcl_ocean:prismarine_brick", { tiles = {"mcl_ocean_prismarine_bricks.png"}, groups = {pickaxey=1, building_block=1, material_stone=1}, sounds = mcl_sounds.node_sound_stone_defaults(), - _mcl_blast_resistance = 6, + _mcl_blast_resistance = 1.5,--ffffixme _mcl_hardness = 1.5, }) @@ -64,7 +64,7 @@ minetest.register_node("mcl_ocean:prismarine_dark", { tiles = {"mcl_ocean_prismarine_dark.png"}, groups = {pickaxey=1, building_block=1, material_stone=1}, sounds = mcl_sounds.node_sound_stone_defaults(), - _mcl_blast_resistance = 6, + _mcl_blast_resistance = 1.5,--fixmetoo _mcl_hardness = 1.5, }) diff --git a/mods/ITEMS/mcl_walls/API.md b/mods/ITEMS/mcl_walls/API.md index 63621ade1..567134ae7 100644 --- a/mods/ITEMS/mcl_walls/API.md +++ b/mods/ITEMS/mcl_walls/API.md @@ -2,7 +2,7 @@ This API allows you to add more walls (like the cobblestone wall) to VoxeLibre. -## `mcl_walls.register_wall(nodename, description, craft_material, tiles, invtex, groups, sounds, hardness, blast_resistance)` +## `mcl_walls.register_wall(nodename, description, craft_material, tiles, invtex, groups, hardness, blast_resistance, sounds)` Adds a new wall type. This is optimized for stone-based walls, but other materials are theoretically possible, too. @@ -24,6 +24,8 @@ If `craft_material` is not `nil` it also adds a crafting recipe of the following * `tiles`: Wall textures table, same syntax as for `minetest.register_node` (optional if `source` is set) * `inventory_image`: Inventory image (optional if `source` is set) * `groups`: Base group memberships (optional, default is `{pickaxey=1}`) +* `hardness`: Hardness of node (optional, default is 2) +* `blast_resistance`: Blast resistance of node (optional, default is 6 like most stone walls) * `sounds`: Sound table (optional, by default default uses stone sounds) * `hardness`: Hardness of node (optional, default matches `source` node or fallback value 2) * `blast_resistance`: Blast resistance of node (optional, default matches `source` node or fallback value 6) diff --git a/mods/ITEMS/mcl_walls/init.lua b/mods/ITEMS/mcl_walls/init.lua index 09a35b549..15f7ae369 100644 --- a/mods/ITEMS/mcl_walls/init.lua +++ b/mods/ITEMS/mcl_walls/init.lua @@ -100,7 +100,7 @@ local full_blocks = { * hardness: Hardness of node (optional, default matches `source` node or fallback value 2) * blast_resistance: Blast resistance of node (optional, default matches `source` node or fallback value 6) ]] -function mcl_walls.register_wall(nodename, description, source, tiles, inventory_image, groups, sounds, hardness, blast_resistance) +function mcl_walls.register_wall(nodename, description, source, tiles, inventory_image, groups, hardness, blast_resistance, sounds) local base_groups = groups if not base_groups then diff --git a/mods/ITEMS/mcl_walls/register.lua b/mods/ITEMS/mcl_walls/register.lua index c2859935e..70bf187e8 100644 --- a/mods/ITEMS/mcl_walls/register.lua +++ b/mods/ITEMS/mcl_walls/register.lua @@ -1,17 +1,17 @@ local S = minetest.get_translator(minetest.get_current_modname()) -mcl_walls.register_wall("mcl_walls:cobble", S("Cobblestone Wall"), "mcl_core:cobble", {"mcl_walls_cobble_wall_top.png", "default_cobble.png", "mcl_walls_cobble_wall_side.png"}) -mcl_walls.register_wall("mcl_walls:mossycobble", S("Mossy Cobblestone Wall"), "mcl_core:mossycobble", {"mcl_walls_cobble_mossy_wall_top.png", "default_mossycobble.png", "mcl_walls_cobble_mossy_wall_side.png"}) -mcl_walls.register_wall("mcl_walls:andesite", S("Andesite Wall"), "mcl_core:andesite") -mcl_walls.register_wall("mcl_walls:granite", S("Granite Wall"), "mcl_core:granite") -mcl_walls.register_wall("mcl_walls:diorite", S("Diorite Wall"), "mcl_core:diorite") -mcl_walls.register_wall("mcl_walls:brick", S("Brick Wall"), "mcl_core:brick_block") -mcl_walls.register_wall("mcl_walls:sandstone", S("Sandstone Wall"), "mcl_core:sandstone") -mcl_walls.register_wall("mcl_walls:redsandstone", S("Red Sandstone Wall"), "mcl_core:redsandstone") -mcl_walls.register_wall("mcl_walls:stonebrick", S("Stone Brick Wall"), "mcl_core:stonebrick") -mcl_walls.register_wall("mcl_walls:stonebrickmossy", S("Mossy Stone Brick Wall"), "mcl_core:stonebrickmossy") -mcl_walls.register_wall("mcl_walls:prismarine", S("Prismarine Wall"), "mcl_ocean:prismarine") -mcl_walls.register_wall("mcl_walls:endbricks", S("End Stone Brick Wall"), "mcl_end:end_bricks") -mcl_walls.register_wall("mcl_walls:netherbrick", S("Nether Brick Wall"), "mcl_nether:nether_brick") -mcl_walls.register_wall("mcl_walls:rednetherbrick", S("Red Nether Brick Wall"), "mcl_nether:red_nether_brick") -mcl_walls.register_wall("mcl_walls:mudbrick", S("Mud Brick Wall"), "mcl_mud:mud_bricks") +mcl_walls.register_wall("mcl_walls:cobble", S("Cobblestone Wall"), "mcl_core:cobble", {"mcl_walls_cobble_wall_top.png", "default_cobble.png", "mcl_walls_cobble_wall_side.png"}, nil, nil, minetest.registered_nodes["mcl_core:cobble"]._mcl_hardness, minetest.registered_nodes["mcl_core:cobble"]._mcl_blast_resistance) +mcl_walls.register_wall("mcl_walls:mossycobble", S("Mossy Cobblestone Wall"), "mcl_core:mossycobble", {"mcl_walls_cobble_mossy_wall_top.png", "default_mossycobble.png", "mcl_walls_cobble_mossy_wall_side.png"}, nil, nil, minetest.registered_nodes["mcl_core:mossycobble"]._mcl_hardness, minetest.registered_nodes["mcl_core:mossycobble"]._mcl_blast_resistance) +mcl_walls.register_wall("mcl_walls:andesite", S("Andesite Wall"), "mcl_core:andesite", nil, nil, nil, minetest.registered_nodes["mcl_core:andesite"]._mcl_hardness, minetest.registered_nodes["mcl_core:andesite"]._mcl_blast_resistance) +mcl_walls.register_wall("mcl_walls:granite", S("Granite Wall"), "mcl_core:granite", nil, nil, nil, minetest.registered_nodes["mcl_core:granite"]._mcl_hardness, minetest.registered_nodes["mcl_core:granite"]._mcl_blast_resistance) +mcl_walls.register_wall("mcl_walls:diorite", S("Diorite Wall"), "mcl_core:diorite", nil, nil, nil, minetest.registered_nodes["mcl_core:diorite"]._mcl_hardness, minetest.registered_nodes["mcl_core:diorite"]._mcl_blast_resistance) +mcl_walls.register_wall("mcl_walls:brick", S("Brick Wall"), "mcl_core:brick_block", nil, nil, nil, minetest.registered_nodes["mcl_core:brick_block"]._mcl_hardness, minetest.registered_nodes["mcl_core:brick_block"]._mcl_blast_resistance) +mcl_walls.register_wall("mcl_walls:sandstone", S("Sandstone Wall"), "mcl_core:sandstone", nil, nil, nil, minetest.registered_nodes["mcl_core:sandstone"]._mcl_hardness, minetest.registered_nodes["mcl_core:sandstone"]._mcl_blast_resistance) +mcl_walls.register_wall("mcl_walls:redsandstone", S("Red Sandstone Wall"), "mcl_core:redsandstone", nil, nil, nil, minetest.registered_nodes["mcl_core:redsandstone"]._mcl_hardness, minetest.registered_nodes["mcl_core:redsandstone"]._mcl_blast_resistance) +mcl_walls.register_wall("mcl_walls:stonebrick", S("Stone Brick Wall"), "mcl_core:stonebrick", nil, nil, nil, minetest.registered_nodes["mcl_core:stonebrick"]._mcl_hardness, minetest.registered_nodes["mcl_core:stonebrick"]._mcl_blast_resistance) +mcl_walls.register_wall("mcl_walls:stonebrickmossy", S("Mossy Stone Brick Wall"), "mcl_core:stonebrickmossy", nil, nil, nil, minetest.registered_nodes["mcl_core:stonebrickmossy"]._mcl_hardness, minetest.registered_nodes["mcl_core:stonebrickmossy"]._mcl_blast_resistance) +mcl_walls.register_wall("mcl_walls:prismarine", S("Prismarine Wall"), "mcl_ocean:prismarine", nil, nil, nil, minetest.registered_nodes["mcl_ocean:prismarine"]._mcl_hardness, minetest.registered_nodes["mcl_ocean:prismarine"]._mcl_blast_resistance) +mcl_walls.register_wall("mcl_walls:endbricks", S("End Stone Brick Wall"), "mcl_end:end_bricks", nil, nil, nil, minetest.registered_nodes["mcl_end:end_bricks"]._mcl_hardness, minetest.registered_nodes["mcl_end:end_bricks"]._mcl_blast_resistance) +mcl_walls.register_wall("mcl_walls:netherbrick", S("Nether Brick Wall"), "mcl_nether:nether_brick", nil, nil, nil, minetest.registered_nodes["mcl_nether:nether_brick"]._mcl_hardness, minetest.registered_nodes["mcl_nether:nether_brick"]._mcl_blast_resistance) +mcl_walls.register_wall("mcl_walls:rednetherbrick", S("Red Nether Brick Wall"), "mcl_nether:red_nether_brick", nil, nil, nil, minetest.registered_nodes["mcl_nether:red_nether_brick"]._mcl_hardness, minetest.registered_nodes["mcl_nether:red_nether_brick"]._mcl_blast_resistance) +mcl_walls.register_wall("mcl_walls:mudbrick", S("Mud Brick Wall"), "mcl_mud:mud_bricks", nil, nil, nil, minetest.registered_nodes["mcl_mud:mud_bricks"]._mcl_hardness, minetest.registered_nodes["mcl_mud:mud_bricks"]._mcl_blast_resistance) From 7a05c3219828e608347ca5875e0b78df989460b0 Mon Sep 17 00:00:00 2001 From: seventeenthShulker Date: Sun, 17 Sep 2023 13:49:00 +0200 Subject: [PATCH 02/15] Fix prismarine bricks and dark variant blast res. Should be 6 like regular prismarine --- mods/ITEMS/mcl_ocean/prismarine.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mods/ITEMS/mcl_ocean/prismarine.lua b/mods/ITEMS/mcl_ocean/prismarine.lua index 71ffb94ce..fff07cb7e 100644 --- a/mods/ITEMS/mcl_ocean/prismarine.lua +++ b/mods/ITEMS/mcl_ocean/prismarine.lua @@ -52,7 +52,7 @@ minetest.register_node("mcl_ocean:prismarine_brick", { tiles = {"mcl_ocean_prismarine_bricks.png"}, groups = {pickaxey=1, building_block=1, material_stone=1}, sounds = mcl_sounds.node_sound_stone_defaults(), - _mcl_blast_resistance = 1.5,--ffffixme + _mcl_blast_resistance = 6, _mcl_hardness = 1.5, }) @@ -64,7 +64,7 @@ minetest.register_node("mcl_ocean:prismarine_dark", { tiles = {"mcl_ocean_prismarine_dark.png"}, groups = {pickaxey=1, building_block=1, material_stone=1}, sounds = mcl_sounds.node_sound_stone_defaults(), - _mcl_blast_resistance = 1.5,--fixmetoo + _mcl_blast_resistance = 6, _mcl_hardness = 1.5, }) From 5bce56cdd6e274cb1360f469e0d7a7051cdf2ebd Mon Sep 17 00:00:00 2001 From: seventeenthShulker Date: Sun, 17 Sep 2023 16:14:36 +0200 Subject: [PATCH 03/15] Walls use `source` parameter for default hardness and blast resistance If no `source` given, fallbacks are 2 and 6 respectively --- mods/ITEMS/mcl_deepslate/init.lua | 7 +------ mods/ITEMS/mcl_walls/API.md | 4 +--- mods/ITEMS/mcl_walls/init.lua | 2 +- mods/ITEMS/mcl_walls/register.lua | 30 +++++++++++++++--------------- 4 files changed, 18 insertions(+), 25 deletions(-) diff --git a/mods/ITEMS/mcl_deepslate/init.lua b/mods/ITEMS/mcl_deepslate/init.lua index 637030059..0abb0c579 100644 --- a/mods/ITEMS/mcl_deepslate/init.lua +++ b/mods/ITEMS/mcl_deepslate/init.lua @@ -221,12 +221,7 @@ local function register_deepslate_variant(item, desc, longdesc) mcl_walls.register_wall( "mcl_deepslate:deepslate"..item.."wall", S(desc.." Wall"), - "mcl_deepslate:deepslate_"..item, - nil, - nil, - nil, - minetest.registered_nodes["mcl_deepslate:deepslate"]._mcl_hardness, - minetest.registered_nodes["mcl_deepslate:deepslate"]._mcl_blast_resistance) + "mcl_deepslate:deepslate_"..item) end end diff --git a/mods/ITEMS/mcl_walls/API.md b/mods/ITEMS/mcl_walls/API.md index 567134ae7..63621ade1 100644 --- a/mods/ITEMS/mcl_walls/API.md +++ b/mods/ITEMS/mcl_walls/API.md @@ -2,7 +2,7 @@ This API allows you to add more walls (like the cobblestone wall) to VoxeLibre. -## `mcl_walls.register_wall(nodename, description, craft_material, tiles, invtex, groups, hardness, blast_resistance, sounds)` +## `mcl_walls.register_wall(nodename, description, craft_material, tiles, invtex, groups, sounds, hardness, blast_resistance)` Adds a new wall type. This is optimized for stone-based walls, but other materials are theoretically possible, too. @@ -24,8 +24,6 @@ If `craft_material` is not `nil` it also adds a crafting recipe of the following * `tiles`: Wall textures table, same syntax as for `minetest.register_node` (optional if `source` is set) * `inventory_image`: Inventory image (optional if `source` is set) * `groups`: Base group memberships (optional, default is `{pickaxey=1}`) -* `hardness`: Hardness of node (optional, default is 2) -* `blast_resistance`: Blast resistance of node (optional, default is 6 like most stone walls) * `sounds`: Sound table (optional, by default default uses stone sounds) * `hardness`: Hardness of node (optional, default matches `source` node or fallback value 2) * `blast_resistance`: Blast resistance of node (optional, default matches `source` node or fallback value 6) diff --git a/mods/ITEMS/mcl_walls/init.lua b/mods/ITEMS/mcl_walls/init.lua index 15f7ae369..09a35b549 100644 --- a/mods/ITEMS/mcl_walls/init.lua +++ b/mods/ITEMS/mcl_walls/init.lua @@ -100,7 +100,7 @@ local full_blocks = { * hardness: Hardness of node (optional, default matches `source` node or fallback value 2) * blast_resistance: Blast resistance of node (optional, default matches `source` node or fallback value 6) ]] -function mcl_walls.register_wall(nodename, description, source, tiles, inventory_image, groups, hardness, blast_resistance, sounds) +function mcl_walls.register_wall(nodename, description, source, tiles, inventory_image, groups, sounds, hardness, blast_resistance) local base_groups = groups if not base_groups then diff --git a/mods/ITEMS/mcl_walls/register.lua b/mods/ITEMS/mcl_walls/register.lua index 70bf187e8..c2859935e 100644 --- a/mods/ITEMS/mcl_walls/register.lua +++ b/mods/ITEMS/mcl_walls/register.lua @@ -1,17 +1,17 @@ local S = minetest.get_translator(minetest.get_current_modname()) -mcl_walls.register_wall("mcl_walls:cobble", S("Cobblestone Wall"), "mcl_core:cobble", {"mcl_walls_cobble_wall_top.png", "default_cobble.png", "mcl_walls_cobble_wall_side.png"}, nil, nil, minetest.registered_nodes["mcl_core:cobble"]._mcl_hardness, minetest.registered_nodes["mcl_core:cobble"]._mcl_blast_resistance) -mcl_walls.register_wall("mcl_walls:mossycobble", S("Mossy Cobblestone Wall"), "mcl_core:mossycobble", {"mcl_walls_cobble_mossy_wall_top.png", "default_mossycobble.png", "mcl_walls_cobble_mossy_wall_side.png"}, nil, nil, minetest.registered_nodes["mcl_core:mossycobble"]._mcl_hardness, minetest.registered_nodes["mcl_core:mossycobble"]._mcl_blast_resistance) -mcl_walls.register_wall("mcl_walls:andesite", S("Andesite Wall"), "mcl_core:andesite", nil, nil, nil, minetest.registered_nodes["mcl_core:andesite"]._mcl_hardness, minetest.registered_nodes["mcl_core:andesite"]._mcl_blast_resistance) -mcl_walls.register_wall("mcl_walls:granite", S("Granite Wall"), "mcl_core:granite", nil, nil, nil, minetest.registered_nodes["mcl_core:granite"]._mcl_hardness, minetest.registered_nodes["mcl_core:granite"]._mcl_blast_resistance) -mcl_walls.register_wall("mcl_walls:diorite", S("Diorite Wall"), "mcl_core:diorite", nil, nil, nil, minetest.registered_nodes["mcl_core:diorite"]._mcl_hardness, minetest.registered_nodes["mcl_core:diorite"]._mcl_blast_resistance) -mcl_walls.register_wall("mcl_walls:brick", S("Brick Wall"), "mcl_core:brick_block", nil, nil, nil, minetest.registered_nodes["mcl_core:brick_block"]._mcl_hardness, minetest.registered_nodes["mcl_core:brick_block"]._mcl_blast_resistance) -mcl_walls.register_wall("mcl_walls:sandstone", S("Sandstone Wall"), "mcl_core:sandstone", nil, nil, nil, minetest.registered_nodes["mcl_core:sandstone"]._mcl_hardness, minetest.registered_nodes["mcl_core:sandstone"]._mcl_blast_resistance) -mcl_walls.register_wall("mcl_walls:redsandstone", S("Red Sandstone Wall"), "mcl_core:redsandstone", nil, nil, nil, minetest.registered_nodes["mcl_core:redsandstone"]._mcl_hardness, minetest.registered_nodes["mcl_core:redsandstone"]._mcl_blast_resistance) -mcl_walls.register_wall("mcl_walls:stonebrick", S("Stone Brick Wall"), "mcl_core:stonebrick", nil, nil, nil, minetest.registered_nodes["mcl_core:stonebrick"]._mcl_hardness, minetest.registered_nodes["mcl_core:stonebrick"]._mcl_blast_resistance) -mcl_walls.register_wall("mcl_walls:stonebrickmossy", S("Mossy Stone Brick Wall"), "mcl_core:stonebrickmossy", nil, nil, nil, minetest.registered_nodes["mcl_core:stonebrickmossy"]._mcl_hardness, minetest.registered_nodes["mcl_core:stonebrickmossy"]._mcl_blast_resistance) -mcl_walls.register_wall("mcl_walls:prismarine", S("Prismarine Wall"), "mcl_ocean:prismarine", nil, nil, nil, minetest.registered_nodes["mcl_ocean:prismarine"]._mcl_hardness, minetest.registered_nodes["mcl_ocean:prismarine"]._mcl_blast_resistance) -mcl_walls.register_wall("mcl_walls:endbricks", S("End Stone Brick Wall"), "mcl_end:end_bricks", nil, nil, nil, minetest.registered_nodes["mcl_end:end_bricks"]._mcl_hardness, minetest.registered_nodes["mcl_end:end_bricks"]._mcl_blast_resistance) -mcl_walls.register_wall("mcl_walls:netherbrick", S("Nether Brick Wall"), "mcl_nether:nether_brick", nil, nil, nil, minetest.registered_nodes["mcl_nether:nether_brick"]._mcl_hardness, minetest.registered_nodes["mcl_nether:nether_brick"]._mcl_blast_resistance) -mcl_walls.register_wall("mcl_walls:rednetherbrick", S("Red Nether Brick Wall"), "mcl_nether:red_nether_brick", nil, nil, nil, minetest.registered_nodes["mcl_nether:red_nether_brick"]._mcl_hardness, minetest.registered_nodes["mcl_nether:red_nether_brick"]._mcl_blast_resistance) -mcl_walls.register_wall("mcl_walls:mudbrick", S("Mud Brick Wall"), "mcl_mud:mud_bricks", nil, nil, nil, minetest.registered_nodes["mcl_mud:mud_bricks"]._mcl_hardness, minetest.registered_nodes["mcl_mud:mud_bricks"]._mcl_blast_resistance) +mcl_walls.register_wall("mcl_walls:cobble", S("Cobblestone Wall"), "mcl_core:cobble", {"mcl_walls_cobble_wall_top.png", "default_cobble.png", "mcl_walls_cobble_wall_side.png"}) +mcl_walls.register_wall("mcl_walls:mossycobble", S("Mossy Cobblestone Wall"), "mcl_core:mossycobble", {"mcl_walls_cobble_mossy_wall_top.png", "default_mossycobble.png", "mcl_walls_cobble_mossy_wall_side.png"}) +mcl_walls.register_wall("mcl_walls:andesite", S("Andesite Wall"), "mcl_core:andesite") +mcl_walls.register_wall("mcl_walls:granite", S("Granite Wall"), "mcl_core:granite") +mcl_walls.register_wall("mcl_walls:diorite", S("Diorite Wall"), "mcl_core:diorite") +mcl_walls.register_wall("mcl_walls:brick", S("Brick Wall"), "mcl_core:brick_block") +mcl_walls.register_wall("mcl_walls:sandstone", S("Sandstone Wall"), "mcl_core:sandstone") +mcl_walls.register_wall("mcl_walls:redsandstone", S("Red Sandstone Wall"), "mcl_core:redsandstone") +mcl_walls.register_wall("mcl_walls:stonebrick", S("Stone Brick Wall"), "mcl_core:stonebrick") +mcl_walls.register_wall("mcl_walls:stonebrickmossy", S("Mossy Stone Brick Wall"), "mcl_core:stonebrickmossy") +mcl_walls.register_wall("mcl_walls:prismarine", S("Prismarine Wall"), "mcl_ocean:prismarine") +mcl_walls.register_wall("mcl_walls:endbricks", S("End Stone Brick Wall"), "mcl_end:end_bricks") +mcl_walls.register_wall("mcl_walls:netherbrick", S("Nether Brick Wall"), "mcl_nether:nether_brick") +mcl_walls.register_wall("mcl_walls:rednetherbrick", S("Red Nether Brick Wall"), "mcl_nether:red_nether_brick") +mcl_walls.register_wall("mcl_walls:mudbrick", S("Mud Brick Wall"), "mcl_mud:mud_bricks") From 38d76091735a5d7c3c21ee68277d8f47c411ed10 Mon Sep 17 00:00:00 2001 From: seventeenthShulker Date: Sun, 17 Sep 2023 17:11:35 +0200 Subject: [PATCH 04/15] Forgot about blackstone --- mods/ITEMS/mcl_blackstone/init.lua | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/mods/ITEMS/mcl_blackstone/init.lua b/mods/ITEMS/mcl_blackstone/init.lua index 66dac8558..5c63f8ee4 100644 --- a/mods/ITEMS/mcl_blackstone/init.lua +++ b/mods/ITEMS/mcl_blackstone/init.lua @@ -229,12 +229,8 @@ mcl_stairs.register_stair_and_slab("blackstone_brick_polished", "mcl_blackstone: mcl_walls.register_wall( "mcl_blackstone:wall", S("Blackstone Wall"), - "mcl_blackstone:blackstone", - nil, - nil, - nil, - minetest.registered_nodes["mcl_blackstone:blackstone"]._mcl_hardness, - minetest.registered_nodes["mcl_blackstone:blackstone"]._mcl_blast_resistance) + "mcl_blackstone:blackstone" +) --lavacooling From 1471ad7181c02d16cf5185f4694d1917c6c0056b Mon Sep 17 00:00:00 2001 From: seventeenthShulker Date: Tue, 19 Sep 2023 18:35:39 +0200 Subject: [PATCH 05/15] Un-hardcode most slabs and stairs --- mods/ITEMS/mcl_cherry_blossom/nodes.lua | 4 +-- mods/ITEMS/mcl_mangrove/init.lua | 4 +-- mods/ITEMS/mcl_stairs/register.lua | 36 ++++++++++++------------- mods/ITEMS/mclx_stairs/init.lua | 14 +++++----- 4 files changed, 29 insertions(+), 29 deletions(-) diff --git a/mods/ITEMS/mcl_cherry_blossom/nodes.lua b/mods/ITEMS/mcl_cherry_blossom/nodes.lua index 403982872..84d1a8a1b 100644 --- a/mods/ITEMS/mcl_cherry_blossom/nodes.lua +++ b/mods/ITEMS/mcl_cherry_blossom/nodes.lua @@ -51,13 +51,13 @@ mcl_stairs.register_stair("cherrywood", "mcl_cherry_blossom:cherrywood", {handy=1,axey=1, flammable=3,wood_stairs=1, material_wood=1, fire_encouragement=5, fire_flammability=20}, {"mcl_cherry_blossom_planks.png"}, S("Cherry Stairs"), - mcl_sounds.node_sound_wood_defaults(), 3, 2, + mcl_sounds.node_sound_wood_defaults(), nil, nil, "woodlike") mcl_stairs.register_slab("cherrywood", "mcl_cherry_blossom:cherrywood", {handy=1,axey=1, flammable=3,wood_slab=1, material_wood=1, fire_encouragement=5, fire_flammability=20}, {"mcl_cherry_blossom_planks.png"}, S("Cherry Slab"), - mcl_sounds.node_sound_wood_defaults(), 3, 2, + mcl_sounds.node_sound_wood_defaults(), nil, nil, S("Double Cherry Slab")) -- Signs diff --git a/mods/ITEMS/mcl_mangrove/init.lua b/mods/ITEMS/mcl_mangrove/init.lua index a8ab01370..ac02966f3 100644 --- a/mods/ITEMS/mcl_mangrove/init.lua +++ b/mods/ITEMS/mcl_mangrove/init.lua @@ -322,14 +322,14 @@ mcl_stairs.register_stair("mangrove_wood", "mcl_mangrove:mangrove_wood", {handy=1,axey=1, flammable=3,wood_stairs=1, material_wood=1, fire_encouragement=5, fire_flammability=20}, {"mcl_mangrove_planks.png"}, S("Mangrove Wood Stairs"), - mcl_sounds.node_sound_wood_defaults(), 3, 2, + mcl_sounds.node_sound_wood_defaults(), nil, nil, "woodlike") mcl_stairs.register_slab("mangrove_wood", "mcl_mangrove:mangrove_wood", {handy=1,axey=1, flammable=3,wood_slab=1, material_wood=1, fire_encouragement=5, fire_flammability=20}, {"mcl_mangrove_planks.png"}, S("Mangrove Wood Slab"), - mcl_sounds.node_sound_wood_defaults(), 3, 2, + mcl_sounds.node_sound_wood_defaults(), nil, nil, S("Double Mangrove Wood Slab")) minetest.register_craft({ diff --git a/mods/ITEMS/mcl_stairs/register.lua b/mods/ITEMS/mcl_stairs/register.lua index b59880e48..6138e692c 100644 --- a/mods/ITEMS/mcl_stairs/register.lua +++ b/mods/ITEMS/mcl_stairs/register.lua @@ -20,13 +20,13 @@ for w=1, #woods do {handy=1,axey=1, flammable=3,wood_stairs=1, material_wood=1, fire_encouragement=5, fire_flammability=20}, {wood[2]}, wood[3], - mcl_sounds.node_sound_wood_defaults(), 3, 2, + mcl_sounds.node_sound_wood_defaults(), nil, nil, "woodlike") mcl_stairs.register_slab(wood[1], "mcl_core:"..wood[1], {handy=1,axey=1, flammable=3,wood_slab=1, material_wood=1, fire_encouragement=5, fire_flammability=20}, {wood[2]}, wood[4], - mcl_sounds.node_sound_wood_defaults(), 3, 2, + mcl_sounds.node_sound_wood_defaults(), nil, nil, wood[5]) end @@ -47,7 +47,7 @@ mcl_stairs.register_slab("stone", "mcl_core:stone_smooth", {pickaxey=1, material_stone=1}, {"mcl_stairs_stone_slab_top.png", "mcl_stairs_stone_slab_top.png", "mcl_stairs_stone_slab_side.png"}, S("Polished Stone Slab"), - mcl_sounds.node_sound_stone_defaults(), 6, 2, + mcl_sounds.node_sound_stone_defaults(), nil, nil, S("Double Polished Stone Slab")) mcl_stairs.register_stair("andesite", "mcl_core:andesite", @@ -177,14 +177,14 @@ mcl_stairs.register_stair("stonebrick", "mcl_core:stonebrick", {pickaxey=1, material_stone=1}, {"default_stone_brick.png"}, S("Stone Bricks Stairs"), - mcl_sounds.node_sound_stone_defaults(), 6, 1.5, - nil, "mcl_core:stonebrick") --fixme: extra parameter from previous release + mcl_sounds.node_sound_stone_defaults(), nil, nil, + nil) mcl_stairs.register_slab("stonebrick", "mcl_core:stonebrick", {pickaxey=1, material_stone=1}, {"default_stone_brick.png"}, S("Stone Bricks Slab"), - mcl_sounds.node_sound_stone_defaults(), 6, 2, - S("Double Stone Bricks Slab"), "mcl_core:stonebrick") --fixme: extra parameter from previous release + mcl_sounds.node_sound_stone_defaults(), nil, nil, + S("Double Stone Bricks Slab")) mcl_stairs.register_stair("quartzblock", "mcl_nether:quartz_block", {pickaxey=1, material_stone=1}, @@ -216,14 +216,14 @@ mcl_stairs.register_stair_and_slab("nether_brick", "mcl_nether:nether_brick", {"mcl_nether_nether_brick.png"}, S("Nether Brick Stairs"), S("Nether Brick Slab"), - mcl_sounds.node_sound_stone_defaults(), 6, 2, + mcl_sounds.node_sound_stone_defaults(), nil, nil, S("Double Nether Brick Slab"), nil) mcl_stairs.register_stair_and_slab("red_nether_brick", "mcl_nether:red_nether_brick", {pickaxey=1, material_stone=1}, {"mcl_nether_red_nether_brick.png"}, S("Red Nether Brick Stairs"), S("Red Nether Brick Slab"), - mcl_sounds.node_sound_stone_defaults(), 6, 2, + mcl_sounds.node_sound_stone_defaults(), nil, nil, S("Double Red Nether Brick Slab"), nil) mcl_stairs.register_stair_and_slab("end_bricks", "mcl_end:end_bricks", @@ -298,52 +298,52 @@ mcl_stairs.register_slab("andesite_smooth", "mcl_core:andesite_smooth", {pickaxey=1}, {"mcl_core_andesite_smooth.png", "mcl_core_andesite_smooth.png", "mcl_stairs_andesite_smooth_slab.png"}, S("Polished Andesite Slab"), - nil, 6, nil, + nil, nil, nil, S("Double Polished Andesite Slab")) mcl_stairs.register_stair("andesite_smooth", "mcl_core:andesite_smooth", {pickaxey=1}, {"mcl_stairs_andesite_smooth_slab.png", "mcl_core_andesite_smooth.png", "mcl_core_andesite_smooth.png", "mcl_core_andesite_smooth.png", "mcl_core_andesite_smooth.png", "mcl_stairs_andesite_smooth_slab.png"}, S("Polished Andesite Stairs"), - nil, 6, nil, + nil, nil, nil, "woodlike") mcl_stairs.register_slab("granite_smooth", "mcl_core:granite_smooth", {pickaxey=1}, {"mcl_core_granite_smooth.png", "mcl_core_granite_smooth.png", "mcl_stairs_granite_smooth_slab.png"}, S("Polished Granite Slab"), - nil, 6, nil, + nil, nil, nil, S("Double Polished Granite Slab")) mcl_stairs.register_stair("granite_smooth", "mcl_core:granite_smooth", {pickaxey=1}, {"mcl_stairs_granite_smooth_slab.png", "mcl_core_granite_smooth.png", "mcl_core_granite_smooth.png", "mcl_core_granite_smooth.png", "mcl_core_granite_smooth.png", "mcl_stairs_granite_smooth_slab.png"}, S("Polished Granite Stairs"), - nil, 6, nil, + nil, nil, nil, "woodlike") mcl_stairs.register_slab("diorite_smooth", "mcl_core:diorite_smooth", {pickaxey=1}, {"mcl_core_diorite_smooth.png", "mcl_core_diorite_smooth.png", "mcl_stairs_diorite_smooth_slab.png"}, S("Polished Diorite Slab"), - nil, 6, nil, + nil, nil, nil, S("Double Polished Diorite Slab")) mcl_stairs.register_stair("diorite_smooth", "mcl_core:diorite_smooth", {pickaxey=1}, {"mcl_stairs_diorite_smooth_slab.png", "mcl_core_diorite_smooth.png", "mcl_core_diorite_smooth.png", "mcl_core_diorite_smooth.png", "mcl_core_diorite_smooth.png", "mcl_stairs_diorite_smooth_slab.png"}, S("Polished Diorite Stairs"), - nil, 6, nil, + nil, nil, nil, "woodlike") mcl_stairs.register_stair("stonebrickmossy", "mcl_core:stonebrickmossy", {pickaxey=1}, {"mcl_core_stonebrick_mossy.png"}, S("Mossy Stone Brick Stairs"), - mcl_sounds.node_sound_stone_defaults(), 6, 1.5, + mcl_sounds.node_sound_stone_defaults(), nil, nil, nil) mcl_stairs.register_slab("stonebrickmossy", "mcl_core:stonebrickmossy", {pickaxey=1}, {"mcl_core_stonebrick_mossy.png"}, S("Mossy Stone Brick Slab"), - mcl_sounds.node_sound_stone_defaults(), 6, 2, - S("Double Mossy Stone Brick Slab"), "mcl_core:stonebrickmossy") --fixme: extra parameter from previous release + mcl_sounds.node_sound_stone_defaults(), nil, nil, + S("Double Mossy Stone Brick Slab")) diff --git a/mods/ITEMS/mclx_stairs/init.lua b/mods/ITEMS/mclx_stairs/init.lua index effa87f13..65dd59431 100644 --- a/mods/ITEMS/mclx_stairs/init.lua +++ b/mods/ITEMS/mclx_stairs/init.lua @@ -22,13 +22,13 @@ for b=1, #barks do {handy=1,axey=1, flammable=3, bark_stairs=1, material_wood=1, fire_encouragement=5, fire_flammability=5}, {minetest.registered_nodes[id].tiles[3]}, bark[2], - mcl_sounds.node_sound_wood_defaults(), 3, 2, + mcl_sounds.node_sound_wood_defaults(), nil, nil, "woodlike") mcl_stairs.register_slab(sub, id, {handy=1,axey=1, flammable=3, bark_slab=1, material_wood=1, fire_encouragement=5, fire_flammability=5}, {minetest.registered_nodes[id].tiles[3]}, bark[3], - mcl_sounds.node_sound_wood_defaults(), 3, 2, + mcl_sounds.node_sound_wood_defaults(), nil, nil, bark[4]) end @@ -42,7 +42,7 @@ mcl_stairs.register_stair("lapisblock", "mcl_core:lapisblock", {pickaxey=3}, {"mcl_stairs_lapis_block_slab.png", "mcl_core_lapis_block.png", "mcl_core_lapis_block.png", "mcl_core_lapis_block.png", "mcl_core_lapis_block.png", "mcl_stairs_lapis_block_slab.png"}, S("Lapis Lazuli Stairs"), - nil, 6, nil, + nil, nil, nil, "woodlike") mcl_stairs.register_slab("goldblock", "mcl_core:goldblock", @@ -55,7 +55,7 @@ mcl_stairs.register_stair("goldblock", "mcl_core:goldblock", {pickaxey=4}, {"mcl_stairs_gold_block_slab.png", "default_gold_block.png", "default_gold_block.png", "default_gold_block.png", "default_gold_block.png", "mcl_stairs_gold_block_slab.png"}, S("Stairs of Gold"), - nil, 6, nil, + nil, nil, nil, "woodlike") mcl_stairs.register_slab("ironblock", "mcl_core:ironblock", @@ -68,21 +68,21 @@ mcl_stairs.register_stair("ironblock", "mcl_core:ironblock", {pickaxey=2}, {"mcl_stairs_iron_block_slab.png", "default_steel_block.png", "default_steel_block.png", "default_steel_block.png", "default_steel_block.png", "mcl_stairs_iron_block_slab.png"}, S("Stairs of Iron"), - nil, 6, nil, + nil, nil, nil, "woodlike") mcl_stairs.register_stair("stonebrickcracked", "mcl_core:stonebrickcracked", {pickaxey=1}, {"mcl_core_stonebrick_cracked.png"}, S("Cracked Stone Brick Stairs"), - mcl_sounds.node_sound_stone_defaults(), 6, 1.5, + mcl_sounds.node_sound_stone_defaults(), nil, nil, "woodlike") mcl_stairs.register_slab("stonebrickcracked", "mcl_core:stonebrickcracked", {pickaxey=1}, {"mcl_core_stonebrick_cracked.png"}, S("Cracked Stone Brick Slab"), - mcl_sounds.node_sound_stone_defaults(), 6, 2, + mcl_sounds.node_sound_stone_defaults(), nil, nil, S("Double Cracked Stone Brick Slab")) local block = {} From 2312989503bf1c9f7d858fbc32cd9328505e6faa Mon Sep 17 00:00:00 2001 From: seventeenthShulker Date: Tue, 19 Sep 2023 21:57:49 +0200 Subject: [PATCH 06/15] Fix several hardness and blast resistance values --- mods/ITEMS/mcl_blackstone/init.lua | 5 ++- mods/ITEMS/mcl_compass/init.lua | 4 +-- mods/ITEMS/mcl_copper/nodes.lua | 44 +++++++++++++------------- mods/ITEMS/mcl_core/nodes_base.lua | 2 +- mods/ITEMS/mcl_deepslate/init.lua | 4 +-- mods/ITEMS/mcl_lightning_rods/init.lua | 3 +- 6 files changed, 31 insertions(+), 31 deletions(-) diff --git a/mods/ITEMS/mcl_blackstone/init.lua b/mods/ITEMS/mcl_blackstone/init.lua index 5c63f8ee4..be5bcc5db 100644 --- a/mods/ITEMS/mcl_blackstone/init.lua +++ b/mods/ITEMS/mcl_blackstone/init.lua @@ -34,7 +34,7 @@ minetest.register_node("mcl_blackstone:blackstone_gilded", { } }, _mcl_blast_resistance = 2, - _mcl_hardness = 2, + _mcl_hardness = 1.5, _mcl_silk_touch_drop = true, _mcl_fortune_drop = { discrete_uniform_distribution = true, @@ -229,8 +229,7 @@ mcl_stairs.register_stair_and_slab("blackstone_brick_polished", "mcl_blackstone: mcl_walls.register_wall( "mcl_blackstone:wall", S("Blackstone Wall"), - "mcl_blackstone:blackstone" -) + "mcl_blackstone:blackstone") --lavacooling diff --git a/mods/ITEMS/mcl_compass/init.lua b/mods/ITEMS/mcl_compass/init.lua index 2905c0b3b..0117b3a89 100644 --- a/mods/ITEMS/mcl_compass/init.lua +++ b/mods/ITEMS/mcl_compass/init.lua @@ -312,8 +312,8 @@ minetest.register_node("mcl_compass:lodestone",{ "lodestone_side4.png" }, groups = {pickaxey=1, material_stone=1}, - _mcl_hardness = 1.5, - _mcl_blast_resistance = 6, + _mcl_hardness = 3.5, + _mcl_blast_resistance = 3.5, sounds = mcl_sounds.node_sound_stone_defaults() }) diff --git a/mods/ITEMS/mcl_copper/nodes.lua b/mods/ITEMS/mcl_copper/nodes.lua index af5a49a1c..f2ebe03ec 100644 --- a/mods/ITEMS/mcl_copper/nodes.lua +++ b/mods/ITEMS/mcl_copper/nodes.lua @@ -58,7 +58,7 @@ minetest.register_node("mcl_copper:block_exposed", { groups = {pickaxey = 2, building_block = 1, oxidizable = 1}, sounds = mcl_sounds.node_sound_metal_defaults(), _mcl_blast_resistance = 6, - _mcl_hardness = 5, + _mcl_hardness = 3, _mcl_oxidized_variant = "mcl_copper:block_weathered", _mcl_waxed_variant = "mcl_copper:waxed_block_exposed", _mcl_stripped_variant = "mcl_copper:block", @@ -72,7 +72,7 @@ minetest.register_node("mcl_copper:waxed_block_exposed", { groups = {pickaxey = 2, building_block = 1, waxed = 1}, sounds = mcl_sounds.node_sound_metal_defaults(), _mcl_blast_resistance = 6, - _mcl_hardness = 5, + _mcl_hardness = 3, _mcl_stripped_variant = "mcl_copper:block_exposed", }) @@ -84,7 +84,7 @@ minetest.register_node("mcl_copper:block_weathered", { groups = {pickaxey = 2, building_block = 1, oxidizable = 1}, sounds = mcl_sounds.node_sound_metal_defaults(), _mcl_blast_resistance = 6, - _mcl_hardness = 5, + _mcl_hardness = 3, _mcl_oxidized_variant = "mcl_copper:block_oxidized", _mcl_waxed_variant = "mcl_copper:waxed_block_weathered", _mcl_stripped_variant = "mcl_copper:block_exposed", @@ -98,7 +98,7 @@ minetest.register_node("mcl_copper:waxed_block_weathered", { groups = {pickaxey = 2, building_block = 1, waxed = 1}, sounds = mcl_sounds.node_sound_metal_defaults(), _mcl_blast_resistance = 6, - _mcl_hardness = 5, + _mcl_hardness = 3, _mcl_stripped_variant = "mcl_copper:block_weathered", }) @@ -110,7 +110,7 @@ minetest.register_node("mcl_copper:block_oxidized", { groups = {pickaxey = 2, building_block = 1}, sounds = mcl_sounds.node_sound_metal_defaults(), _mcl_blast_resistance = 6, - _mcl_hardness = 5, + _mcl_hardness = 3, _mcl_waxed_variant = "mcl_copper:waxed_block_oxidized", _mcl_stripped_variant = "mcl_copper:block_weathered", }) @@ -123,7 +123,7 @@ minetest.register_node("mcl_copper:waxed_block_oxidized", { groups = {pickaxey = 2, building_block = 1, waxed = 1}, sounds = mcl_sounds.node_sound_metal_defaults(), _mcl_blast_resistance = 6, - _mcl_hardness = 5, + _mcl_hardness = 3, _mcl_stripped_variant = "mcl_copper:block_oxidized", }) @@ -135,7 +135,7 @@ minetest.register_node("mcl_copper:block_cut", { groups = {pickaxey = 2, building_block = 1, oxidizable = 1}, sounds = mcl_sounds.node_sound_metal_defaults(), _mcl_blast_resistance = 6, - _mcl_hardness = 5, + _mcl_hardness = 3, _mcl_oxidized_variant = "mcl_copper:block_exposed_cut", _mcl_waxed_variant = "mcl_copper:waxed_block_cut", }) @@ -148,7 +148,7 @@ minetest.register_node("mcl_copper:waxed_block_cut", { groups = {pickaxey = 2, building_block = 1, waxed = 1}, sounds = mcl_sounds.node_sound_metal_defaults(), _mcl_blast_resistance = 6, - _mcl_hardness = 5, + _mcl_hardness = 3, _mcl_stripped_variant = "mcl_copper:block_cut", }) @@ -160,7 +160,7 @@ minetest.register_node("mcl_copper:block_exposed_cut", { groups = {pickaxey = 2, building_block = 1, oxidizable = 1}, sounds = mcl_sounds.node_sound_metal_defaults(), _mcl_blast_resistance = 6, - _mcl_hardness = 5, + _mcl_hardness = 3, _mcl_waxed_variant = "mcl_copper:waxed_block_exposed_cut", _mcl_oxidized_variant = "mcl_copper:block_weathered_cut", _mcl_stripped_variant = "mcl_copper:block_cut", @@ -174,7 +174,7 @@ minetest.register_node("mcl_copper:waxed_block_exposed_cut", { groups = {pickaxey = 2, building_block = 1, waxed = 1}, sounds = mcl_sounds.node_sound_metal_defaults(), _mcl_blast_resistance = 6, - _mcl_hardness = 5, + _mcl_hardness = 3, _mcl_stripped_variant = "mcl_copper:block_exposed_cut", }) @@ -186,7 +186,7 @@ minetest.register_node("mcl_copper:block_weathered_cut", { groups = {pickaxey = 2, building_block = 1, oxidizable = 1}, sounds = mcl_sounds.node_sound_metal_defaults(), _mcl_blast_resistance = 6, - _mcl_hardness = 5, + _mcl_hardness = 3, _mcl_stripped_variant = "mcl_copper:block_exposed_cut", _mcl_oxidized_variant = "mcl_copper:block_oxidized_cut", _mcl_waxed_variant = "mcl_copper:waxed_block_weathered_cut", @@ -200,7 +200,7 @@ minetest.register_node("mcl_copper:waxed_block_weathered_cut", { groups = {pickaxey = 2, building_block = 1, waxed = 1}, sounds = mcl_sounds.node_sound_metal_defaults(), _mcl_blast_resistance = 6, - _mcl_hardness = 5, + _mcl_hardness = 3, _mcl_stripped_variant = "mcl_copper:block_weathered_cut", }) @@ -212,7 +212,7 @@ minetest.register_node("mcl_copper:block_oxidized_cut", { groups = {pickaxey = 2, building_block = 1}, sounds = mcl_sounds.node_sound_metal_defaults(), _mcl_blast_resistance = 6, - _mcl_hardness = 5, + _mcl_hardness = 3, _mcl_stripped_variant = "mcl_copper:block_weathered_cut", _mcl_waxed_variant = "mcl_copper:waxed_block_oxidized_cut", }) @@ -225,7 +225,7 @@ minetest.register_node("mcl_copper:waxed_block_oxidized_cut", { groups = {pickaxey = 2, building_block = 1, waxed = 1}, sounds = mcl_sounds.node_sound_metal_defaults(), _mcl_blast_resistance = 6, - _mcl_hardness = 5, + _mcl_hardness = 3, _mcl_stripped_variant = "mcl_copper:block_oxidized_cut", }) @@ -289,54 +289,54 @@ mcl_stairs.register_stair("copper_cut", "mcl_copper:block_cut", {pickaxey = 2, oxidizable = 1}, {"mcl_copper_block_cut.png", "mcl_copper_block_cut.png", "mcl_copper_block_cut.png", "mcl_copper_block_cut.png", "mcl_copper_block_cut.png", "mcl_copper_block_cut.png"}, S("Stairs of Cut Copper"), - nil, 6, nil, + nil, nil, nil, "woodlike") mcl_stairs.register_stair("waxed_copper_cut", "mcl_copper:waxed_block_cut", {pickaxey = 2, waxed = 1}, {"mcl_copper_block_cut.png", "mcl_copper_block_cut.png", "mcl_copper_block_cut.png", "mcl_copper_block_cut.png", "mcl_copper_block_cut.png", "mcl_copper_block_cut.png"}, S("Waxed Stairs of Cut Copper"), - nil, 6, nil, + nil, nil, nil, "woodlike") mcl_stairs.register_stair("copper_exposed_cut", "mcl_copper:block_exposed_cut", {pickaxey = 2, oxidizable = 1}, {"mcl_copper_exposed_cut.png", "mcl_copper_exposed_cut.png", "mcl_copper_exposed_cut.png", "mcl_copper_exposed_cut.png", "mcl_copper_exposed_cut.png", "mcl_copper_exposed_cut.png"}, S("Stairs of Exposed Cut Copper"), - nil, 6, nil, + nil, nil, nil, "woodlike") mcl_stairs.register_stair("waxed_copper_exposed_cut", "mcl_copper:waxed_block_exposed_cut", {pickaxey = 2, waxed = 1}, {"mcl_copper_exposed_cut.png", "mcl_copper_exposed_cut.png", "mcl_copper_exposed_cut.png", "mcl_copper_exposed_cut.png", "mcl_copper_exposed_cut.png", "mcl_copper_exposed_cut.png"}, S("Waxed Stairs of Exposed Cut Copper"), - nil, 6, nil, + nil, nil, nil, "woodlike") mcl_stairs.register_stair("copper_weathered_cut", "mcl_copper:block_weathered_cut", {pickaxey = 2, oxidizable = 1}, {"mcl_copper_weathered_cut.png", "mcl_copper_weathered_cut.png", "mcl_copper_weathered_cut.png", "mcl_copper_weathered_cut.png", "mcl_copper_weathered_cut.png", "mcl_copper_weathered_cut.png"}, S("Stairs of Weathered Cut Copper"), - nil, 6, nil, + nil, nil, nil, "woodlike") mcl_stairs.register_stair("waxed_copper_weathered_cut", "mcl_copper:waxed_block_weathered_cut", {pickaxey = 2, waxed = 1}, {"mcl_copper_weathered_cut.png", "mcl_copper_weathered_cut.png", "mcl_copper_weathered_cut.png", "mcl_copper_weathered_cut.png", "mcl_copper_weathered_cut.png", "mcl_copper_weathered_cut.png"}, S("Waxed Stairs of Weathered Cut Copper"), - nil, 6, nil, + nil, nil, nil, "woodlike") mcl_stairs.register_stair("copper_oxidized_cut", "mcl_copper:block_oxidized_cut", {pickaxey = 2}, {"mcl_copper_oxidized_cut.png", "mcl_copper_oxidized_cut.png", "mcl_copper_oxidized_cut.png", "mcl_copper_oxidized_cut.png", "mcl_copper_oxidized_cut.png", "mcl_copper_oxidized_cut.png"}, S("Stairs of Oxidized Cut Copper"), - nil, 6, nil, + nil, nil, nil, "woodlike") mcl_stairs.register_stair("waxed_copper_oxidized_cut", "mcl_copper:waxed_block_oxidized_cut", {pickaxey = 2, waxed = 1}, {"mcl_copper_oxidized_cut.png", "mcl_copper_oxidized_cut.png", "mcl_copper_oxidized_cut.png", "mcl_copper_oxidized_cut.png", "mcl_copper_oxidized_cut.png", "mcl_copper_oxidized_cut.png"}, S("Waxed Stairs of Oxidized Cut Copper"), - nil, 6, nil, + nil, nil, nil, "woodlike") diff --git a/mods/ITEMS/mcl_core/nodes_base.lua b/mods/ITEMS/mcl_core/nodes_base.lua index b691c6dfe..73b1e28e3 100644 --- a/mods/ITEMS/mcl_core/nodes_base.lua +++ b/mods/ITEMS/mcl_core/nodes_base.lua @@ -288,7 +288,7 @@ minetest.register_node("mcl_core:stone_smooth", { sounds = mcl_sounds.node_sound_stone_defaults(), is_ground_content = false, _mcl_blast_resistance = 6, - _mcl_hardness = 1.5, + _mcl_hardness = 2, }) minetest.register_node("mcl_core:granite", { diff --git a/mods/ITEMS/mcl_deepslate/init.lua b/mods/ITEMS/mcl_deepslate/init.lua index 0abb0c579..cbeae2d53 100644 --- a/mods/ITEMS/mcl_deepslate/init.lua +++ b/mods/ITEMS/mcl_deepslate/init.lua @@ -38,8 +38,8 @@ minetest.register_node("mcl_deepslate:infested_deepslate", { drop = "", sounds = mcl_sounds.node_sound_stone_defaults(), after_dig_node = spawn_silverfish, - _mcl_hardness = 0, - _mcl_blast_resistance = 0.5, + _mcl_hardness = 1.5, + _mcl_blast_resistance = 0.75, }) minetest.register_node("mcl_deepslate:tuff", { diff --git a/mods/ITEMS/mcl_lightning_rods/init.lua b/mods/ITEMS/mcl_lightning_rods/init.lua index 3cd2dc1dc..b7d10e090 100644 --- a/mods/ITEMS/mcl_lightning_rods/init.lua +++ b/mods/ITEMS/mcl_lightning_rods/init.lua @@ -60,7 +60,8 @@ local rod_def = { return minetest.item_place(itemstack, placer, pointed_thing, param2) end, - _mcl_blast_resistance = 0, + _mcl_blast_resistance = 6, + _mcl_hardness = 3, } minetest.register_node("mcl_lightning_rods:rod", rod_def) From cbafdfa585fb94f26a3c4042ec047d5798146216 Mon Sep 17 00:00:00 2001 From: seventeenthShulker Date: Tue, 19 Sep 2023 22:02:13 +0200 Subject: [PATCH 07/15] Make monster eggs' hardness consistent with MC Change blast resistance to 0.75, add an optional hardness override parameter, because cobble is unique here (Still instant-minable, this is a separate issue) --- mods/ITEMS/mcl_monster_eggs/init.lua | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/mods/ITEMS/mcl_monster_eggs/init.lua b/mods/ITEMS/mcl_monster_eggs/init.lua index f58717d04..42db03c8f 100644 --- a/mods/ITEMS/mcl_monster_eggs/init.lua +++ b/mods/ITEMS/mcl_monster_eggs/init.lua @@ -10,10 +10,15 @@ local function spawn_silverfish(pos, oldnode, oldmetadata, digger) end -- Template function for registering monster egg blocks -local function register_block(subname, description, tiles, is_ground_content) +local function register_block(subname, description, tiles, is_ground_content, hardness_override) if is_ground_content == nil then is_ground_content = false end + -- Default hardness matches for stone and stone brick variants; cobble has 1.0 + local hardness = 0.75 + if hardness_override then + hardness = hardness_override + end minetest.register_node("mcl_monster_eggs:monster_egg_"..subname, { description = description, tiles = tiles, @@ -24,14 +29,14 @@ local function register_block(subname, description, tiles, is_ground_content) after_dig_node = spawn_silverfish, _tt_help = S("Hides a silverfish"), _doc_items_longdesc = S("An infested block is a block from which a silverfish will pop out when it is broken. It looks identical to its normal counterpart."), - _mcl_hardness = 0, - _mcl_blast_resistance = 0.5, + _mcl_hardness = hardness, + _mcl_blast_resistance = 0.75, }) end -- Register all the monster egg blocks register_block("stone", S("Infested Stone"), {"default_stone.png"}, true) -register_block("cobble", S("Infested Cobblestone"), {"default_cobble.png"}) +register_block("cobble", S("Infested Cobblestone"), {"default_cobble.png"}, nil, 1.0) register_block("stonebrick", S("Infested Stone Bricks"), {"default_stone_brick.png"}) register_block("stonebrickcracked", S("Infested Cracked Stone Bricks"), {"mcl_core_stonebrick_cracked.png"}) register_block("stonebrickmossy", S("Infested Mossy Stone Bricks"), {"mcl_core_stonebrick_mossy.png"}) From 0408f9c3d8d4c0b18f56acba0839ff4024bb8364 Mon Sep 17 00:00:00 2001 From: seventeenthShulker Date: Tue, 19 Sep 2023 23:26:32 +0200 Subject: [PATCH 08/15] Update hardness and blast res for value not matching the wiki - Notably, smooth sandstone (and red) is much more durable than other sandstone variants - Ender chest isn't actually more explosion resistant than obsidian, hmm --- mods/ITEMS/REDSTONE/mcl_observers/init.lua | 12 +++---- mods/ITEMS/REDSTONE/mesecons_pistons/init.lua | 24 +++++++------- mods/ITEMS/mcl_bamboo/bamboo_base.lua | 4 +-- mods/ITEMS/mcl_beds/api.lua | 2 +- mods/ITEMS/mcl_brewing/init.lua | 32 +++++++++---------- mods/ITEMS/mcl_chests/ender.lua | 2 +- mods/ITEMS/mcl_chests/shulkers.lua | 2 +- mods/ITEMS/mcl_colorblocks/init.lua | 2 +- mods/ITEMS/mcl_core/nodes_base.lua | 18 +++++------ mods/ITEMS/mcl_crimson/init.lua | 6 ++-- mods/ITEMS/mcl_end/chorus_plant.lua | 4 +-- mods/ITEMS/mcl_farming/soil.lua | 2 +- mods/ITEMS/mcl_lectern/init.lua | 4 +-- mods/ITEMS/mcl_sculk/init.lua | 2 +- 14 files changed, 57 insertions(+), 59 deletions(-) diff --git a/mods/ITEMS/REDSTONE/mcl_observers/init.lua b/mods/ITEMS/REDSTONE/mcl_observers/init.lua index 6045b5677..dfdbeb8a9 100644 --- a/mods/ITEMS/REDSTONE/mcl_observers/init.lua +++ b/mods/ITEMS/REDSTONE/mcl_observers/init.lua @@ -113,8 +113,8 @@ mesecon.register_node("mcl_observers:observer", { sounds = mcl_sounds.node_sound_stone_defaults(), paramtype2 = "facedir", on_rotate = false, - _mcl_blast_resistance = 3.5, - _mcl_hardness = 3.5, + _mcl_blast_resistance = 3, + _mcl_hardness = 3, }, { description = S("Observer"), _tt_help = S("Emits redstone pulse when block in front changes"), @@ -172,8 +172,8 @@ mesecon.register_node("mcl_observers:observer_down", { sounds = mcl_sounds.node_sound_stone_defaults(), groups = {pickaxey=1, material_stone=1, not_opaque=1, not_in_creative_inventory=1 }, on_rotate = false, - _mcl_blast_resistance = 3.5, - _mcl_hardness = 3.5, + _mcl_blast_resistance = 3, + _mcl_hardness = 3, drop = "mcl_observers:observer_off", }, { tiles = { @@ -224,8 +224,8 @@ mesecon.register_node("mcl_observers:observer_up", { sounds = mcl_sounds.node_sound_stone_defaults(), groups = {pickaxey=1, material_stone=1, not_opaque=1, not_in_creative_inventory=1 }, on_rotate = false, - _mcl_blast_resistance = 3.5, - _mcl_hardness = 3.5, + _mcl_blast_resistance = 3, + _mcl_hardness = 3, drop = "mcl_observers:observer_off", }, { tiles = { diff --git a/mods/ITEMS/REDSTONE/mesecons_pistons/init.lua b/mods/ITEMS/REDSTONE/mesecons_pistons/init.lua index 262ac6eb5..57272317e 100644 --- a/mods/ITEMS/REDSTONE/mesecons_pistons/init.lua +++ b/mods/ITEMS/REDSTONE/mesecons_pistons/init.lua @@ -218,7 +218,7 @@ minetest.register_node("mesecons_pistons:piston_normal_off", { }, }, _mcl_blast_resistance = 0.5, - _mcl_hardness = 0.5, + _mcl_hardness = 1.5, on_rotate = function(pos, node, user, mode) if mode == screwdriver.ROTATE_AXIS then minetest.set_node(pos, {name="mesecons_pistons:piston_up_normal_off"}) @@ -255,7 +255,7 @@ minetest.register_node("mesecons_pistons:piston_normal_on", { }, }, _mcl_blast_resistance = 0.5, - _mcl_hardness = 0.5, + _mcl_hardness = 1.5, on_rotate = false, }) @@ -326,7 +326,7 @@ minetest.register_node("mesecons_pistons:piston_sticky_off", { }, }, _mcl_blast_resistance = 0.5, - _mcl_hardness = 0.5, + _mcl_hardness = 1.5, on_rotate = function(pos, node, user, mode) if mode == screwdriver.ROTATE_AXIS then minetest.set_node(pos, {name="mesecons_pistons:piston_up_sticky_off"}) @@ -363,7 +363,7 @@ minetest.register_node("mesecons_pistons:piston_sticky_on", { }, }, _mcl_blast_resistance = 0.5, - _mcl_hardness = 0.5, + _mcl_hardness = 1.5, on_rotate = false, }) @@ -449,7 +449,7 @@ minetest.register_node("mesecons_pistons:piston_up_normal_off", { footstep = mcl_sounds.node_sound_wood_defaults().footstep }), _mcl_blast_resistance = 0.5, - _mcl_hardness = 0.5, + _mcl_hardness = 1.5, on_rotate = function(pos, node, user, mode) if mode == screwdriver.ROTATE_AXIS then minetest.set_node(pos, {name="mesecons_pistons:piston_down_normal_off"}) @@ -487,7 +487,7 @@ minetest.register_node("mesecons_pistons:piston_up_normal_on", { }, }, _mcl_blast_resistance = 0.5, - _mcl_hardness = 0.5, + _mcl_hardness = 1.5, on_rotate = false, }) @@ -556,7 +556,7 @@ minetest.register_node("mesecons_pistons:piston_up_sticky_off", { }, }, _mcl_blast_resistance = 0.5, - _mcl_hardness = 0.5, + _mcl_hardness = 1.5, on_rotate = function(pos, node, user, mode) if mode == screwdriver.ROTATE_AXIS then minetest.set_node(pos, {name="mesecons_pistons:piston_down_sticky_off"}) @@ -594,7 +594,7 @@ minetest.register_node("mesecons_pistons:piston_up_sticky_on", { }, }, _mcl_blast_resistance = 0.5, - _mcl_hardness = 0.5, + _mcl_hardness = 1.5, on_rotate = false, }) @@ -680,7 +680,7 @@ minetest.register_node("mesecons_pistons:piston_down_normal_off", { }, }, _mcl_blast_resistance = 0.5, - _mcl_hardness = 0.5, + _mcl_hardness = 1.5, on_rotate = function(pos, node, user, mode) if mode == screwdriver.ROTATE_AXIS then minetest.set_node(pos, {name="mesecons_pistons:piston_normal_off"}) @@ -718,7 +718,7 @@ minetest.register_node("mesecons_pistons:piston_down_normal_on", { }, }, _mcl_blast_resistance = 0.5, - _mcl_hardness = 0.5, + _mcl_hardness = 1.5, on_rotate = false, }) @@ -782,7 +782,7 @@ minetest.register_node("mesecons_pistons:piston_down_sticky_off", { }, }, _mcl_blast_resistance = 0.5, - _mcl_hardness = 0.5, + _mcl_hardness = 1.5, on_rotate = function(pos, node, user, mode) if mode == screwdriver.ROTATE_AXIS then minetest.set_node(pos, {name="mesecons_pistons:piston_sticky_off"}) @@ -820,7 +820,7 @@ minetest.register_node("mesecons_pistons:piston_down_sticky_on", { }, }, _mcl_blast_resistance = 0.5, - _mcl_hardness = 0.5, + _mcl_hardness = 1.5, on_rotate = false, }) diff --git a/mods/ITEMS/mcl_bamboo/bamboo_base.lua b/mods/ITEMS/mcl_bamboo/bamboo_base.lua index 33e0cebaa..98a3a9257 100644 --- a/mods/ITEMS/mcl_bamboo/bamboo_base.lua +++ b/mods/ITEMS/mcl_bamboo/bamboo_base.lua @@ -62,7 +62,7 @@ local bamboo_def = { inventory_image = "mcl_bamboo_bamboo_shoot.png", wield_image = "mcl_bamboo_bamboo_shoot.png", _mcl_blast_resistance = 1, - _mcl_hardness = 1.5, + _mcl_hardness = 1, node_box = { type = "fixed", fixed = { @@ -277,7 +277,7 @@ local bamboo_block_def = { sounds = node_sound, paramtype2 = "facedir", drops = "mcl_bamboo:bamboo_block", - _mcl_blast_resistance = 3, + _mcl_blast_resistance = 2, _mcl_hardness = 2, _mcl_stripped_variant = "mcl_bamboo:bamboo_block_stripped", -- this allows us to use the built in Axe's strip block. on_place = mcl_util.rotate_axis, diff --git a/mods/ITEMS/mcl_beds/api.lua b/mods/ITEMS/mcl_beds/api.lua index b96953017..34cd8cf31 100644 --- a/mods/ITEMS/mcl_beds/api.lua +++ b/mods/ITEMS/mcl_beds/api.lua @@ -288,7 +288,7 @@ function mcl_beds.register_bed(name, def) is_ground_content = false, groups = {handy = 1, flammable = -1, bed = 2, dig_by_piston=1, bouncy=66, fall_damage_add_percent=-50, not_in_creative_inventory = 1}, _mcl_hardness = 0.2, - _mcl_blast_resistance = 1, + _mcl_blast_resistance = 0.2, sounds = def.sounds or default_sounds, drop = "", selection_box = common_box, diff --git a/mods/ITEMS/mcl_brewing/init.lua b/mods/ITEMS/mcl_brewing/init.lua index 937d9089c..1021b1517 100644 --- a/mods/ITEMS/mcl_brewing/init.lua +++ b/mods/ITEMS/mcl_brewing/init.lua @@ -456,8 +456,8 @@ minetest.register_node("mcl_brewing:stand_000", { } }, sounds = mcl_sounds.node_sound_metal_defaults(), - _mcl_blast_resistance = 1, - _mcl_hardness = 1, + _mcl_blast_resistance = 0.5, + _mcl_hardness = 0.5, on_destruct = on_destruct, allow_metadata_inventory_take = allow_take, allow_metadata_inventory_put = allow_put, @@ -537,8 +537,8 @@ minetest.register_node("mcl_brewing:stand_100", { } }, sounds = mcl_sounds.node_sound_metal_defaults(), - _mcl_blast_resistance = 1, - _mcl_hardness = 1, + _mcl_blast_resistance = 0.5, + _mcl_hardness = 0.5, on_destruct = on_destruct, allow_metadata_inventory_take = allow_take, allow_metadata_inventory_put = allow_put, @@ -617,8 +617,8 @@ minetest.register_node("mcl_brewing:stand_010", { } }, sounds = mcl_sounds.node_sound_metal_defaults(), - _mcl_blast_resistance = 1, - _mcl_hardness = 1, + _mcl_blast_resistance = 0.5, + _mcl_hardness = 0.5, on_destruct = on_destruct, allow_metadata_inventory_take = allow_take, allow_metadata_inventory_put = allow_put, @@ -692,8 +692,8 @@ minetest.register_node("mcl_brewing:stand_001", { } }, sounds = mcl_sounds.node_sound_metal_defaults(), - _mcl_blast_resistance = 1, - _mcl_hardness = 1, + _mcl_blast_resistance = 0.5, + _mcl_hardness = 0.5, on_destruct = on_destruct, allow_metadata_inventory_take = allow_take, allow_metadata_inventory_put = allow_put, @@ -777,8 +777,8 @@ minetest.register_node("mcl_brewing:stand_110", { } }, sounds = mcl_sounds.node_sound_metal_defaults(), - _mcl_blast_resistance = 1, - _mcl_hardness = 1, + _mcl_blast_resistance = 0.5, + _mcl_hardness = 0.5, on_destruct = on_destruct, allow_metadata_inventory_take = allow_take, allow_metadata_inventory_put = allow_put, @@ -858,8 +858,8 @@ minetest.register_node("mcl_brewing:stand_101", { } }, sounds = mcl_sounds.node_sound_metal_defaults(), - _mcl_blast_resistance = 1, - _mcl_hardness = 1, + _mcl_blast_resistance = 0.5, + _mcl_hardness = 0.5, on_destruct = on_destruct, allow_metadata_inventory_take = allow_take, allow_metadata_inventory_put = allow_put, @@ -939,8 +939,8 @@ minetest.register_node("mcl_brewing:stand_011", { } }, sounds = mcl_sounds.node_sound_metal_defaults(), - _mcl_blast_resistance = 1, - _mcl_hardness = 1, + _mcl_blast_resistance = 0.5, + _mcl_hardness = 0.5, on_destruct = on_destruct, allow_metadata_inventory_take = allow_take, allow_metadata_inventory_put = allow_put, @@ -1027,8 +1027,8 @@ minetest.register_node("mcl_brewing:stand_111", { } }, sounds = mcl_sounds.node_sound_metal_defaults(), - _mcl_blast_resistance = 1, - _mcl_hardness = 1, + _mcl_blast_resistance = 0.5, + _mcl_hardness = 0.5, on_destruct = on_destruct, allow_metadata_inventory_take = allow_take, allow_metadata_inventory_put = allow_put, diff --git a/mods/ITEMS/mcl_chests/ender.lua b/mods/ITEMS/mcl_chests/ender.lua index cf3e7b0fe..d76d627bb 100644 --- a/mods/ITEMS/mcl_chests/ender.lua +++ b/mods/ITEMS/mcl_chests/ender.lua @@ -94,7 +94,7 @@ minetest.register_node("mcl_chests:ender_chest_small", { mcl_chests.player_chest_close(sender) end end, - _mcl_blast_resistance = 3000, + _mcl_blast_resistance = 600, _mcl_hardness = 22.5, _mcl_silk_touch_drop = { "mcl_chests:ender_chest" }, on_rotate = mcl_chests.simple_rotate, diff --git a/mods/ITEMS/mcl_chests/shulkers.lua b/mods/ITEMS/mcl_chests/shulkers.lua index b6ada6c46..f7e16dc11 100644 --- a/mods/ITEMS/mcl_chests/shulkers.lua +++ b/mods/ITEMS/mcl_chests/shulkers.lua @@ -295,7 +295,7 @@ for color, desc in pairs(boxtypes) do end end, on_rotate = mcl_chests.simple_rotate, - _mcl_blast_resistance = 6, + _mcl_blast_resistance = 2, _mcl_hardness = 2, _mcl_hoppers_on_try_push = function(pos, hop_pos, hop_inv, hop_list) local meta = minetest.get_meta(pos) diff --git a/mods/ITEMS/mcl_colorblocks/init.lua b/mods/ITEMS/mcl_colorblocks/init.lua index dff30484a..72406014f 100644 --- a/mods/ITEMS/mcl_colorblocks/init.lua +++ b/mods/ITEMS/mcl_colorblocks/init.lua @@ -162,7 +162,7 @@ for _, row in ipairs(block.dyes) do stack_max = 64, is_ground_content = false, sounds = mcl_sounds.node_sound_stone_defaults(), - _mcl_blast_resistance = 4.2, + _mcl_blast_resistance = 1.4, _mcl_hardness = 1.4, on_rotate = on_rotate, }) diff --git a/mods/ITEMS/mcl_core/nodes_base.lua b/mods/ITEMS/mcl_core/nodes_base.lua index 73b1e28e3..595019741 100644 --- a/mods/ITEMS/mcl_core/nodes_base.lua +++ b/mods/ITEMS/mcl_core/nodes_base.lua @@ -424,7 +424,7 @@ minetest.register_node("mcl_core:grass_path", { footstep = {name="default_grass_footstep", gain=0.1}, }), _mcl_blast_resistance = 0.65, - _mcl_hardness = 0.6, + _mcl_hardness = 0.65, }) -- TODO: Add particles @@ -497,8 +497,8 @@ minetest.register_node("mcl_core:podzol", { sounds = mcl_sounds.node_sound_dirt_defaults(), on_construct = mcl_core.on_snowable_construct, _mcl_snowed = "mcl_core:podzol_snow", - _mcl_blast_resistance = 0.8, - _mcl_hardness = 0.8, + _mcl_blast_resistance = 0.5, + _mcl_hardness = 0.5, _mcl_silk_touch_drop = true, }) mcl_core.register_snowed_node("mcl_core:podzol_snow", "mcl_core:podzol", nil, nil, false, S("Podzol with Snow")) @@ -600,8 +600,8 @@ minetest.register_node("mcl_core:sandstonesmooth", { stack_max = 64, groups = {pickaxey=1, sandstone=1, normal_sandstone=1, building_block=1, material_stone=1}, sounds = mcl_sounds.node_sound_stone_defaults(), - _mcl_blast_resistance = 6, - _mcl_hardness = 2, + _mcl_blast_resistance = 0.8, + _mcl_hardness = 0.8, }) minetest.register_node("mcl_core:sandstonecarved", { @@ -687,8 +687,8 @@ minetest.register_node("mcl_core:redsandstonesmooth2", { stack_max = 64, groups = {pickaxey=1, sandstone=1, red_sandstone=1, building_block=1, material_stone=1}, sounds = mcl_sounds.node_sound_stone_defaults(), - _mcl_blast_resistance = 0.8, - _mcl_hardness = 0.8, + _mcl_blast_resistance = 6, + _mcl_hardness = 2, }) --- @@ -1139,8 +1139,8 @@ minetest.register_node("mcl_core:snowblock", { on_construct = mcl_core.on_snow_construct, after_destruct = mcl_core.after_snow_destruct, drop = "mcl_throwing:snowball 4", - _mcl_blast_resistance = 0.1, - _mcl_hardness = 0.1, + _mcl_blast_resistance = 0.2, + _mcl_hardness = 0.2, _mcl_silk_touch_drop = true, }) diff --git a/mods/ITEMS/mcl_crimson/init.lua b/mods/ITEMS/mcl_crimson/init.lua index 3a7862019..60263017d 100644 --- a/mods/ITEMS/mcl_crimson/init.lua +++ b/mods/ITEMS/mcl_crimson/init.lua @@ -191,8 +191,7 @@ minetest.register_node("mcl_crimson:twisting_vines", { "mcl_crimson:twisting_vines", "mcl_crimson:twisting_vines", }, - _mcl_blast_resistance = 0.2, - _mcl_hardness = 0.2, + _mcl_blast_resistance = 0, }) minetest.register_node("mcl_crimson:weeping_vines", { @@ -281,8 +280,7 @@ minetest.register_node("mcl_crimson:weeping_vines", { "mcl_crimson:weeping_vines", "mcl_crimson:weeping_vines", }, - _mcl_blast_resistance = 0.2, - _mcl_hardness = 0.2, + _mcl_blast_resistance = 0, }) minetest.register_node("mcl_crimson:nether_sprouts", { diff --git a/mods/ITEMS/mcl_end/chorus_plant.lua b/mods/ITEMS/mcl_end/chorus_plant.lua index 7f2064a3e..7e6530192 100644 --- a/mods/ITEMS/mcl_end/chorus_plant.lua +++ b/mods/ITEMS/mcl_end/chorus_plant.lua @@ -230,7 +230,7 @@ minetest.register_node("mcl_end:chorus_flower_dead", { groups = {handy=1,axey=1, deco_block = 1, dig_by_piston = 1, destroy_by_lava_flow = 1,chorus_plant = 1, not_in_creative_inventory=1}, after_dig_node = mcl_end.check_detach_chorus_plant, on_blast = mcl_end.check_blast_chorus_plant, - _mcl_blast_resistance = 2, + _mcl_blast_resistance = 0.4, _mcl_hardness = 0.4, }) @@ -309,7 +309,7 @@ minetest.register_node("mcl_end:chorus_plant", { end, after_dig_node = mcl_end.check_detach_chorus_plant, on_blast = mcl_end.check_blast_chorus_plant, - _mcl_blast_resistance = 2, + _mcl_blast_resistance = 0.4, _mcl_hardness = 0.4, }) diff --git a/mods/ITEMS/mcl_farming/soil.lua b/mods/ITEMS/mcl_farming/soil.lua index a6721cc26..e91feb1e8 100644 --- a/mods/ITEMS/mcl_farming/soil.lua +++ b/mods/ITEMS/mcl_farming/soil.lua @@ -44,7 +44,7 @@ minetest.register_node("mcl_farming:soil_wet", { end, groups = {handy=1,shovely=1, not_in_creative_inventory=1, dirtifies_below_solid=1, dirtifier=1, soil=3, soil_sapling=1 }, sounds = mcl_sounds.node_sound_dirt_defaults(), - _mcl_blast_resistance = 0.5, + _mcl_blast_resistance = 0.6, _mcl_hardness = 0.6, }) diff --git a/mods/ITEMS/mcl_lectern/init.lua b/mods/ITEMS/mcl_lectern/init.lua index e98422249..2f6018a12 100644 --- a/mods/ITEMS/mcl_lectern/init.lua +++ b/mods/ITEMS/mcl_lectern/init.lua @@ -31,8 +31,8 @@ local lectern_def = { walkable = true, is_ground_content = false, node_placement_prediction = "", - _mcl_blast_resistance = 3, - _mcl_hardness = 2, + _mcl_blast_resistance = 2.5, + _mcl_hardness = 2.5, selection_box = { type = "fixed", fixed = { diff --git a/mods/ITEMS/mcl_sculk/init.lua b/mods/ITEMS/mcl_sculk/init.lua index 4af60178e..2bedfef24 100644 --- a/mods/ITEMS/mcl_sculk/init.lua +++ b/mods/ITEMS/mcl_sculk/init.lua @@ -194,7 +194,7 @@ minetest.register_node("mcl_sculk:sculk", { is_ground_content = false, on_destruct = sculk_on_destruct, _mcl_blast_resistance = 0.2, - _mcl_hardness = 0.6, + _mcl_hardness = 0.2, _mcl_silk_touch_drop = true, }) From 49b2491b7072473e64321c3c1ed65d28f266b796 Mon Sep 17 00:00:00 2001 From: seventeenthShulker Date: Tue, 26 Sep 2023 12:45:41 +0200 Subject: [PATCH 09/15] Fix the other bed node --- mods/ITEMS/mcl_beds/api.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mods/ITEMS/mcl_beds/api.lua b/mods/ITEMS/mcl_beds/api.lua index 34cd8cf31..7abadb85a 100644 --- a/mods/ITEMS/mcl_beds/api.lua +++ b/mods/ITEMS/mcl_beds/api.lua @@ -210,7 +210,7 @@ function mcl_beds.register_bed(name, def) stack_max = 1, groups = {handy=1, bed = 1, dig_by_piston=1, bouncy=66, fall_damage_add_percent=-50, deco_block = 1, flammable=-1}, _mcl_hardness = 0.2, - _mcl_blast_resistance = 1, + _mcl_blast_resistance = 0.2, sounds = def.sounds or default_sounds, selection_box = common_box, collision_box = common_box, From b237c4642db475d42d442297de395b89a8334ccd Mon Sep 17 00:00:00 2001 From: seventeenthShulker Date: Tue, 26 Sep 2023 13:20:16 +0200 Subject: [PATCH 10/15] Revert "Forgot about blackstone" I left it in from another branch, didn't want to force push. This reverts commit 58d2f59192073acf9f55406358bf48244e008b9b. Revert "Walls use `source` parameter for default hardness and blast resistance" I left it in from another branch, didn't want to force push. This reverts commit e8944cc145dc59db53a9368d8ae269edf366e742. Revert "Fix prismarine bricks and dark variant blast res." I left it in from another branch, didn't want to force push. This reverts commit 6125d625bc6ce15644cf8b579599f75da5bffd07. Revert "Un-hardcode blast resistance, hardness for walls," I left it in from another branch, didn't want to force push. This reverts commit 26e873703151bc4bfaf7588ad1e3afa731a05fbd. Revert "All wood-type and nether-type fences now match material's blast resistance" I left it in from another branch, didn't want to force push. This reverts commit a1e20f29162462120fb1c046c2d34f8fcebfb413. --- mods/ITEMS/mcl_bamboo/bamboo_items.lua | 21 ++-------- mods/ITEMS/mcl_blackstone/init.lua | 5 +-- mods/ITEMS/mcl_cherry_blossom/nodes.lua | 13 ++----- mods/ITEMS/mcl_deepslate/init.lua | 5 +-- mods/ITEMS/mcl_fences/init.lua | 21 +--------- mods/ITEMS/mcl_ocean/prismarine.lua | 4 +- mods/ITEMS/mcl_walls/API.md | 4 +- mods/ITEMS/mcl_walls/init.lua | 52 +++++++++---------------- 8 files changed, 32 insertions(+), 93 deletions(-) diff --git a/mods/ITEMS/mcl_bamboo/bamboo_items.lua b/mods/ITEMS/mcl_bamboo/bamboo_items.lua index a7a28257e..6ad8e4f58 100644 --- a/mods/ITEMS/mcl_bamboo/bamboo_items.lua +++ b/mods/ITEMS/mcl_bamboo/bamboo_items.lua @@ -192,23 +192,10 @@ if minetest.get_modpath("mcl_fences") then local wood_groups = { handy = 1, axey = 1, flammable = 2, fence_wood = 1, fire_encouragement = 5, fire_flammability = 20 } local wood_connect = { "group:fence_wood" } - local fence_id = mcl_fences.register_fence( - id, - S("Bamboo Fence"), - "mcl_bamboo_fence_bamboo.png", - wood_groups, - minetest.registered_nodes["mcl_core:wood"]._mcl_hardness, - minetest.registered_nodes["mcl_core:wood"]._mcl_blast_resistance, - wood_connect, node_sound) - - local gate_id = mcl_fences.register_fence_gate( - id, - S("Bamboo Fence Gate"), - "mcl_bamboo_fence_gate_bamboo.png", - wood_groups, - minetest.registered_nodes["mcl_core:wood"]._mcl_hardness, - minetest.registered_nodes["mcl_core:wood"]._mcl_blast_resistance, - node_sound) -- note: about missing params.. will use defaults. + local fence_id = mcl_fences.register_fence(id, S("Bamboo Fence"), "mcl_bamboo_fence_bamboo.png", wood_groups, + 2, 15, wood_connect, node_sound) + local gate_id = mcl_fences.register_fence_gate(id, S("Bamboo Fence Gate"), "mcl_bamboo_fence_gate_bamboo.png", + wood_groups, 2, 15, node_sound) -- note: about missing params.. will use defaults. mcl_bamboo.mcl_log(dump(fence_id)) mcl_bamboo.mcl_log(dump(gate_id)) diff --git a/mods/ITEMS/mcl_blackstone/init.lua b/mods/ITEMS/mcl_blackstone/init.lua index be5bcc5db..c8dafbe6c 100644 --- a/mods/ITEMS/mcl_blackstone/init.lua +++ b/mods/ITEMS/mcl_blackstone/init.lua @@ -226,10 +226,7 @@ mcl_stairs.register_stair_and_slab("blackstone_brick_polished", "mcl_blackstone: S("Double Polished Blackstone Brick Slab"), nil) --Wall -mcl_walls.register_wall( - "mcl_blackstone:wall", - S("Blackstone Wall"), - "mcl_blackstone:blackstone") +mcl_walls.register_wall("mcl_blackstone:wall", S("Blackstone Wall"), "mcl_blackstone:blackstone") --lavacooling diff --git a/mods/ITEMS/mcl_cherry_blossom/nodes.lua b/mods/ITEMS/mcl_cherry_blossom/nodes.lua index 84d1a8a1b..6e13cacd9 100644 --- a/mods/ITEMS/mcl_cherry_blossom/nodes.lua +++ b/mods/ITEMS/mcl_cherry_blossom/nodes.lua @@ -66,16 +66,9 @@ mcl_signs.register_sign_custom("mcl_cherry_blossom", "_cherrywood", "mcl_cherry_blossom_sign_inv.png", "mcl_cherry_blossom_sign_inv.png", S("Cherry Sign")) -- Fences & Gates -mcl_fences.register_fence_and_fence_gate( - "cherry_fence", - S("Cherry Fence"), - S("Cherry Gate"), - "mcl_cherry_blossom_planks.png", - {handy=1, axey=1, flammable=2, fence_wood=1, fire_encouragement=5, fire_flammability=20}, - minetest.registered_nodes["mcl_core:wood"]._mcl_hardness, - minetest.registered_nodes["mcl_core:wood"]._mcl_blast_resistance, - {"group:fence_wood"}, - mcl_sounds.node_sound_wood_defaults()) +mcl_fences.register_fence_and_fence_gate("cherry_fence", S("Cherry Fence"), S("Cherry Gate"), + "mcl_cherry_blossom_planks.png", {handy=1, axey=1, flammable=2, fence_wood=1, fire_encouragement=5, fire_flammability=20}, 2, 15, + {"group:fence_wood"}, mcl_sounds.node_sound_wood_defaults()) -- Redstone mesecon.register_pressure_plate( diff --git a/mods/ITEMS/mcl_deepslate/init.lua b/mods/ITEMS/mcl_deepslate/init.lua index cbeae2d53..f13c1319d 100644 --- a/mods/ITEMS/mcl_deepslate/init.lua +++ b/mods/ITEMS/mcl_deepslate/init.lua @@ -218,10 +218,7 @@ local function register_deepslate_variant(item, desc, longdesc) end if item ~= "chiseled" then mcl_stairs.register_stair_and_slab_simple("deepslate_"..item, "mcl_deepslate:deepslate_"..item, S(desc.." Stairs"), S(desc.." Slab"), S("Double "..desc.." Slab")) - mcl_walls.register_wall( - "mcl_deepslate:deepslate"..item.."wall", - S(desc.." Wall"), - "mcl_deepslate:deepslate_"..item) + mcl_walls.register_wall("mcl_deepslate:deepslate"..item.."wall", S(desc.." Wall"), "mcl_deepslate:deepslate_"..item) end end diff --git a/mods/ITEMS/mcl_fences/init.lua b/mods/ITEMS/mcl_fences/init.lua index 5555fbfc0..b14d103d2 100644 --- a/mods/ITEMS/mcl_fences/init.lua +++ b/mods/ITEMS/mcl_fences/init.lua @@ -269,16 +269,7 @@ for w=1, #woods do id = wood[1].."_fence" id_gate = wood[1].."_fence_gate" end - mcl_fences.register_fence_and_fence_gate( - id, - wood[2], - wood[3], - wood[4], - wood_groups, - minetest.registered_nodes["mcl_core:wood"]._mcl_hardness, - minetest.registered_nodes["mcl_core:wood"]._mcl_blast_resistance, - wood_connect, - wood_sounds) + mcl_fences.register_fence_and_fence_gate(id, wood[2], wood[3], wood[4], wood_groups, 2, 15, wood_connect, wood_sounds) minetest.register_craft({ output = "mcl_fences:"..id.." 3", @@ -298,15 +289,7 @@ end -- Nether Brick Fence (without fence gate!) -mcl_fences.register_fence( - "nether_brick_fence", - S("Nether Brick Fence"), - "mcl_fences_fence_nether_brick.png", - {pickaxey=1, deco_block=1, fence_nether_brick=1}, - minetest.registered_nodes["mcl_nether:nether_brick"]._mcl_hardness, - minetest.registered_nodes["mcl_nether:nether_brick"]._mcl_blast_resistance, - {"group:fence_nether_brick"}, - mcl_sounds.node_sound_stone_defaults()) +mcl_fences.register_fence("nether_brick_fence", S("Nether Brick Fence"), "mcl_fences_fence_nether_brick.png", {pickaxey=1, deco_block=1, fence_nether_brick=1}, 2, 30, {"group:fence_nether_brick"}, mcl_sounds.node_sound_stone_defaults()) minetest.register_craft({ output = "mcl_fences:nether_brick_fence 6", diff --git a/mods/ITEMS/mcl_ocean/prismarine.lua b/mods/ITEMS/mcl_ocean/prismarine.lua index fff07cb7e..32d17538d 100644 --- a/mods/ITEMS/mcl_ocean/prismarine.lua +++ b/mods/ITEMS/mcl_ocean/prismarine.lua @@ -52,7 +52,7 @@ minetest.register_node("mcl_ocean:prismarine_brick", { tiles = {"mcl_ocean_prismarine_bricks.png"}, groups = {pickaxey=1, building_block=1, material_stone=1}, sounds = mcl_sounds.node_sound_stone_defaults(), - _mcl_blast_resistance = 6, + _mcl_blast_resistance = 1.5, _mcl_hardness = 1.5, }) @@ -64,7 +64,7 @@ minetest.register_node("mcl_ocean:prismarine_dark", { tiles = {"mcl_ocean_prismarine_dark.png"}, groups = {pickaxey=1, building_block=1, material_stone=1}, sounds = mcl_sounds.node_sound_stone_defaults(), - _mcl_blast_resistance = 6, + _mcl_blast_resistance = 1.5, _mcl_hardness = 1.5, }) diff --git a/mods/ITEMS/mcl_walls/API.md b/mods/ITEMS/mcl_walls/API.md index 63621ade1..8adf6e8b4 100644 --- a/mods/ITEMS/mcl_walls/API.md +++ b/mods/ITEMS/mcl_walls/API.md @@ -2,7 +2,7 @@ This API allows you to add more walls (like the cobblestone wall) to VoxeLibre. -## `mcl_walls.register_wall(nodename, description, craft_material, tiles, invtex, groups, sounds, hardness, blast_resistance)` +## `mcl_walls.register_wall(nodename, description, craft_material, tiles, invtex, groups, sounds)` Adds a new wall type. This is optimized for stone-based walls, but other materials are theoretically possible, too. @@ -25,8 +25,6 @@ If `craft_material` is not `nil` it also adds a crafting recipe of the following * `inventory_image`: Inventory image (optional if `source` is set) * `groups`: Base group memberships (optional, default is `{pickaxey=1}`) * `sounds`: Sound table (optional, by default default uses stone sounds) -* `hardness`: Hardness of node (optional, default matches `source` node or fallback value 2) -* `blast_resistance`: Blast resistance of node (optional, default matches `source` node or fallback value 6) The following groups will automatically be added to the nodes (where applicable), you do not need to add them to the `groups` table: diff --git a/mods/ITEMS/mcl_walls/init.lua b/mods/ITEMS/mcl_walls/init.lua index 09a35b549..57212e7dd 100644 --- a/mods/ITEMS/mcl_walls/init.lua +++ b/mods/ITEMS/mcl_walls/init.lua @@ -97,10 +97,8 @@ local full_blocks = { * inventory_image: Inventory image (optional) * groups: Base group memberships (optional, default is {pickaxey=1}) * sounds: Sound table (optional, default is stone) -* hardness: Hardness of node (optional, default matches `source` node or fallback value 2) -* blast_resistance: Blast resistance of node (optional, default matches `source` node or fallback value 6) ]] -function mcl_walls.register_wall(nodename, description, source, tiles, inventory_image, groups, sounds, hardness, blast_resistance) +function mcl_walls.register_wall(nodename, description, source, tiles, inventory_image, groups, sounds) local base_groups = groups if not base_groups then @@ -114,29 +112,15 @@ function mcl_walls.register_wall(nodename, description, source, tiles, inventory local main_node_groups = table.copy(base_groups) main_node_groups.deco_block = 1 - if source then - -- Default values from `source` node - if not hardness then - hardness = minetest.registered_nodes[source]._mcl_hardness - end - if not blast_resistance then - blast_resistance = minetest.registered_nodes[source]._mcl_blast_resistance - end - if not sounds then - sounds = minetest.registered_nodes[source].sounds - end - if not tiles then - if minetest.registered_nodes[source] then - tiles = minetest.registered_nodes[source].tiles - end - end - else - -- Fallback in case no `source` given - if not hardness then - hardness = 2 - end - if not blast_resistance then - blast_resistance = 6 + -- TODO: Stop hardcoding blast resistance + + if not sounds then + sounds = mcl_sounds.node_sound_stone_defaults() + end + + if (not tiles) and source then + if minetest.registered_nodes[source] then + tiles = minetest.registered_nodes[source].tiles end end @@ -185,8 +169,8 @@ function mcl_walls.register_wall(nodename, description, source, tiles, inventory fixed = take }, sounds = sounds, - _mcl_blast_resistance = blast_resistance, - _mcl_hardness = hardness, + _mcl_blast_resistance = 6, + _mcl_hardness = 2, }) -- Add entry alias for the Help @@ -213,8 +197,8 @@ function mcl_walls.register_wall(nodename, description, source, tiles, inventory fixed = {pillar, full_blocks[1]} }, sounds = sounds, - _mcl_blast_resistance = blast_resistance, - _mcl_hardness = hardness, + _mcl_blast_resistance = 6, + _mcl_hardness = 2, }) -- Add entry alias for the Help if minetest.get_modpath("doc") then @@ -239,8 +223,8 @@ function mcl_walls.register_wall(nodename, description, source, tiles, inventory fixed = {pillar, full_blocks[2]} }, sounds = sounds, - _mcl_blast_resistance = blast_resistance, - _mcl_hardness = hardness, + _mcl_blast_resistance = 6, + _mcl_hardness = 2, }) -- Add entry alias for the Help if minetest.get_modpath("doc") then @@ -271,8 +255,8 @@ function mcl_walls.register_wall(nodename, description, source, tiles, inventory collisionbox = {-0.2, 0, -0.2, 0.2, 1.4, 0.2}, on_construct = update_wall, sounds = sounds, - _mcl_blast_resistance = blast_resistance, - _mcl_hardness = hardness, + _mcl_blast_resistance = 6, + _mcl_hardness = 2, }) if source then minetest.register_craft({ From b0b5cc1265ef396da7e3f405463c15b8e36e165e Mon Sep 17 00:00:00 2001 From: seventeenthShulker Date: Wed, 27 Sep 2023 16:15:43 +0200 Subject: [PATCH 11/15] Remaining stairs/slabs inherit properties instead of hardcoding - Fix smooth quartz attributes - Alternative recipes for (red) sandstone, quartz, purpur slabs/stairs have been added explicitly --- mods/ITEMS/mcl_nether/init.lua | 4 +- mods/ITEMS/mcl_stairs/API.md | 37 ++++++- mods/ITEMS/mcl_stairs/register.lua | 163 +++++++++++++---------------- 3 files changed, 108 insertions(+), 96 deletions(-) diff --git a/mods/ITEMS/mcl_nether/init.lua b/mods/ITEMS/mcl_nether/init.lua index b69355d5d..da0bd47f2 100644 --- a/mods/ITEMS/mcl_nether/init.lua +++ b/mods/ITEMS/mcl_nether/init.lua @@ -259,8 +259,8 @@ minetest.register_node("mcl_nether:quartz_smooth", { tiles = {"mcl_nether_quartz_block_bottom.png"}, groups = {pickaxey=1, quartz_block=1,building_block=1, material_stone=1}, sounds = mcl_sounds.node_sound_stone_defaults(), - _mcl_blast_resistance = 0.8, - _mcl_hardness = 0.8, + _mcl_blast_resistance = 6, + _mcl_hardness = 2, }) minetest.register_craftitem("mcl_nether:glowstone_dust", { diff --git a/mods/ITEMS/mcl_stairs/API.md b/mods/ITEMS/mcl_stairs/API.md index 6c91754b7..5b142d85b 100644 --- a/mods/ITEMS/mcl_stairs/API.md +++ b/mods/ITEMS/mcl_stairs/API.md @@ -11,7 +11,8 @@ mcl_stairs.register_stair_and_slab_simple("platinum", "example:platinum", "Plati ``` ## `mcl_stairs.register_stair_and_slab_simple(subname, sourcenode, desc_stair, desc_slab, double_description, corner_stair_texture_override)` -Register a simple stair and a slab. The stair and slab will inherit all attributes from `sourcenode`. The `sourcenode` is also used as the item for crafting recipes. +Register a simple stair and a slab. The stair and slab will inherit all attributes from `sourcenode`. The `sourcenode` is also used as the item for crafting recipes. If multiple nodes should craft into the same stairs/slab, see +`mcl_stairs.register_craft_stairs` or `mcl_stairs.register_craft_slab` This function is meant for simple nodes; if you need more flexibility, use one of the other functions instead. @@ -44,7 +45,7 @@ The itemstrings for the registered nodes will be of the form: ### Parameters * `subname`: Name fragment for node itemstrings (see above) -* `recipeitem`: Item for crafting recipe. Use `group:` prefix to use a group instead +* `recipeitem`: Item for crafting recipe and attribute inheritance. Do not use `group:` prefix here, alternative recipes can be registered using `mcl_stairs.register_craft_stairs(subname, recipeitem_or_group)`. * `groups`: Groups used for stair * `images`: Textures * `description`: Stair description/tooltip @@ -81,3 +82,35 @@ The itemstrings for the registered nodes will be of the form: * `double_description`: Node description/tooltip for double slab * Other parameters: Same as for `register_stair` +## `mcl_stairs.register_craft_stairs(subname, recipeitem)` +Just registers a recipe for `mcl_stairs:stair_`. +Useful if a node variant should craft the same stairs as the base node, since the above functions use the same +parameter for crafting material and attribute inheritance. +e.g. 6 Purpur Pillar -> 4 Purpur Stairs is an alternate recipe. + +Creates staircase recipes with 6 input items, both left-facing and right-facing. Outputs 4 stairs. + +The itemstring for the output node will be of the form: + +* `mcl_stairs:stair_`: Normal stair + +### Parameters +* `subname`: Name fragment for node itemstring (see above) +* `recipeitem`: Item for crafting recipe. Use `group:` prefix to use a group instead + +## `mcl_stairs.register_craft_slab(subname, recipeitem)` +Just registers a recipe for `mcl_stairs:slab_`. +Useful if a node variant should craft the same stairs as the base node, since the above functions use the same +parameter for crafting material and attribute inheritance. +e.g. 3 Quartz Pillar -> 6 Quartz Slab is an alternate recipe. + +Creates slab recipe with 3 input items in any horizontal line. Outputs 6 slabs. + +The itemstring for the output node will be of the form: + +* `mcl_stairs:slab_`: Slab + +### Parameters +* `subname`: Name fragment for node itemstring (see above) +* `recipeitem`: Item for crafting recipe. Use `group:` prefix to use a group instead + diff --git a/mods/ITEMS/mcl_stairs/register.lua b/mods/ITEMS/mcl_stairs/register.lua index 6138e692c..920d8387d 100644 --- a/mods/ITEMS/mcl_stairs/register.lua +++ b/mods/ITEMS/mcl_stairs/register.lua @@ -1,10 +1,39 @@ -- Register all Minecraft stairs and slabs --- Note about hardness: For some reason, the hardness of slabs and stairs don't always match nicely, so that some --- slabs actually take slightly longer to be dug than their stair counterparts. --- Note sure if it is a good idea to preserve this oddity. local S = minetest.get_translator(minetest.get_current_modname()) +-- Cut Sandstone Stairs do not exist, and register_stair_and_slab does not allow multiple recipes +-- (e.g. using group:node) if we try to copy the properties of the node at the same parameter. +-- The missing recipes can be added separately via these: +function mcl_stairs.register_craft_stairs(subname, recipeitem) + minetest.register_craft({ + output = "mcl_stairs:stair_" .. subname .. " 4", + recipe = { + {recipeitem, "", ""}, + {recipeitem, recipeitem, ""}, + {recipeitem, recipeitem, recipeitem}, + }, + }) + -- Flipped recipe + minetest.register_craft({ + output = "mcl_stairs:stair_" .. subname .. " 4", + recipe = { + {"", "", recipeitem}, + {"", recipeitem, recipeitem}, + {recipeitem, recipeitem, recipeitem}, + }, + }) +end + +function mcl_stairs.register_craft_slab(subname, recipeitem) + minetest.register_craft({ + output = "mcl_stairs:slab_" .. subname .. " 6", + recipe = { + {recipeitem, recipeitem, recipeitem}, + }, + }) +end + local woods = { { "wood", "default_wood.png", S("Oak Wood Stairs"), S("Oak Wood Slab"), S("Double Oak Wood Slab") }, { "junglewood", "default_junglewood.png", S("Jungle Wood Stairs"), S("Jungle Wood Slab"), S("Double Jungle Wood Slab") }, @@ -86,91 +115,45 @@ mcl_stairs.register_slab("diorite", "mcl_core:diorite", mcl_sounds.node_sound_stone_defaults(), 6, 2, S("Double Diorite Slab")) -mcl_stairs.register_stair("cobble", "mcl_core:cobble", - {pickaxey=1, material_stone=1}, - {"default_cobble.png"}, - S("Cobblestone Stairs"), - mcl_sounds.node_sound_stone_defaults(), 0.8, 0.8) -mcl_stairs.register_slab("cobble", "mcl_core:cobble", - {pickaxey=1, material_stone=1}, - {"default_cobble.png"}, - S("Cobblestone Slab"), - mcl_sounds.node_sound_stone_defaults(), 6, 2, - S("Double Cobblestone Slab")) - -mcl_stairs.register_stair("mossycobble", "mcl_core:mossycobble", - {pickaxey=1, material_stone=1}, - {"default_mossycobble.png"}, - S("Mossy Cobblestone Stairs"), - mcl_sounds.node_sound_stone_defaults(), 0.8, 0.8) -mcl_stairs.register_slab("mossycobble", "mcl_core:mossycobble", - {pickaxey=1, material_stone=1}, - {"default_mossycobble.png"}, - S("Mossy Cobblestone Slab"), - mcl_sounds.node_sound_stone_defaults(), 6, 2, - S("Double Mossy Cobblestone Slab")) - -mcl_stairs.register_stair("brick_block", "mcl_core:brick_block", - {pickaxey=1, material_stone=1}, - {"default_brick.png"}, - S("Brick Stairs"), - mcl_sounds.node_sound_stone_defaults(), 0.8, 0.8) -mcl_stairs.register_slab("brick_block", "mcl_core:brick_block", - {pickaxey=1, material_stone=1}, - {"default_brick.png"}, - S("Brick Slab"), - mcl_sounds.node_sound_stone_defaults(), 6, 2, - S("Double Brick Slab")) - -mcl_stairs.register_stair("sandstone", "mcl_core:sandstone", +mcl_stairs.register_stair_and_slab("sandstone", "mcl_core:sandstone", {pickaxey=1, material_stone=1}, {"mcl_core_sandstone_top.png", "mcl_core_sandstone_bottom.png", "mcl_core_sandstone_normal.png"}, S("Sandstone Stairs"), - mcl_sounds.node_sound_stone_defaults(), 0.8, 0.8, - nil, "mcl_core:sandstone") --fixme: extra parameter from previous release -mcl_stairs.register_slab("sandstone", "mcl_core:sandstone", - {pickaxey=1, material_stone=1}, - {"mcl_core_sandstone_top.png", "mcl_core_sandstone_bottom.png", "mcl_core_sandstone_normal.png"}, S("Sandstone Slab"), - mcl_sounds.node_sound_stone_defaults(), 6, 2, - S("Double Sandstone Slab"), "mcl_core:sandstone") --fixme: extra parameter from previous release + mcl_sounds.node_sound_stone_defaults(), nil, nil, + S("Double Sandstone Slab")) +mcl_stairs.register_craft_stairs("sandstone", "mcl_core:sandstonesmooth") -- Comment this line out if Cut Sandstone Stairs are implemented +mcl_stairs.register_craft_stairs("sandstone", "mcl_core:sandstonecarved") +mcl_stairs.register_craft_slab("sandstone", "mcl_core:sandstonecarved") -mcl_stairs.register_stair("sandstonesmooth2", "mcl_core:sandstonesmooth2", - {pickaxey=1, material_stone=1}, - {"mcl_core_sandstone_top.png"}, - S("Smooth Sandstone Stairs"), - mcl_sounds.node_sound_stone_defaults(), 0.8, 0.8) -mcl_stairs.register_slab("sandstonesmooth2", "mcl_core:sandstonesmooth2", - {pickaxey=1, material_stone=1}, - {"mcl_core_sandstone_top.png"}, - S("Smooth Sandstone Slab"), - mcl_sounds.node_sound_stone_defaults(), 6, 2, - S("Double Smooth Sandstone Slab")) +-- mcl_stairs.register_stair_and_slab("sandstonesmooth", "mcl_core:sandstonesmooth", +-- {pickaxey=1, material_stone=1}, +-- {"mcl_core_sandstone_top.png", "mcl_core_sandstone_bottom.png", "mcl_core_sandstone_smooth.png"}, +-- S("Cut Sandstone Stairs"), S("Cut Sandstone Slab"), +-- mcl_sounds.node_sound_stone_defaults(), nil, nil, +-- S("Double Cut Sandstone Slab")) -mcl_stairs.register_stair("redsandstone", "mcl_core:redsandstone", +mcl_stairs.register_stair_and_slab_simple("sandstonesmooth2", "mcl_core:sandstonesmooth2", S("Smooth Sandstone Stairs"), S("Smooth Sandstone Slab"), S("Double Smooth Sandstone Slab")) + +mcl_stairs.register_stair_and_slab("redsandstone", "mcl_core:redsandstone", {pickaxey=1, material_stone=1}, {"mcl_core_red_sandstone_top.png", "mcl_core_red_sandstone_bottom.png", "mcl_core_red_sandstone_normal.png"}, S("Red Sandstone Stairs"), - mcl_sounds.node_sound_stone_defaults(), 0.8, 0.8, - nil, "mcl_core:redsandstone") --fixme: extra parameter from previous release -mcl_stairs.register_slab("redsandstone", "mcl_core:redsandstone", - {pickaxey=1, material_stone=1}, - {"mcl_core_red_sandstone_top.png", "mcl_core_red_sandstone_bottom.png", "mcl_core_red_sandstone_normal.png"}, S("Red Sandstone Slab"), - mcl_sounds.node_sound_stone_defaults(), 6, 2, - S("Double Red Sandstone Slab"), "mcl_core:redsandstone") --fixme: extra parameter from previous release + mcl_sounds.node_sound_stone_defaults(), nil, nil, + S("Double Red Sandstone Slab")) +mcl_stairs.register_craft_stairs("redsandstone", "mcl_core:redsandstonesmooth") -- Comment this line out if Cut Red Sandstone Stairs are implemented +mcl_stairs.register_craft_stairs("redsandstone", "mcl_core:redsandstonecarved") +mcl_stairs.register_craft_slab("redsandstone", "mcl_core:redsandstonecarved") -mcl_stairs.register_stair("redsandstonesmooth2", "mcl_core:redsandstonesmooth2", - {pickaxey=1, material_stone=1}, - {"mcl_core_red_sandstone_top.png"}, - S("Smooth Red Sandstone Stairs"), - mcl_sounds.node_sound_stone_defaults(), 0.8, 0.8) -mcl_stairs.register_slab("redsandstonesmooth2", "mcl_core:redsandstonesmooth2", - {pickaxey=1, material_stone=1}, - {"mcl_core_red_sandstone_top.png"}, - S("Smooth Red Sandstone Slab"), - mcl_sounds.node_sound_stone_defaults(), 6, 2, - S("Double Smooth Red Sandstone Slab")) +-- mcl_stairs.register_stair_and_slab("redsandstonesmooth", "mcl_core:redsandstonesmooth", +-- {pickaxey=1, material_stone=1}, +-- {"mcl_core_red_sandstone_top.png", "mcl_core_red_sandstone_bottom.png", "mcl_core_red_sandstone_smooth.png"}, +-- S("Cut Red Sandstone Stairs"), S("Cut Red Sandstone Slab"), +-- mcl_sounds.node_sound_stone_defaults(), nil, nil, +-- S("Double Cut Red Sandstone Slab")) + +mcl_stairs.register_stair_and_slab_simple("redsandstonesmooth2", "mcl_core:redsandstonesmooth2", S("Smooth Red Sandstone Stairs"), S("Smooth Red Sandstone Slab"), S("Double Smooth Red Sandstone Slab")) -- Intentionally not group:stonebrick because of mclx_stairs mcl_stairs.register_stair("stonebrick", "mcl_core:stonebrick", @@ -186,18 +169,17 @@ mcl_stairs.register_slab("stonebrick", "mcl_core:stonebrick", mcl_sounds.node_sound_stone_defaults(), nil, nil, S("Double Stone Bricks Slab")) -mcl_stairs.register_stair("quartzblock", "mcl_nether:quartz_block", +mcl_stairs.register_stair_and_slab("quartzblock", "mcl_nether:quartz_block", {pickaxey=1, material_stone=1}, {"mcl_nether_quartz_block_top.png", "mcl_nether_quartz_block_bottom.png", "mcl_nether_quartz_block_side.png"}, S("Quartz Stairs"), - mcl_sounds.node_sound_stone_defaults(), 0.8, 0.8, - nil, "mcl_nether:quartz_block") --fixme: extra parameter from previous release -mcl_stairs.register_slab("quartzblock", "mcl_nether:quartz_block", - {pickaxey=1, material_stone=1}, - {"mcl_nether_quartz_block_top.png", "mcl_nether_quartz_block_bottom.png", "mcl_nether_quartz_block_side.png"}, S("Quartz Slab"), - mcl_sounds.node_sound_stone_defaults(), 6, 2, - S("Double Quartz Slab"), "mcl_nether:quartz_block") --fixme: extra parameter from previous release + mcl_sounds.node_sound_stone_defaults(), nil, nil, + S("Double Quartz Slab")) +mcl_stairs.register_craft_stairs("quartzblock", "mcl_nether:quartz_pillar") +mcl_stairs.register_craft_stairs("quartzblock", "mcl_nether:quartz_chiseled") +mcl_stairs.register_craft_slab("quartzblock", "mcl_nether:quartz_pillar") +mcl_stairs.register_craft_slab("quartzblock", "mcl_nether:quartz_chiseled") mcl_stairs.register_stair("quartz_smooth", "mcl_nether:quartz_smooth", {pickaxey=1, material_stone=1}, @@ -234,18 +216,15 @@ mcl_stairs.register_stair_and_slab("end_bricks", "mcl_end:end_bricks", mcl_sounds.node_sound_stone_defaults(), 6, 2, S("Double End Stone Brick Slab"), nil) -mcl_stairs.register_stair("purpur_block", "mcl_end:purpur_block", +mcl_stairs.register_stair_and_slab("purpur_block", "mcl_end:purpur_block", {pickaxey=1, material_stone=1}, {"mcl_end_purpur_block.png"}, S("Purpur Stairs"), - mcl_sounds.node_sound_stone_defaults(), 6, 1.5, - nil) -mcl_stairs.register_slab("purpur_block", "mcl_end:purpur_block", - {pickaxey=1, material_stone=1}, - {"mcl_end_purpur_block.png"}, S("Purpur Slab"), - mcl_sounds.node_sound_stone_defaults(), 6, 2, + mcl_sounds.node_sound_stone_defaults(), nil, nil, S("Double Purpur Slab")) +mcl_stairs.register_craft_stairs("purpur_block", "mcl_end:purpur_pillar") +mcl_stairs.register_craft_slab("purpur_block", "mcl_end:purpur_pillar") mcl_stairs.register_stair("prismarine", "mcl_ocean:prismarine", {pickaxey=1, material_stone=1}, From b79a19f4d61191a5cdb9d11ba4164e8f28d20145 Mon Sep 17 00:00:00 2001 From: seventeenthShulker Date: Sun, 9 Jun 2024 22:38:20 +0100 Subject: [PATCH 12/15] Add crimson/warped planks (_hyphae_wood) blast res Relates to (#4414) --- mods/ITEMS/mcl_crimson/init.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mods/ITEMS/mcl_crimson/init.lua b/mods/ITEMS/mcl_crimson/init.lua index 60263017d..9ec326a3c 100644 --- a/mods/ITEMS/mcl_crimson/init.lua +++ b/mods/ITEMS/mcl_crimson/init.lua @@ -463,6 +463,7 @@ minetest.register_node("mcl_crimson:warped_hyphae_wood", { tiles = {"mcl_crimson_warped_hyphae_wood.png"}, groups = {handy = 5,axey = 1, wood=1,building_block = 1, material_wood = 1}, sounds = mcl_sounds.node_sound_wood_defaults(), + _mcl_blast_resistance = 3, _mcl_hardness = 2, }) @@ -660,6 +661,7 @@ minetest.register_node("mcl_crimson:crimson_hyphae_wood", { tiles = {"mcl_crimson_crimson_hyphae_wood.png"}, groups = {handy = 5, axey = 1, wood = 1, building_block = 1, material_wood = 1}, sounds = mcl_sounds.node_sound_wood_defaults(), + _mcl_blast_resistance = 3, _mcl_hardness = 2, }) From b3087118fa8152411865702fc5dc4fa071030f33 Mon Sep 17 00:00:00 2001 From: seventeenthShulker Date: Sun, 9 Jun 2024 22:46:57 +0100 Subject: [PATCH 13/15] Fix Gilded Blackstone blast res. (now 6) --- mods/ITEMS/mcl_blackstone/init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mods/ITEMS/mcl_blackstone/init.lua b/mods/ITEMS/mcl_blackstone/init.lua index c8dafbe6c..fdc9e7d4e 100644 --- a/mods/ITEMS/mcl_blackstone/init.lua +++ b/mods/ITEMS/mcl_blackstone/init.lua @@ -33,7 +33,7 @@ minetest.register_node("mcl_blackstone:blackstone_gilded", { {items = {"mcl_blackstone:blackstone_gilded"}, rarity = 1}, } }, - _mcl_blast_resistance = 2, + _mcl_blast_resistance = 6, _mcl_hardness = 1.5, _mcl_silk_touch_drop = true, _mcl_fortune_drop = { From 8b9666137dd55c57dd85bb7b815ec95c97f54817 Mon Sep 17 00:00:00 2001 From: seventeenthShulker Date: Sat, 16 Sep 2023 22:57:15 +0200 Subject: [PATCH 14/15] All wood-type and nether-type fences now match material's blast resistance --- mods/ITEMS/mcl_bamboo/bamboo_items.lua | 21 +++++++++++++++++---- mods/ITEMS/mcl_cherry_blossom/nodes.lua | 13 ++++++++++--- mods/ITEMS/mcl_fences/init.lua | 21 +++++++++++++++++++-- 3 files changed, 46 insertions(+), 9 deletions(-) diff --git a/mods/ITEMS/mcl_bamboo/bamboo_items.lua b/mods/ITEMS/mcl_bamboo/bamboo_items.lua index 6ad8e4f58..a7a28257e 100644 --- a/mods/ITEMS/mcl_bamboo/bamboo_items.lua +++ b/mods/ITEMS/mcl_bamboo/bamboo_items.lua @@ -192,10 +192,23 @@ if minetest.get_modpath("mcl_fences") then local wood_groups = { handy = 1, axey = 1, flammable = 2, fence_wood = 1, fire_encouragement = 5, fire_flammability = 20 } local wood_connect = { "group:fence_wood" } - local fence_id = mcl_fences.register_fence(id, S("Bamboo Fence"), "mcl_bamboo_fence_bamboo.png", wood_groups, - 2, 15, wood_connect, node_sound) - local gate_id = mcl_fences.register_fence_gate(id, S("Bamboo Fence Gate"), "mcl_bamboo_fence_gate_bamboo.png", - wood_groups, 2, 15, node_sound) -- note: about missing params.. will use defaults. + local fence_id = mcl_fences.register_fence( + id, + S("Bamboo Fence"), + "mcl_bamboo_fence_bamboo.png", + wood_groups, + minetest.registered_nodes["mcl_core:wood"]._mcl_hardness, + minetest.registered_nodes["mcl_core:wood"]._mcl_blast_resistance, + wood_connect, node_sound) + + local gate_id = mcl_fences.register_fence_gate( + id, + S("Bamboo Fence Gate"), + "mcl_bamboo_fence_gate_bamboo.png", + wood_groups, + minetest.registered_nodes["mcl_core:wood"]._mcl_hardness, + minetest.registered_nodes["mcl_core:wood"]._mcl_blast_resistance, + node_sound) -- note: about missing params.. will use defaults. mcl_bamboo.mcl_log(dump(fence_id)) mcl_bamboo.mcl_log(dump(gate_id)) diff --git a/mods/ITEMS/mcl_cherry_blossom/nodes.lua b/mods/ITEMS/mcl_cherry_blossom/nodes.lua index 6e13cacd9..84d1a8a1b 100644 --- a/mods/ITEMS/mcl_cherry_blossom/nodes.lua +++ b/mods/ITEMS/mcl_cherry_blossom/nodes.lua @@ -66,9 +66,16 @@ mcl_signs.register_sign_custom("mcl_cherry_blossom", "_cherrywood", "mcl_cherry_blossom_sign_inv.png", "mcl_cherry_blossom_sign_inv.png", S("Cherry Sign")) -- Fences & Gates -mcl_fences.register_fence_and_fence_gate("cherry_fence", S("Cherry Fence"), S("Cherry Gate"), - "mcl_cherry_blossom_planks.png", {handy=1, axey=1, flammable=2, fence_wood=1, fire_encouragement=5, fire_flammability=20}, 2, 15, - {"group:fence_wood"}, mcl_sounds.node_sound_wood_defaults()) +mcl_fences.register_fence_and_fence_gate( + "cherry_fence", + S("Cherry Fence"), + S("Cherry Gate"), + "mcl_cherry_blossom_planks.png", + {handy=1, axey=1, flammable=2, fence_wood=1, fire_encouragement=5, fire_flammability=20}, + minetest.registered_nodes["mcl_core:wood"]._mcl_hardness, + minetest.registered_nodes["mcl_core:wood"]._mcl_blast_resistance, + {"group:fence_wood"}, + mcl_sounds.node_sound_wood_defaults()) -- Redstone mesecon.register_pressure_plate( diff --git a/mods/ITEMS/mcl_fences/init.lua b/mods/ITEMS/mcl_fences/init.lua index b14d103d2..5555fbfc0 100644 --- a/mods/ITEMS/mcl_fences/init.lua +++ b/mods/ITEMS/mcl_fences/init.lua @@ -269,7 +269,16 @@ for w=1, #woods do id = wood[1].."_fence" id_gate = wood[1].."_fence_gate" end - mcl_fences.register_fence_and_fence_gate(id, wood[2], wood[3], wood[4], wood_groups, 2, 15, wood_connect, wood_sounds) + mcl_fences.register_fence_and_fence_gate( + id, + wood[2], + wood[3], + wood[4], + wood_groups, + minetest.registered_nodes["mcl_core:wood"]._mcl_hardness, + minetest.registered_nodes["mcl_core:wood"]._mcl_blast_resistance, + wood_connect, + wood_sounds) minetest.register_craft({ output = "mcl_fences:"..id.." 3", @@ -289,7 +298,15 @@ end -- Nether Brick Fence (without fence gate!) -mcl_fences.register_fence("nether_brick_fence", S("Nether Brick Fence"), "mcl_fences_fence_nether_brick.png", {pickaxey=1, deco_block=1, fence_nether_brick=1}, 2, 30, {"group:fence_nether_brick"}, mcl_sounds.node_sound_stone_defaults()) +mcl_fences.register_fence( + "nether_brick_fence", + S("Nether Brick Fence"), + "mcl_fences_fence_nether_brick.png", + {pickaxey=1, deco_block=1, fence_nether_brick=1}, + minetest.registered_nodes["mcl_nether:nether_brick"]._mcl_hardness, + minetest.registered_nodes["mcl_nether:nether_brick"]._mcl_blast_resistance, + {"group:fence_nether_brick"}, + mcl_sounds.node_sound_stone_defaults()) minetest.register_craft({ output = "mcl_fences:nether_brick_fence 6", From f8fcd9954ffd2576134dd2e5dc4322478d0f6b46 Mon Sep 17 00:00:00 2001 From: seventeenthShulker Date: Sat, 3 Aug 2024 20:26:39 +0200 Subject: [PATCH 15/15] Add back *some* changes that I reverted; and fix typo "Cherry Gate" --- mods/ITEMS/mcl_bamboo/bamboo_items.lua | 2 +- .../locale/mcl_cherry_blossom.fr.tr | 2 +- .../locale/mcl_cherry_blossom.pt_BR.tr | 2 +- .../locale/mcl_cherry_blossom.ru.tr | 2 +- .../mcl_cherry_blossom/locale/template.txt | 2 +- mods/ITEMS/mcl_cherry_blossom/nodes.lua | 2 +- mods/ITEMS/mcl_ocean/prismarine.lua | 4 +- mods/ITEMS/mcl_walls/API.md | 4 +- mods/ITEMS/mcl_walls/init.lua | 52 ++++++++++++------- 9 files changed, 45 insertions(+), 27 deletions(-) diff --git a/mods/ITEMS/mcl_bamboo/bamboo_items.lua b/mods/ITEMS/mcl_bamboo/bamboo_items.lua index a7a28257e..83f26b340 100644 --- a/mods/ITEMS/mcl_bamboo/bamboo_items.lua +++ b/mods/ITEMS/mcl_bamboo/bamboo_items.lua @@ -208,7 +208,7 @@ if minetest.get_modpath("mcl_fences") then wood_groups, minetest.registered_nodes["mcl_core:wood"]._mcl_hardness, minetest.registered_nodes["mcl_core:wood"]._mcl_blast_resistance, - node_sound) -- note: about missing params.. will use defaults. + node_sound) mcl_bamboo.mcl_log(dump(fence_id)) mcl_bamboo.mcl_log(dump(gate_id)) diff --git a/mods/ITEMS/mcl_cherry_blossom/locale/mcl_cherry_blossom.fr.tr b/mods/ITEMS/mcl_cherry_blossom/locale/mcl_cherry_blossom.fr.tr index 2f6b7db22..7cc9bd47c 100644 --- a/mods/ITEMS/mcl_cherry_blossom/locale/mcl_cherry_blossom.fr.tr +++ b/mods/ITEMS/mcl_cherry_blossom/locale/mcl_cherry_blossom.fr.tr @@ -19,6 +19,6 @@ Cherry Slab=Dalle en cerisier Double Cherry Slab=Double Dalle en cerisier Cherry Sign=Panneau de cerisier Cherry Fence=Barrière en cerisier -Cherry Gate=Portillion en cerisier +Cherry Fence Gate=Portillion en cerisier Cherry Pressure Plate=Plaque de pression en cerisier Cherry Button=Bouton de Cerisier diff --git a/mods/ITEMS/mcl_cherry_blossom/locale/mcl_cherry_blossom.pt_BR.tr b/mods/ITEMS/mcl_cherry_blossom/locale/mcl_cherry_blossom.pt_BR.tr index e3dc6d2fd..1cbe31bd2 100644 --- a/mods/ITEMS/mcl_cherry_blossom/locale/mcl_cherry_blossom.pt_BR.tr +++ b/mods/ITEMS/mcl_cherry_blossom/locale/mcl_cherry_blossom.pt_BR.tr @@ -19,6 +19,6 @@ Cherry Slab=Laje de Cerejeira Double Cherry Slab=Laje Dupla de Cerejeira Cherry Sign=Placa de Cerejeira Cherry Fence=Cerca de Cerejeira -Cherry Gate=Portão de Cerejeira +Cherry Fence Gate=Portão de Cerejeira Cherry Pressure Plate=Placa de Pressão de Cerejeira Cherry Button=Botão de Cerejeira diff --git a/mods/ITEMS/mcl_cherry_blossom/locale/mcl_cherry_blossom.ru.tr b/mods/ITEMS/mcl_cherry_blossom/locale/mcl_cherry_blossom.ru.tr index 1dc530f7a..9959561d2 100644 --- a/mods/ITEMS/mcl_cherry_blossom/locale/mcl_cherry_blossom.ru.tr +++ b/mods/ITEMS/mcl_cherry_blossom/locale/mcl_cherry_blossom.ru.tr @@ -19,6 +19,6 @@ Cherry Slab=Вишнёвая плита Double Cherry Slab=Двойная вишнёвая плита Cherry Sign=Вишнёвая табличка Cherry Fence=Вишнёвый забор -Cherry Gate=Вишнёвая калитка +Cherry Fence Gate=Вишнёвая калитка Cherry Pressure Plate=Вишнёвая нажимная плита Cherry Button=Вишнёвая кнопка diff --git a/mods/ITEMS/mcl_cherry_blossom/locale/template.txt b/mods/ITEMS/mcl_cherry_blossom/locale/template.txt index 39ba7026a..a1aee1194 100644 --- a/mods/ITEMS/mcl_cherry_blossom/locale/template.txt +++ b/mods/ITEMS/mcl_cherry_blossom/locale/template.txt @@ -19,6 +19,6 @@ Cherry Slab= Double Cherry Slab= Cherry Sign= Cherry Fence= -Cherry Gate= +Cherry Fence Gate= Cherry Pressure Plate= Cherry Button= diff --git a/mods/ITEMS/mcl_cherry_blossom/nodes.lua b/mods/ITEMS/mcl_cherry_blossom/nodes.lua index 84d1a8a1b..5b9e0ce49 100644 --- a/mods/ITEMS/mcl_cherry_blossom/nodes.lua +++ b/mods/ITEMS/mcl_cherry_blossom/nodes.lua @@ -69,7 +69,7 @@ mcl_signs.register_sign_custom("mcl_cherry_blossom", "_cherrywood", mcl_fences.register_fence_and_fence_gate( "cherry_fence", S("Cherry Fence"), - S("Cherry Gate"), + S("Cherry Fence Gate"), "mcl_cherry_blossom_planks.png", {handy=1, axey=1, flammable=2, fence_wood=1, fire_encouragement=5, fire_flammability=20}, minetest.registered_nodes["mcl_core:wood"]._mcl_hardness, diff --git a/mods/ITEMS/mcl_ocean/prismarine.lua b/mods/ITEMS/mcl_ocean/prismarine.lua index 32d17538d..fff07cb7e 100644 --- a/mods/ITEMS/mcl_ocean/prismarine.lua +++ b/mods/ITEMS/mcl_ocean/prismarine.lua @@ -52,7 +52,7 @@ minetest.register_node("mcl_ocean:prismarine_brick", { tiles = {"mcl_ocean_prismarine_bricks.png"}, groups = {pickaxey=1, building_block=1, material_stone=1}, sounds = mcl_sounds.node_sound_stone_defaults(), - _mcl_blast_resistance = 1.5, + _mcl_blast_resistance = 6, _mcl_hardness = 1.5, }) @@ -64,7 +64,7 @@ minetest.register_node("mcl_ocean:prismarine_dark", { tiles = {"mcl_ocean_prismarine_dark.png"}, groups = {pickaxey=1, building_block=1, material_stone=1}, sounds = mcl_sounds.node_sound_stone_defaults(), - _mcl_blast_resistance = 1.5, + _mcl_blast_resistance = 6, _mcl_hardness = 1.5, }) diff --git a/mods/ITEMS/mcl_walls/API.md b/mods/ITEMS/mcl_walls/API.md index 8adf6e8b4..63621ade1 100644 --- a/mods/ITEMS/mcl_walls/API.md +++ b/mods/ITEMS/mcl_walls/API.md @@ -2,7 +2,7 @@ This API allows you to add more walls (like the cobblestone wall) to VoxeLibre. -## `mcl_walls.register_wall(nodename, description, craft_material, tiles, invtex, groups, sounds)` +## `mcl_walls.register_wall(nodename, description, craft_material, tiles, invtex, groups, sounds, hardness, blast_resistance)` Adds a new wall type. This is optimized for stone-based walls, but other materials are theoretically possible, too. @@ -25,6 +25,8 @@ If `craft_material` is not `nil` it also adds a crafting recipe of the following * `inventory_image`: Inventory image (optional if `source` is set) * `groups`: Base group memberships (optional, default is `{pickaxey=1}`) * `sounds`: Sound table (optional, by default default uses stone sounds) +* `hardness`: Hardness of node (optional, default matches `source` node or fallback value 2) +* `blast_resistance`: Blast resistance of node (optional, default matches `source` node or fallback value 6) The following groups will automatically be added to the nodes (where applicable), you do not need to add them to the `groups` table: diff --git a/mods/ITEMS/mcl_walls/init.lua b/mods/ITEMS/mcl_walls/init.lua index 57212e7dd..09a35b549 100644 --- a/mods/ITEMS/mcl_walls/init.lua +++ b/mods/ITEMS/mcl_walls/init.lua @@ -97,8 +97,10 @@ local full_blocks = { * inventory_image: Inventory image (optional) * groups: Base group memberships (optional, default is {pickaxey=1}) * sounds: Sound table (optional, default is stone) +* hardness: Hardness of node (optional, default matches `source` node or fallback value 2) +* blast_resistance: Blast resistance of node (optional, default matches `source` node or fallback value 6) ]] -function mcl_walls.register_wall(nodename, description, source, tiles, inventory_image, groups, sounds) +function mcl_walls.register_wall(nodename, description, source, tiles, inventory_image, groups, sounds, hardness, blast_resistance) local base_groups = groups if not base_groups then @@ -112,15 +114,29 @@ function mcl_walls.register_wall(nodename, description, source, tiles, inventory local main_node_groups = table.copy(base_groups) main_node_groups.deco_block = 1 - -- TODO: Stop hardcoding blast resistance - - if not sounds then - sounds = mcl_sounds.node_sound_stone_defaults() - end - - if (not tiles) and source then - if minetest.registered_nodes[source] then - tiles = minetest.registered_nodes[source].tiles + if source then + -- Default values from `source` node + if not hardness then + hardness = minetest.registered_nodes[source]._mcl_hardness + end + if not blast_resistance then + blast_resistance = minetest.registered_nodes[source]._mcl_blast_resistance + end + if not sounds then + sounds = minetest.registered_nodes[source].sounds + end + if not tiles then + if minetest.registered_nodes[source] then + tiles = minetest.registered_nodes[source].tiles + end + end + else + -- Fallback in case no `source` given + if not hardness then + hardness = 2 + end + if not blast_resistance then + blast_resistance = 6 end end @@ -169,8 +185,8 @@ function mcl_walls.register_wall(nodename, description, source, tiles, inventory fixed = take }, sounds = sounds, - _mcl_blast_resistance = 6, - _mcl_hardness = 2, + _mcl_blast_resistance = blast_resistance, + _mcl_hardness = hardness, }) -- Add entry alias for the Help @@ -197,8 +213,8 @@ function mcl_walls.register_wall(nodename, description, source, tiles, inventory fixed = {pillar, full_blocks[1]} }, sounds = sounds, - _mcl_blast_resistance = 6, - _mcl_hardness = 2, + _mcl_blast_resistance = blast_resistance, + _mcl_hardness = hardness, }) -- Add entry alias for the Help if minetest.get_modpath("doc") then @@ -223,8 +239,8 @@ function mcl_walls.register_wall(nodename, description, source, tiles, inventory fixed = {pillar, full_blocks[2]} }, sounds = sounds, - _mcl_blast_resistance = 6, - _mcl_hardness = 2, + _mcl_blast_resistance = blast_resistance, + _mcl_hardness = hardness, }) -- Add entry alias for the Help if minetest.get_modpath("doc") then @@ -255,8 +271,8 @@ function mcl_walls.register_wall(nodename, description, source, tiles, inventory collisionbox = {-0.2, 0, -0.2, 0.2, 1.4, 0.2}, on_construct = update_wall, sounds = sounds, - _mcl_blast_resistance = 6, - _mcl_hardness = 2, + _mcl_blast_resistance = blast_resistance, + _mcl_hardness = hardness, }) if source then minetest.register_craft({