1
0
Fork 0

Compare commits

...

9 Commits

Author SHA1 Message Date
seventeenthShulker 98ca66bf09 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
2023-09-19 23:26:32 +02:00
seventeenthShulker 105c3648f8 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)
2023-09-19 22:02:13 +02:00
seventeenthShulker 728db96eae Fix several hardness and blast resistance values 2023-09-19 21:57:49 +02:00
seventeenthShulker dfd9562eb1 Un-hardcode most slabs and stairs 2023-09-19 18:35:39 +02:00
seventeenthShulker 58d2f59192 Forgot about blackstone 2023-09-17 17:11:35 +02:00
seventeenthShulker e8944cc145 Walls use `source` parameter for default hardness and blast resistance
If no `source` given, fallbacks are 2 and 6 respectively
2023-09-17 16:14:36 +02:00
seventeenthShulker 6125d625bc Fix prismarine bricks and dark variant blast res.
Should be 6 like regular prismarine
2023-09-17 13:49:00 +02:00
seventeenthShulker 26e8737031 Un-hardcode blast resistance, hardness for walls,
now only based on their material
2023-09-17 13:47:18 +02:00
seventeenthShulker a1e20f2916 All wood-type and nether-type fences now match material's blast resistance 2023-09-16 22:57:15 +02:00
28 changed files with 218 additions and 153 deletions

View File

@ -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 = {

View File

@ -217,7 +217,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"})
@ -254,7 +254,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,
})
@ -325,7 +325,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"})
@ -362,7 +362,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,
})
@ -448,7 +448,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"})
@ -486,7 +486,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,
})
@ -555,7 +555,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"})
@ -593,7 +593,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,
})
@ -679,7 +679,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"})
@ -717,7 +717,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,
})
@ -781,7 +781,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"})
@ -819,7 +819,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,
})

View File

@ -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 = {
@ -272,7 +272,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 = function(itemstack, placer, pointed_thing)

View File

@ -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))

View File

@ -237,7 +237,7 @@ function mcl_beds.register_bed(name, def)
-- FIXME: Should be bouncy=66, but this would be a higher bounciness than slime blocks!
groups = {handy = 1, flammable = -1, bed = 2, dig_by_piston=1, bouncy=33, 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 = def.recipe and name or "",
selection_box = common_box,

View File

@ -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,
@ -199,7 +199,10 @@ mcl_stairs.register_stair_and_slab_simple("blackstone_chiseled_polished", "mcl_b
mcl_stairs.register_stair_and_slab_simple("blackstone_brick_polished", "mcl_blackstone:blackstone_brick_polished", S("Polished Blackstone Brick Stair"), S("Polished Blackstone Brick Slab"), S("Double Polished Blackstone Brick Slab"))
--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

View File

@ -416,8 +416,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,
@ -489,8 +489,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,
@ -561,8 +561,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,
@ -628,8 +628,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,
@ -705,8 +705,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,
@ -778,8 +778,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,
@ -851,8 +851,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,
@ -931,8 +931,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,

View File

@ -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
@ -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(

View File

@ -1164,7 +1164,7 @@ minetest.register_node("mcl_chests:ender_chest_small", {
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 = simple_rotate,
@ -1466,7 +1466,7 @@ for color, desc in pairs(boxtypes) do
return 0
end
end,
_mcl_blast_resistance = 6,
_mcl_blast_resistance = 2,
_mcl_hardness = 2,
})

View File

@ -158,7 +158,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,
})

View File

@ -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()
})

View File

@ -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")

View File

@ -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", {
@ -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,
})
---
@ -1119,8 +1119,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,
})

View File

@ -175,8 +175,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", {
@ -250,8 +249,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", {

View File

@ -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", {
@ -218,7 +218,10 @@ 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

View File

@ -229,7 +229,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,
})
@ -307,7 +307,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,
})

View File

@ -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,
})

View File

@ -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",

View File

@ -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 = {

View File

@ -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)

View File

@ -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({

View File

@ -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"})

View File

@ -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,
})

View File

@ -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,
})

View File

@ -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
@ -36,7 +36,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_and_slab_simple("andesite", "mcl_core:andesite", S("Andesite Stairs"), S("Andesite Slab"), S("Double Andesite Slab"))
@ -82,14 +82,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", "group:quartz_block",
{pickaxey=1, material_stone=1},
@ -111,14 +111,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_simple("end_bricks", "mcl_end:end_bricks", S("End Stone Brick Stairs"), S("End Stone Brick Slab"), S("Double End Stone Brick Slab"))
@ -147,52 +147,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"))

View File

@ -2,7 +2,7 @@
This API allows you to add more walls (like the cobblestone wall) to MineClone 2.
## `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:

View File

@ -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({

View File

@ -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 = {}