1
0
Fork 0

Compare commits

...

18 Commits

Author SHA1 Message Date
Chris Page 89730b65fb use on_destruct instead of after dig node 2023-11-06 21:58:12 +01:00
Chris Page 01c22e55fe Update readme for stonecutter 2023-11-06 21:58:12 +01:00
Chris Page 4008f8551a Add stage so smooth items can't be reverted 2023-11-06 21:58:12 +01:00
Chris Page 4df5573dce Prevent input from being a selectable option 2023-11-06 21:58:11 +01:00
Chris Page e3ab9c662b Dupe glitch fizes and remove item label 2023-11-06 21:58:11 +01:00
Chris Page 1775470120 use item groups to determine the cuttable items 2023-11-06 21:58:11 +01:00
Chris Page 1921435a52 Remove unused meta on drop items 2023-11-06 21:58:11 +01:00
Chris Page acc039d14c Remove hardcoded one element array 2023-11-06 21:58:11 +01:00
Chris Page a096aca1cc Use node group for items that can be used in the stonecutter 2023-11-06 21:58:11 +01:00
Chris Page fabb12cbf9 Only reset output if input is empty 2023-11-06 21:58:11 +01:00
Chris Page 3d0c433f24 Minor output fixes 2023-11-06 21:58:11 +01:00
Chris Page 543845bb7c Add comments and drop items when destroyed 2023-11-06 21:58:11 +01:00
Chris Page 4ba2d64748 Check if item is a slab or not 2023-11-06 21:58:11 +01:00
Chris Page 7c5584d6c5 Check if item can be made into stairs, slabs and walls 2023-11-06 21:58:11 +01:00
Chris Page d6074d7b0f begin adding check if item canbe cut 2023-11-06 21:58:11 +01:00
Chris Page 0a16ea3b1c take output from stonecutter 2023-11-06 21:58:11 +01:00
Chris Page 115f2a3782 clear formspec on taking input item 2023-11-06 21:58:11 +01:00
Chris Page 810b65c7b8 Add gui to list craft recipes for some stones 2023-11-06 21:58:11 +01:00
11 changed files with 540 additions and 135 deletions

View File

@ -12,7 +12,7 @@ minetest.register_node("mcl_blackstone:blackstone", {
tiles = {"mcl_blackstone_top.png", "mcl_blackstone_top.png", "mcl_blackstone_side.png"},
sounds = mcl_sounds.node_sound_stone_defaults(),
is_ground_content = false,
groups = {cracky = 3, pickaxey=1, material_stone=1, cobble=1},
groups = {cracky = 3, pickaxey=1, material_stone=1, cobble=1, stonecuttable=21},
_mcl_blast_resistance = 6,
_mcl_hardness = 1.5,
})
@ -73,7 +73,7 @@ minetest.register_node("mcl_blackstone:basalt_polished", {
on_place = mcl_util.rotate_axis,
on_rotate = on_rotate,
is_ground_content = false,
groups = {cracky = 3, pickaxey=1, material_stone=1},
groups = {cracky = 3, pickaxey=1, material_stone=1, stonecutter_output=19},
_mcl_blast_resistance = 4.2,
_mcl_hardness = 1.25,
})
@ -85,7 +85,7 @@ minetest.register_node("mcl_blackstone:basalt", {
on_place = mcl_util.rotate_axis,
on_rotate = on_rotate,
is_ground_content = false,
groups = {cracky = 3, pickaxey=1, material_stone=1},
groups = {cracky = 3, pickaxey=1, material_stone=1, stonecuttable=19},
_mcl_blast_resistance = 4.2,
_mcl_hardness = 1.25,
})
@ -103,7 +103,7 @@ minetest.register_node("mcl_blackstone:blackstone_polished", {
tiles = {"mcl_blackstone_polished.png"},
sounds = mcl_sounds.node_sound_stone_defaults(),
is_ground_content = false,
groups = {cracky = 3, pickaxey=1, material_stone=1},
groups = {cracky = 3, pickaxey=1, material_stone=1, stonecuttable=21, stonecutter_output=21},
_mcl_blast_resistance = 6,
_mcl_hardness = 2,
})
@ -112,7 +112,7 @@ minetest.register_node("mcl_blackstone:blackstone_chiseled_polished", {
tiles = {"mcl_blackstone_chiseled_polished.png"},
sounds = mcl_sounds.node_sound_stone_defaults(),
is_ground_content = false,
groups = {cracky = 3, pickaxey=1, material_stone=1},
groups = {cracky = 3, pickaxey=1, material_stone=1, stonecutter_output=21},
_mcl_blast_resistance = 6,
_mcl_hardness = 1.5,
})
@ -121,7 +121,7 @@ minetest.register_node("mcl_blackstone:blackstone_brick_polished", {
tiles = {"mcl_blackstone_polished_bricks.png"},
sounds = mcl_sounds.node_sound_stone_defaults(),
is_ground_content = false,
groups = {cracky = 3, pickaxey=1, material_stone=1},
groups = {cracky = 3, pickaxey=1, material_stone=1, stonecutter_output=21},
_mcl_blast_resistance = 6,
_mcl_hardness = 1.5,
})
@ -131,7 +131,7 @@ minetest.register_node("mcl_blackstone:quartz_brick", {
sounds = mcl_sounds.node_sound_stone_defaults(),
is_ground_content = false,
sounds = mcl_sounds.node_sound_stone_defaults(),
groups = {cracky = 3, pickaxey=1, material_stone=1},
groups = {cracky = 3, pickaxey=1, material_stone=1, stonecutter_output=14},
_mcl_blast_resistance = 0.8,
_mcl_hardness = 0.8,
})
@ -193,16 +193,50 @@ minetest.registered_nodes["mcl_fire:fire"].on_construct=function(pos)
end
--slabs/stairs
mcl_stairs.register_stair_and_slab_simple("blackstone", "mcl_blackstone:blackstone", S("Blackstone Stair"), S("Blackstone Slab"), S("Double Blackstone Slab"))
mcl_stairs.register_stair_and_slab_simple("blackstone_polished", "mcl_blackstone:blackstone_polished", S("Polished Blackstone Stair"), S("Polished Blackstone Slab"), S("Polished Double Blackstone Slab"))
mcl_stairs.register_stair_and_slab_simple("blackstone_chiseled_polished", "mcl_blackstone:blackstone_chiseled_polished", S("Chiseled Polished Blackstone Stair"), S("Chiseled Polished Blackstone Slab"), S("Double Chiseled Polished Blackstone Slab"))
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"))
mcl_stairs.register_stair_and_slab("blackstone", "mcl_blackstone:blackstone",
{cracky=3, pickaxey=1, material_stone=1, stonecutter_output=21},
{"mcl_blackstone_top.png", "mcl_blackstone_top.png", "mcl_blackstone_side.png"},
S("Blackstone Stairs"),
S("Blackstone Slab"),
mcl_sounds.node_sound_stone_defaults(), 6, 2,
S("Double Blackstone Slab"), nil)
mcl_stairs.register_stair_and_slab("blackstone_polished", "mcl_blackstone:blackstone_polished",
{cracky=3, pickaxey=1, material_stone=1, stonecutter_output=21},
{"mcl_blackstone_polished.png"},
S("Polished Blackstone Stairs"),
S("Polished Blackstone Slab"),
mcl_sounds.node_sound_stone_defaults(), 6, 2,
S("Double Polished Blackstone Slab"), nil)
mcl_stairs.register_stair_and_slab("blackstone_chiseled_polished", "mcl_blackstone:blackstone_chiseled_polished",
{cracky=3, pickaxey=1, material_stone=1, stonecutter_output=21},
{"mcl_blackstone_chiseled_polished.png"},
S("Chiseled Polished Blackstone Stairs"),
S("Chiseled Polished Blackstone Slab"),
mcl_sounds.node_sound_stone_defaults(), 6, 2,
S("Double Chiseled Polished Blackstone Slab"), nil)
mcl_stairs.register_stair_and_slab("blackstone_brick_polished", "mcl_blackstone:blackstone_brick_polished",
{cracky=3, pickaxey=1, material_stone=1, stonecutter_output=21},
{"mcl_blackstone_polished_bricks.png"},
S("Polished Blackstone Brick Stair Stairs"),
S("Polished Blackstone Brick Stair Slab"),
mcl_sounds.node_sound_stone_defaults(), 6, 2,
S("Double Polished Blackstone Brick Stair Slab"), nil)
--Wall
mcl_walls.register_wall(
"mcl_blackstone:wall",
S("Blackstone Wall"),
"mcl_blackstone:blackstone"
"mcl_blackstone:blackstone",
{
"mcl_blackstone_top.png",
"mcl_blackstone_top.png",
"mcl_blackstone_side.png"
},
"",
{ cracky=3, pickaxey=1, material_stone=1, stonecutter_output=21 }
)
--lavacooling

View File

@ -30,7 +30,7 @@ minetest.register_node("mcl_copper:block", {
_doc_items_longdesc = S("A block of copper is mostly a decorative block."),
tiles = {"mcl_copper_block.png"},
is_ground_content = false,
groups = {pickaxey = 2, building_block = 1, oxidizable = 1},
groups = {pickaxey = 2, building_block = 1, oxidizable = 1, stonecuttable=22},
sounds = mcl_sounds.node_sound_metal_defaults(),
_mcl_blast_resistance = 6,
_mcl_hardness = 3,
@ -43,7 +43,7 @@ minetest.register_node("mcl_copper:waxed_block", {
_doc_items_longdesc = S("A block of copper is mostly a decorative block."),
tiles = {"mcl_copper_block.png"},
is_ground_content = false,
groups = {pickaxey = 2, building_block = 1, waxed = 1},
groups = {pickaxey = 2, building_block = 1, waxed = 1, stonecuttable=23},
sounds = mcl_sounds.node_sound_metal_defaults(),
_mcl_blast_resistance = 6,
_mcl_hardness = 3,
@ -55,7 +55,7 @@ minetest.register_node("mcl_copper:block_exposed", {
_doc_items_longdesc = S("Exposed copper is a decorative block."),
tiles = {"mcl_copper_exposed.png"},
is_ground_content = false,
groups = {pickaxey = 2, building_block = 1, oxidizable = 1},
groups = {pickaxey = 2, building_block = 1, oxidizable = 1, stonecuttable=24},
sounds = mcl_sounds.node_sound_metal_defaults(),
_mcl_blast_resistance = 6,
_mcl_hardness = 5,
@ -69,7 +69,7 @@ minetest.register_node("mcl_copper:waxed_block_exposed", {
_doc_items_longdesc = S("Exposed copper is a decorative block."),
tiles = {"mcl_copper_exposed.png"},
is_ground_content = false,
groups = {pickaxey = 2, building_block = 1, waxed = 1},
groups = {pickaxey = 2, building_block = 1, waxed = 1, stonecuttable=25},
sounds = mcl_sounds.node_sound_metal_defaults(),
_mcl_blast_resistance = 6,
_mcl_hardness = 5,
@ -81,7 +81,7 @@ minetest.register_node("mcl_copper:block_weathered", {
_doc_items_longdesc = S("Weathered copper is a decorative block."),
tiles = {"mcl_copper_weathered.png"},
is_ground_content = false,
groups = {pickaxey = 2, building_block = 1, oxidizable = 1},
groups = {pickaxey = 2, building_block = 1, oxidizable = 1, stonecuttable=26},
sounds = mcl_sounds.node_sound_metal_defaults(),
_mcl_blast_resistance = 6,
_mcl_hardness = 5,
@ -95,7 +95,7 @@ minetest.register_node("mcl_copper:waxed_block_weathered", {
_doc_items_longdesc = S("Weathered copper is a decorative block."),
tiles = {"mcl_copper_weathered.png"},
is_ground_content = false,
groups = {pickaxey = 2, building_block = 1, waxed = 1},
groups = {pickaxey = 2, building_block = 1, waxed = 1, stonecuttable=27},
sounds = mcl_sounds.node_sound_metal_defaults(),
_mcl_blast_resistance = 6,
_mcl_hardness = 5,
@ -107,7 +107,7 @@ minetest.register_node("mcl_copper:block_oxidized", {
_doc_items_longdesc = S("Oxidized copper is a decorative block."),
tiles = {"mcl_copper_oxidized.png"},
is_ground_content = false,
groups = {pickaxey = 2, building_block = 1},
groups = {pickaxey = 2, building_block = 1, stonecuttable=28},
sounds = mcl_sounds.node_sound_metal_defaults(),
_mcl_blast_resistance = 6,
_mcl_hardness = 5,
@ -120,7 +120,7 @@ minetest.register_node("mcl_copper:waxed_block_oxidized", {
_doc_items_longdesc = S("Oxidized copper is a decorative block."),
tiles = {"mcl_copper_oxidized.png"},
is_ground_content = false,
groups = {pickaxey = 2, building_block = 1, waxed = 1},
groups = {pickaxey = 2, building_block = 1, waxed = 1, stonecuttable=29},
sounds = mcl_sounds.node_sound_metal_defaults(),
_mcl_blast_resistance = 6,
_mcl_hardness = 5,
@ -132,7 +132,7 @@ minetest.register_node("mcl_copper:block_cut", {
_doc_items_longdesc = S("Cut copper is a decorative block."),
tiles = {"mcl_copper_block_cut.png"},
is_ground_content = false,
groups = {pickaxey = 2, building_block = 1, oxidizable = 1},
groups = {pickaxey = 2, building_block = 1, oxidizable = 1, stonecuttable=22, stonecutter_output=22},
sounds = mcl_sounds.node_sound_metal_defaults(),
_mcl_blast_resistance = 6,
_mcl_hardness = 5,
@ -145,7 +145,7 @@ minetest.register_node("mcl_copper:waxed_block_cut", {
_doc_items_longdesc = S("Cut copper is a decorative block."),
tiles = {"mcl_copper_block_cut.png"},
is_ground_content = false,
groups = {pickaxey = 2, building_block = 1, waxed = 1},
groups = {pickaxey = 2, building_block = 1, waxed = 1, stonecuttable=23, stonecutter_output=23},
sounds = mcl_sounds.node_sound_metal_defaults(),
_mcl_blast_resistance = 6,
_mcl_hardness = 5,
@ -157,7 +157,7 @@ minetest.register_node("mcl_copper:block_exposed_cut", {
_doc_items_longdesc = S("Exposed cut copper is a decorative block."),
tiles = {"mcl_copper_exposed_cut.png"},
is_ground_content = false,
groups = {pickaxey = 2, building_block = 1, oxidizable = 1},
groups = {pickaxey = 2, building_block = 1, oxidizable = 1, stonecuttable=24, stonecutter_output=24},
sounds = mcl_sounds.node_sound_metal_defaults(),
_mcl_blast_resistance = 6,
_mcl_hardness = 5,
@ -171,7 +171,7 @@ minetest.register_node("mcl_copper:waxed_block_exposed_cut", {
_doc_items_longdesc = S("Exposed cut copper is a decorative block."),
tiles = {"mcl_copper_exposed_cut.png"},
is_ground_content = false,
groups = {pickaxey = 2, building_block = 1, waxed = 1},
groups = {pickaxey = 2, building_block = 1, waxed = 1, stonecuttable=25, stonecutter_output=25},
sounds = mcl_sounds.node_sound_metal_defaults(),
_mcl_blast_resistance = 6,
_mcl_hardness = 5,
@ -183,7 +183,7 @@ minetest.register_node("mcl_copper:block_weathered_cut", {
_doc_items_longdesc = S("Weathered cut copper is a decorative block."),
tiles = {"mcl_copper_weathered_cut.png"},
is_ground_content = false,
groups = {pickaxey = 2, building_block = 1, oxidizable = 1},
groups = {pickaxey = 2, building_block = 1, oxidizable = 1, stonecuttable=26, stonecutter_output=26},
sounds = mcl_sounds.node_sound_metal_defaults(),
_mcl_blast_resistance = 6,
_mcl_hardness = 5,
@ -197,7 +197,7 @@ minetest.register_node("mcl_copper:waxed_block_weathered_cut", {
_doc_items_longdesc = S("Weathered cut copper is a decorative block."),
tiles = {"mcl_copper_weathered_cut.png"},
is_ground_content = false,
groups = {pickaxey = 2, building_block = 1, waxed = 1},
groups = {pickaxey = 2, building_block = 1, waxed = 1, stonecuttable=27, stonecutter_output=27},
sounds = mcl_sounds.node_sound_metal_defaults(),
_mcl_blast_resistance = 6,
_mcl_hardness = 5,
@ -209,7 +209,7 @@ minetest.register_node("mcl_copper:block_oxidized_cut", {
_doc_items_longdesc = S("Oxidized cut copper is a decorative block."),
tiles = {"mcl_copper_oxidized_cut.png"},
is_ground_content = false,
groups = {pickaxey = 2, building_block = 1},
groups = {pickaxey = 2, building_block = 1, stonecuttable=28, stonecutter_output=28},
sounds = mcl_sounds.node_sound_metal_defaults(),
_mcl_blast_resistance = 6,
_mcl_hardness = 5,
@ -222,7 +222,7 @@ minetest.register_node("mcl_copper:waxed_block_oxidized_cut", {
_doc_items_longdesc = S("Oxidized cut copper is a decorative block."),
tiles = {"mcl_copper_oxidized_cut.png"},
is_ground_content = false,
groups = {pickaxey = 2, building_block = 1, waxed = 1},
groups = {pickaxey = 2, building_block = 1, waxed = 1, stonecuttable=29, stonecutter_output=29},
sounds = mcl_sounds.node_sound_metal_defaults(),
_mcl_blast_resistance = 6,
_mcl_hardness = 5,
@ -230,112 +230,112 @@ minetest.register_node("mcl_copper:waxed_block_oxidized_cut", {
})
mcl_stairs.register_slab("copper_cut", "mcl_copper:block_cut",
{pickaxey = 2, oxidizable = 1},
{pickaxey = 2, oxidizable = 1, stonecutter_output = 22},
{"mcl_copper_block_cut.png", "mcl_copper_block_cut.png", "mcl_copper_block_cut.png"},
S("Slab of Cut Copper"),
nil, nil, nil,
S("Double Slab of Cut Copper"))
mcl_stairs.register_slab("waxed_copper_cut", "mcl_copper:waxed_block_cut",
{pickaxey = 2, waxed = 1},
{pickaxey = 2, waxed = 1, stonecutter_output = 23},
{"mcl_copper_block_cut.png", "mcl_copper_block_cut.png", "mcl_copper_block_cut.png"},
S("Waxed Slab of Cut Copper"),
nil, nil, nil,
S("Waxed Double Slab of Cut Copper"))
mcl_stairs.register_slab("copper_exposed_cut", "mcl_copper:block_exposed_cut",
{pickaxey = 2, oxidizable = 1},
{pickaxey = 2, oxidizable = 1, stonecutter_output = 24},
{"mcl_copper_exposed_cut.png", "mcl_copper_exposed_cut.png", "mcl_copper_exposed_cut.png"},
S("Slab of Exposed Cut Copper"),
nil, nil, nil,
S("Double Slab of Exposed Cut Copper"))
mcl_stairs.register_slab("waxed_copper_exposed_cut", "mcl_copper:waxed_block_exposed_cut",
{pickaxey = 2, waxed = 1},
{pickaxey = 2, waxed = 1, stonecutter_output = 25},
{"mcl_copper_exposed_cut.png", "mcl_copper_exposed_cut.png", "mcl_copper_exposed_cut.png"},
S("Waxed Slab of Exposed Cut Copper"),
nil, nil, nil,
S("Waxed Double Slab of Exposed Cut Copper"))
mcl_stairs.register_slab("copper_weathered_cut", "mcl_copper:block_weathered_cut",
{pickaxey = 2, oxidizable = 1},
{pickaxey = 2, oxidizable = 1, stonecutter_output = 26},
{"mcl_copper_weathered_cut.png", "mcl_copper_weathered_cut.png", "mcl_copper_weathered_cut.png"},
S("Slab of Weathered Cut Copper"),
nil, nil, nil,
S("Double Slab of Weathered Cut Copper"))
mcl_stairs.register_slab("waxed_copper_weathered_cut", "mcl_copper:waxed_block_weathered_cut",
{pickaxey = 2, waxed = 1},
{pickaxey = 2, waxed = 1, stonecutter_output = 27},
{"mcl_copper_weathered_cut.png", "mcl_copper_weathered_cut.png", "mcl_copper_weathered_cut.png"},
S("Waxed Slab of Weathered Cut Copper"),
nil, nil, nil,
S("Waxed Double Slab of Weathered Cut Copper"))
mcl_stairs.register_slab("copper_oxidized_cut", "mcl_copper:block_oxidized_cut",
{pickaxey = 2},
{pickaxey = 2, stonecutter_output = 28},
{"mcl_copper_oxidized_cut.png", "mcl_copper_oxidized_cut.png", "mcl_copper_oxidized_cut.png"},
S("Slab of Oxidized Cut Copper"),
nil, nil, nil,
S("Double Slab of Oxidized Cut Copper"))
mcl_stairs.register_slab("waxed_copper_oxidized_cut", "mcl_copper:waxed_block_oxidized_cut",
{pickaxey = 2, waxed = 1},
{pickaxey = 2, waxed = 1, stonecutter_output = 29},
{"mcl_copper_oxidized_cut.png", "mcl_copper_oxidized_cut.png", "mcl_copper_oxidized_cut.png"},
S("Waxed Slab of Oxidized Cut Copper"),
nil, nil, nil,
S("Waxed Double Slab of Oxidized Cut Copper"))
mcl_stairs.register_stair("copper_cut", "mcl_copper:block_cut",
{pickaxey = 2, oxidizable = 1},
{pickaxey = 2, oxidizable = 1, stonecutter_output = 22},
{"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,
"woodlike")
mcl_stairs.register_stair("waxed_copper_cut", "mcl_copper:waxed_block_cut",
{pickaxey = 2, waxed = 1},
{pickaxey = 2, waxed = 1, stonecutter_output = 23},
{"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,
"woodlike")
mcl_stairs.register_stair("copper_exposed_cut", "mcl_copper:block_exposed_cut",
{pickaxey = 2, oxidizable = 1},
{pickaxey = 2, oxidizable = 1, stonecutter_output = 24},
{"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,
"woodlike")
mcl_stairs.register_stair("waxed_copper_exposed_cut", "mcl_copper:waxed_block_exposed_cut",
{pickaxey = 2, waxed = 1},
{pickaxey = 2, waxed = 1, stonecutter_output = 25},
{"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,
"woodlike")
mcl_stairs.register_stair("copper_weathered_cut", "mcl_copper:block_weathered_cut",
{pickaxey = 2, oxidizable = 1},
{pickaxey = 2, oxidizable = 1, stonecutter_output = 26},
{"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,
"woodlike")
mcl_stairs.register_stair("waxed_copper_weathered_cut", "mcl_copper:waxed_block_weathered_cut",
{pickaxey = 2, waxed = 1},
{pickaxey = 2, waxed = 1, stonecutter_output = 27},
{"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,
"woodlike")
mcl_stairs.register_stair("copper_oxidized_cut", "mcl_copper:block_oxidized_cut",
{pickaxey = 2},
{pickaxey = 2, stonecutter_output = 28},
{"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,
"woodlike")
mcl_stairs.register_stair("waxed_copper_oxidized_cut", "mcl_copper:waxed_block_oxidized_cut",
{pickaxey = 2, waxed = 1},
{pickaxey = 2, waxed = 1, stonecutter_output = 29},
{"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,

View File

@ -27,7 +27,7 @@ minetest.register_node("mcl_core:stone", {
tiles = {"default_stone.png"},
is_ground_content = true,
stack_max = 64,
groups = {pickaxey=1, stone=1, building_block=1, material_stone=1},
groups = {pickaxey=1, stone=1, building_block=1, material_stone=1, stonecuttable=1},
drop = "mcl_core:cobble",
sounds = mcl_sounds.node_sound_stone_defaults(),
_mcl_blast_resistance = 6,
@ -236,7 +236,7 @@ minetest.register_node("mcl_core:stonebrick", {
_doc_items_longdesc = doc.sub.items.temp.build,
tiles = {"default_stone_brick.png"},
stack_max = 64,
groups = {pickaxey=1, stone=1, stonebrick=1, building_block=1, material_stone=1},
groups = {pickaxey=1, stone=1, stonebrick=1, building_block=1, material_stone=1, stonecuttable=1, stonecutter_output=1, stonecutter_stage=1},
sounds = mcl_sounds.node_sound_stone_defaults(),
is_ground_content = false,
_mcl_blast_resistance = 6,
@ -248,7 +248,7 @@ minetest.register_node("mcl_core:stonebrickcarved", {
_doc_items_longdesc = doc.sub.items.temp.build,
tiles = {"mcl_core_stonebrick_carved.png"},
stack_max = 64,
groups = {pickaxey=1, stone=1, stonebrick=1, building_block=1, material_stone=1},
groups = {pickaxey=1, stone=1, stonebrick=1, building_block=1, material_stone=1, stonecutter_output=1, stonecutter_stage=1},
sounds = mcl_sounds.node_sound_stone_defaults(),
is_ground_content = false,
_mcl_blast_resistance = 6,
@ -272,7 +272,7 @@ minetest.register_node("mcl_core:stonebrickmossy", {
_doc_items_longdesc = doc.sub.items.temp.build,
tiles = {"mcl_core_stonebrick_mossy.png"},
stack_max = 64,
groups = {pickaxey=1, stone=1, stonebrick=1, building_block=1, material_stone=1},
groups = {pickaxey=1, stone=1, stonebrick=1, building_block=1, material_stone=1, stonecuttable=3},
sounds = mcl_sounds.node_sound_stone_defaults(),
is_ground_content = false,
_mcl_blast_resistance = 6,
@ -284,7 +284,7 @@ minetest.register_node("mcl_core:stone_smooth", {
_doc_items_longdesc = doc.sub.items.temp.build,
tiles = {"mcl_stairs_stone_slab_top.png"},
stack_max = 64,
groups = {pickaxey=1, stone=1, building_block=1, material_stone=1},
groups = {pickaxey=1, stone=1, building_block=1, material_stone=1, stonecuttable=1},
sounds = mcl_sounds.node_sound_stone_defaults(),
is_ground_content = false,
_mcl_blast_resistance = 6,
@ -297,7 +297,7 @@ minetest.register_node("mcl_core:granite", {
tiles = {"mcl_core_granite.png"},
is_ground_content = true,
stack_max = 64,
groups = {pickaxey=1, stone=1, building_block=1, material_stone=1},
groups = {pickaxey=1, stone=1, building_block=1, material_stone=1, stonecuttable=4},
sounds = mcl_sounds.node_sound_stone_defaults(),
_mcl_blast_resistance = 6,
_mcl_hardness = 1.5,
@ -309,7 +309,7 @@ minetest.register_node("mcl_core:granite_smooth", {
tiles = {"mcl_core_granite_smooth.png"},
stack_max = 64,
is_ground_content = false,
groups = {pickaxey=1, stone=1, building_block=1, material_stone=1},
groups = {pickaxey=1, stone=1, building_block=1, material_stone=1, stonecuttable=4, stonecutter_output=4, stonecutter_stage=1},
sounds = mcl_sounds.node_sound_stone_defaults(),
_mcl_blast_resistance = 6,
_mcl_hardness = 1.5,
@ -321,7 +321,7 @@ minetest.register_node("mcl_core:andesite", {
tiles = {"mcl_core_andesite.png"},
is_ground_content = true,
stack_max = 64,
groups = {pickaxey=1, stone=1, building_block=1, material_stone=1},
groups = {pickaxey=1, stone=1, building_block=1, material_stone=1, stonecuttable=5,},
sounds = mcl_sounds.node_sound_stone_defaults(),
_mcl_blast_resistance = 6,
_mcl_hardness = 1.5,
@ -333,7 +333,7 @@ minetest.register_node("mcl_core:andesite_smooth", {
tiles = {"mcl_core_andesite_smooth.png"},
is_ground_content = false,
stack_max = 64,
groups = {pickaxey=1, stone=1, building_block=1, material_stone=1},
groups = {pickaxey=1, stone=1, building_block=1, material_stone=1, stonecuttable=5, stonecutter_output=5, stonecutter_stage=1},
sounds = mcl_sounds.node_sound_stone_defaults(),
_mcl_blast_resistance = 6,
_mcl_hardness = 1.5,
@ -345,7 +345,7 @@ minetest.register_node("mcl_core:diorite", {
tiles = {"mcl_core_diorite.png"},
is_ground_content = true,
stack_max = 64,
groups = {pickaxey=1, stone=1, building_block=1, material_stone=1},
groups = {pickaxey=1, stone=1, building_block=1, material_stone=1, stonecuttable=6},
sounds = mcl_sounds.node_sound_stone_defaults(),
_mcl_blast_resistance = 6,
_mcl_hardness = 1.5,
@ -357,7 +357,7 @@ minetest.register_node("mcl_core:diorite_smooth", {
tiles = {"mcl_core_diorite_smooth.png"},
is_ground_content = false,
stack_max = 64,
groups = {pickaxey=1, stone=1, building_block=1, material_stone=1},
groups = {pickaxey=1, stone=1, building_block=1, material_stone=1, stonecuttable=6, stonecutter_output=6, stonecutter_stage=1},
sounds = mcl_sounds.node_sound_stone_defaults(),
_mcl_blast_resistance = 6,
_mcl_hardness = 1.5,
@ -586,7 +586,7 @@ minetest.register_node("mcl_core:sandstone", {
tiles = {"mcl_core_sandstone_top.png", "mcl_core_sandstone_bottom.png", "mcl_core_sandstone_normal.png"},
is_ground_content = true,
stack_max = 64,
groups = {pickaxey=1, sandstone=1, normal_sandstone=1, building_block=1, material_stone=1},
groups = {pickaxey=1, sandstone=1, normal_sandstone=1, building_block=1, material_stone=1, stonecuttable=9},
sounds = mcl_sounds.node_sound_stone_defaults(),
_mcl_blast_resistance = 0.8,
_mcl_hardness = 0.8,
@ -598,7 +598,7 @@ minetest.register_node("mcl_core:sandstonesmooth", {
tiles = {"mcl_core_sandstone_top.png", "mcl_core_sandstone_bottom.png", "mcl_core_sandstone_smooth.png"},
is_ground_content = false,
stack_max = 64,
groups = {pickaxey=1, sandstone=1, normal_sandstone=1, building_block=1, material_stone=1},
groups = {pickaxey=1, sandstone=1, normal_sandstone=1, building_block=1, material_stone=1, stonecuttable=9, stonecutter_output=9},
sounds = mcl_sounds.node_sound_stone_defaults(),
_mcl_blast_resistance = 6,
_mcl_hardness = 2,
@ -610,7 +610,7 @@ minetest.register_node("mcl_core:sandstonecarved", {
tiles = {"mcl_core_sandstone_top.png", "mcl_core_sandstone_bottom.png", "mcl_core_sandstone_carved.png"},
is_ground_content = false,
stack_max = 64,
groups = {pickaxey=1, sandstone=1, normal_sandstone=1, building_block=1, material_stone=1},
groups = {pickaxey=1, sandstone=1, normal_sandstone=1, building_block=1, material_stone=1, stonecutter_output=9},
sounds = mcl_sounds.node_sound_stone_defaults(),
_mcl_blast_resistance = 0.8,
_mcl_hardness = 0.8,
@ -623,7 +623,7 @@ minetest.register_node("mcl_core:sandstonesmooth2", {
tiles = {"mcl_core_sandstone_top.png"},
is_ground_content = false,
stack_max = 64,
groups = {pickaxey=1, sandstone=1, normal_sandstone=1, building_block=1, material_stone=1},
groups = {pickaxey=1, sandstone=1, normal_sandstone=1, building_block=1, material_stone=1, stonecuttable=9, stonecutter_output=9, stonecutter_stage=1},
sounds = mcl_sounds.node_sound_stone_defaults(),
_mcl_blast_resistance = 6,
_mcl_hardness = 2,
@ -649,7 +649,7 @@ minetest.register_node("mcl_core:redsandstone", {
tiles = {"mcl_core_red_sandstone_top.png", "mcl_core_red_sandstone_bottom.png", "mcl_core_red_sandstone_normal.png"},
is_ground_content = true,
stack_max = 64,
groups = {pickaxey=1, sandstone=1, red_sandstone=1, building_block=1, material_stone=1},
groups = {pickaxey=1, sandstone=1, red_sandstone=1, building_block=1, material_stone=1, stonecuttable=10},
sounds = mcl_sounds.node_sound_stone_defaults(),
_mcl_blast_resistance = 0.8,
_mcl_hardness = 0.8,
@ -661,7 +661,7 @@ minetest.register_node("mcl_core:redsandstonesmooth", {
tiles = {"mcl_core_red_sandstone_top.png", "mcl_core_red_sandstone_bottom.png", "mcl_core_red_sandstone_smooth.png"},
is_ground_content = false,
stack_max = 64,
groups = {pickaxey=1, sandstone=1, red_sandstone=1, building_block=1, material_stone=1},
groups = {pickaxey=1, sandstone=1, red_sandstone=1, building_block=1, material_stone=1, stonecuttable=10, stonecutter_output=10},
sounds = mcl_sounds.node_sound_stone_defaults(),
_mcl_blast_resistance = 0.8,
_mcl_hardness = 0.8,
@ -673,7 +673,7 @@ minetest.register_node("mcl_core:redsandstonecarved", {
tiles = {"mcl_core_red_sandstone_top.png", "mcl_core_red_sandstone_bottom.png", "mcl_core_red_sandstone_carved.png"},
is_ground_content = false,
stack_max = 64,
groups = {pickaxey=1, sandstone=1, red_sandstone=1, building_block=1, material_stone=1},
groups = {pickaxey=1, sandstone=1, red_sandstone=1, building_block=1, material_stone=1, stonecutter_output=10},
sounds = mcl_sounds.node_sound_stone_defaults(),
_mcl_blast_resistance = 0.8,
_mcl_hardness = 0.8,
@ -685,7 +685,7 @@ minetest.register_node("mcl_core:redsandstonesmooth2", {
tiles = {"mcl_core_red_sandstone_top.png"},
is_ground_content = false,
stack_max = 64,
groups = {pickaxey=1, sandstone=1, red_sandstone=1, building_block=1, material_stone=1},
groups = {pickaxey=1, sandstone=1, red_sandstone=1, building_block=1, material_stone=1, stonecuttable=10, stonecutter_output=10, stonecutter_stage=1},
sounds = mcl_sounds.node_sound_stone_defaults(),
_mcl_blast_resistance = 0.8,
_mcl_hardness = 0.8,
@ -715,7 +715,7 @@ minetest.register_node("mcl_core:brick_block", {
tiles = {"default_brick.png"},
is_ground_content = false,
stack_max = 64,
groups = {pickaxey=1, building_block=1, material_stone=1},
groups = {pickaxey=1, building_block=1, material_stone=1, stonecuttable=16},
sounds = mcl_sounds.node_sound_stone_defaults(),
_mcl_blast_resistance = 6,
_mcl_hardness = 2,
@ -768,7 +768,7 @@ minetest.register_node("mcl_core:cobble", {
tiles = {"default_cobble.png"},
is_ground_content = false,
stack_max = 64,
groups = {pickaxey=1, building_block=1, material_stone=1, cobble=1},
groups = {pickaxey=1, building_block=1, material_stone=1, cobble=1, stonecuttable=7},
sounds = mcl_sounds.node_sound_stone_defaults(),
_mcl_blast_resistance = 6,
_mcl_hardness = 2,
@ -780,7 +780,7 @@ minetest.register_node("mcl_core:mossycobble", {
tiles = {"default_mossycobble.png"},
is_ground_content = false,
stack_max = 64,
groups = {pickaxey=1, building_block=1, material_stone=1},
groups = {pickaxey=1, building_block=1, material_stone=1, stonecuttable=8},
sounds = mcl_sounds.node_sound_stone_defaults(),
_mcl_blast_resistance = 6,
_mcl_hardness = 2,

View File

@ -13,7 +13,7 @@ minetest.register_node("mcl_end:end_stone", {
_doc_items_longdesc = doc.sub.items.temp.build,
tiles = {"mcl_end_end_stone.png"},
stack_max = 64,
groups = {pickaxey=1, building_block=1, material_stone=1},
groups = {pickaxey=1, building_block=1, material_stone=1, stonecuttable=20},
sounds = mcl_sounds.node_sound_stone_defaults(),
after_dig_node = mcl_end.check_detach_chorus_plant,
_mcl_blast_resistance = 9,
@ -26,7 +26,7 @@ minetest.register_node("mcl_end:end_bricks", {
tiles = {"mcl_end_end_bricks.png"},
is_ground_content = false,
stack_max = 64,
groups = {pickaxey=1, building_block=1, material_stone=1},
groups = {pickaxey=1, building_block=1, material_stone=1, stonecuttable=20, stonecutter_output=20},
sounds = mcl_sounds.node_sound_stone_defaults(),
_mcl_blast_resistance = 9,
_mcl_hardness = 3,
@ -38,7 +38,7 @@ minetest.register_node("mcl_end:purpur_block", {
tiles = {"mcl_end_purpur_block.png"},
is_ground_content = false,
stack_max = 64,
groups = {pickaxey=1, building_block=1, material_stone=1, purpur_block=1},
groups = {pickaxey=1, building_block=1, material_stone=1, purpur_block=1, stonecuttable=15},
sounds = mcl_sounds.node_sound_stone_defaults(),
_mcl_blast_resistance = 6,
_mcl_hardness = 1.5,
@ -52,7 +52,7 @@ minetest.register_node("mcl_end:purpur_pillar", {
is_ground_content = false,
on_place = mcl_util.rotate_axis,
tiles = {"mcl_end_purpur_pillar_top.png", "mcl_end_purpur_pillar_top.png", "mcl_end_purpur_pillar.png"},
groups = {pickaxey=1, building_block=1, material_stone=1, purpur_block=1},
groups = {pickaxey=1, building_block=1, material_stone=1, purpur_block=1, stonecutter_output=15},
sounds = mcl_sounds.node_sound_stone_defaults(),
on_rotate = on_rotate,
_mcl_blast_resistance = 6,

View File

@ -38,7 +38,7 @@ minetest.register_node("mcl_mud:mud_bricks", {
_doc_items_longdesc = S("Decorative block crafted from packed mud."),
_doc_items_hidden = false,
tiles = {"mcl_mud_bricks.png"},
groups = {handy=1, pickaxey=1, building_block=1},
groups = {handy=1, pickaxey=1, building_block=1, stonecuttable=30},
sounds = mcl_sounds.node_sound_stone_defaults(),
_mcl_blast_resistance = 3,
_mcl_hardness = 1.5,

View File

@ -176,7 +176,7 @@ minetest.register_node("mcl_nether:nether_brick", {
stack_max = 64,
tiles = {"mcl_nether_nether_brick.png"},
is_ground_content = false,
groups = {pickaxey=1, building_block=1, material_stone=1},
groups = {pickaxey=1, building_block=1, material_stone=1, stonecuttable=17},
sounds = mcl_sounds.node_sound_stone_defaults(),
_mcl_blast_resistance = 6,
_mcl_hardness = 2,
@ -189,7 +189,7 @@ minetest.register_node("mcl_nether:red_nether_brick", {
stack_max = 64,
tiles = {"mcl_nether_red_nether_brick.png"},
is_ground_content = false,
groups = {pickaxey=1, building_block=1, material_stone=1},
groups = {pickaxey=1, building_block=1, material_stone=1, stonecuttable=18},
sounds = mcl_sounds.node_sound_stone_defaults(),
_mcl_blast_resistance = 6,
_mcl_hardness = 2,
@ -219,7 +219,7 @@ minetest.register_node("mcl_nether:quartz_block", {
stack_max = 64,
is_ground_content = false,
tiles = {"mcl_nether_quartz_block_top.png", "mcl_nether_quartz_block_bottom.png", "mcl_nether_quartz_block_side.png"},
groups = {pickaxey=1, quartz_block=1,building_block=1, material_stone=1},
groups = {pickaxey=1, quartz_block=1,building_block=1, material_stone=1, stonecuttable=14},
sounds = mcl_sounds.node_sound_stone_defaults(),
_mcl_blast_resistance = 0.8,
_mcl_hardness = 0.8,
@ -231,7 +231,7 @@ minetest.register_node("mcl_nether:quartz_chiseled", {
stack_max = 64,
is_ground_content = false,
tiles = {"mcl_nether_quartz_chiseled_top.png", "mcl_nether_quartz_chiseled_top.png", "mcl_nether_quartz_chiseled_side.png"},
groups = {pickaxey=1, quartz_block=1,building_block=1, material_stone=1},
groups = {pickaxey=1, quartz_block=1,building_block=1, material_stone=1, stonecutter_output=14},
sounds = mcl_sounds.node_sound_stone_defaults(),
_mcl_blast_resistance = 0.8,
_mcl_hardness = 0.8,
@ -245,7 +245,7 @@ minetest.register_node("mcl_nether:quartz_pillar", {
is_ground_content = false,
on_place = mcl_util.rotate_axis,
tiles = {"mcl_nether_quartz_pillar_top.png", "mcl_nether_quartz_pillar_top.png", "mcl_nether_quartz_pillar_side.png"},
groups = {pickaxey=1, quartz_block=1,building_block=1, material_stone=1},
groups = {pickaxey=1, quartz_block=1,building_block=1, material_stone=1, stonecutter_output=14},
sounds = mcl_sounds.node_sound_stone_defaults(),
on_rotate = on_rotate,
_mcl_blast_resistance = 0.8,
@ -257,7 +257,7 @@ minetest.register_node("mcl_nether:quartz_smooth", {
stack_max = 64,
is_ground_content = false,
tiles = {"mcl_nether_quartz_block_bottom.png"},
groups = {pickaxey=1, quartz_block=1,building_block=1, material_stone=1},
groups = {pickaxey=1, quartz_block=1,building_block=1, material_stone=1, stonecuttable=31, stonecutter_output=31},
sounds = mcl_sounds.node_sound_stone_defaults(),
_mcl_blast_resistance = 0.8,
_mcl_hardness = 0.8,

View File

@ -38,7 +38,7 @@ minetest.register_node("mcl_ocean:prismarine", {
is_ground_content = false,
-- Texture should have 22 frames for smooth transitions.
tiles = {{name="mcl_ocean_prismarine_anim.png", animation={type="vertical_frames", aspect_w=32, aspect_h=32, length=45.0}}},
groups = {pickaxey=1, building_block=1, material_stone=1},
groups = {pickaxey=1, building_block=1, material_stone=1, stonecuttable=11},
sounds = mcl_sounds.node_sound_stone_defaults(),
_mcl_blast_resistance = 6,
_mcl_hardness = 1.5,
@ -50,7 +50,7 @@ minetest.register_node("mcl_ocean:prismarine_brick", {
stack_max = 64,
is_ground_content = false,
tiles = {"mcl_ocean_prismarine_bricks.png"},
groups = {pickaxey=1, building_block=1, material_stone=1},
groups = {pickaxey=1, building_block=1, material_stone=1, stonecuttable=12},
sounds = mcl_sounds.node_sound_stone_defaults(),
_mcl_blast_resistance = 6,
_mcl_hardness = 1.5,
@ -62,7 +62,7 @@ minetest.register_node("mcl_ocean:prismarine_dark", {
stack_max = 64,
is_ground_content = false,
tiles = {"mcl_ocean_prismarine_dark.png"},
groups = {pickaxey=1, building_block=1, material_stone=1},
groups = {pickaxey=1, building_block=1, material_stone=1, stonecuttable=13},
sounds = mcl_sounds.node_sound_stone_defaults(),
_mcl_blast_resistance = 6,
_mcl_hardness = 1.5,

View File

@ -30,167 +30,318 @@ for w=1, #woods do
wood[5])
end
mcl_stairs.register_stair_and_slab_simple("stone_rough", "mcl_core:stone", S("Stone Stairs"), S("Stone Slab"), S("Double Stone Slab"))
mcl_stairs.register_slab("stone_rough", "mcl_core:stone",
{pickaxey=1, material_stone=1, stonecutter_output=1},
{"default_stone.png"},
S("Stone Slab"),
mcl_sounds.node_sound_stone_defaults(), 6, 2,
S("Double Stone Slab"))
mcl_stairs.register_stair("stone_rough", "group:stone",
{pickaxey=1, material_stone=1,stonecutter_output=1},
{"default_stone.png"},
S("Stone Stairs"),
mcl_sounds.node_sound_stone_defaults(), 0.8, 0.8)
mcl_stairs.register_slab("stone", "mcl_core:stone_smooth",
{pickaxey=1, material_stone=1},
{pickaxey=1, material_stone=1, stonecutter_output=2},
{"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,
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"))
mcl_stairs.register_stair_and_slab_simple("granite", "mcl_core:granite", S("Granite Stairs"), S("Granite Slab"), S("Double Granite Slab"))
mcl_stairs.register_stair_and_slab_simple("diorite", "mcl_core:diorite", S("Diorite Stairs"), S("Diorite Slab"), S("Double Diorite Slab"))
mcl_stairs.register_stair("andesite", "mcl_core:andesite",
{pickaxey=1, material_stone=1,stonecutter_output=5},
{"mcl_core_andesite.png"},
S("Andesite Stairs"),
mcl_sounds.node_sound_stone_defaults(), 0.8, 0.8)
mcl_stairs.register_slab("andesite", "mcl_core:andesite",
{pickaxey=1, material_stone=1, stonecutter_output=5},
{"mcl_core_andesite.png"},
S("Andesite Slab"),
mcl_sounds.node_sound_stone_defaults(), 6, 2,
S("Double Andesite Slab"))
mcl_stairs.register_stair_and_slab_simple("cobble", "mcl_core:cobble", S("Cobblestone Stairs"), S("Cobblestone Slab"), S("Double Cobblestone Slab"))
mcl_stairs.register_stair_and_slab_simple("mossycobble", "mcl_core:mossycobble", S("Mossy Cobblestone Stairs"), S("Mossy Cobblestone Slab"), S("Double Mossy Cobblestone Slab"))
mcl_stairs.register_stair("granite", "mcl_core:granite",
{pickaxey=1, material_stone=1,stonecutter_output=4},
{"mcl_core_granite.png"},
S("Granite Stairs"),
mcl_sounds.node_sound_stone_defaults(), 0.8, 0.8)
mcl_stairs.register_slab("granite", "mcl_core:granite",
{pickaxey=1, material_stone=1, stonecutter_output=4},
{"mcl_core_granite.png"},
S("Granite Slab"),
mcl_sounds.node_sound_stone_defaults(), 6, 2,
S("Double Granite Slab"))
mcl_stairs.register_stair_and_slab_simple("brick_block", "mcl_core:brick_block", S("Brick Stairs"), S("Brick Slab"), S("Double Brick Slab"))
mcl_stairs.register_stair("diorite", "mcl_core:diorite",
{pickaxey=1, material_stone=1,stonecutter_output=6},
{"mcl_core_diorite.png"},
S("Granite Stairs"),
mcl_sounds.node_sound_stone_defaults(), 0.8, 0.8)
mcl_stairs.register_slab("diorite", "mcl_core:diorite",
{pickaxey=1, material_stone=1, stonecutter_output=6},
{"mcl_core_diorite.png"},
S("Diorite Slab"),
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,stonecutter_output=7},
{"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, stonecutter_output=7},
{"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,stonecutter_output=8},
{"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, stonecutter_output=8},
{"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,stonecutter_output=16},
{"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, stonecutter_output=16},
{"default_brick.png"},
S("Brick Slab"),
mcl_sounds.node_sound_stone_defaults(), 6, 2,
S("Double Brick Slab"))
mcl_stairs.register_stair("sandstone", "group:normal_sandstone",
{pickaxey=1, material_stone=1},
{pickaxey=1, material_stone=1, stonecutter_output=9},
{"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", "group:normal_sandstone",
{pickaxey=1, material_stone=1},
{pickaxey=1, material_stone=1, stonecutter_output=9},
{"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_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("sandstonesmooth2", "mcl_core:sandstonesmooth2",
{pickaxey=1, material_stone=1, stonecutter_output=9, stonecutter_stage=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, stonecutter_output=9, stonecutter_stage=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("redsandstone", "group:red_sandstone",
{pickaxey=1, material_stone=1},
{pickaxey=1, material_stone=1, stonecutter_output=10},
{"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", "group:red_sandstone",
{pickaxey=1, material_stone=1},
{pickaxey=1, material_stone=1, stonecutter_output=10},
{"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_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"))
mcl_stairs.register_stair("redsandstonesmooth2", "mcl_core:redsandstonesmooth2",
{pickaxey=1, material_stone=1, stonecutter_output=10, stonecutter_stage=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, stonecutter_output=10, stonecutter_stage=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"))
-- Intentionally not group:stonebrick because of mclx_stairs
mcl_stairs.register_stair("stonebrick", "mcl_core:stonebrick",
{pickaxey=1, material_stone=1},
{pickaxey=1, material_stone=1, stonecutter_output=1, stonecutter_stage=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_stairs.register_slab("stonebrick", "mcl_core:stonebrick",
{pickaxey=1, material_stone=1},
{pickaxey=1, material_stone=1, stonecutter_output=1, stonecutter_stage=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_stairs.register_stair("quartzblock", "group:quartz_block",
{pickaxey=1, material_stone=1},
{pickaxey=1, material_stone=1, stonecutter_output=14},
{"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", "group:quartz_block",
{pickaxey=1, material_stone=1},
{pickaxey=1, material_stone=1, stonecutter_output=14},
{"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_stairs.register_stair_and_slab_simple("quartz_smooth", "mcl_nether:quartz_smooth", S("Smooth Quartz Stairs"), S("Smooth Quartz Slab"), S("Double Smooth Quartz Slab"))
mcl_stairs.register_stair("quartz_smooth", "mcl_nether:quartz_smooth",
{pickaxey=1, material_stone=1, stonecutter_output=31},
{"mcl_nether_quartz_block_bottom.png"},
S("Smooth Quartz Stairs"),
mcl_sounds.node_sound_stone_defaults(), 0.8, 0.8)
mcl_stairs.register_slab("quartz_smooth", "mcl_nether:quartz_smooth",
{pickaxey=1, material_stone=1, stonecutter_output=31},
{"mcl_nether_quartz_block_bottom.png"},
S("Smooth Quartz Slab"),
mcl_sounds.node_sound_stone_defaults(), 6, 2,
S("Double Smooth Quartz Slab"))
mcl_stairs.register_stair_and_slab("nether_brick", "mcl_nether:nether_brick",
{pickaxey=1, material_stone=1},
{pickaxey=1, material_stone=1, stonecutter_output=17},
{"mcl_nether_nether_brick.png"},
S("Nether Brick Stairs"),
S("Nether Brick Slab"),
mcl_sounds.node_sound_stone_defaults(), 6, 2,
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},
{pickaxey=1, material_stone=1, stonecutter_output=18},
{"mcl_nether_red_nether_brick.png"},
S("Red Nether Brick Stairs"),
S("Red Nether Brick Slab"),
mcl_sounds.node_sound_stone_defaults(), 6, 2,
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"))
mcl_stairs.register_stair_and_slab("end_bricks", "mcl_end:end_bricks",
{pickaxey=1, material_stone=1, stonecutter_output=20},
{"mcl_end_end_bricks.png"},
S("End Stone Brick Stairs"),
S("End Stone Brick Slab"),
mcl_sounds.node_sound_stone_defaults(), 6, 2,
S("Double End Stone Brick Slab"), nil)
mcl_stairs.register_stair("purpur_block", "group:purpur_block",
{pickaxey=1, material_stone=1},
{pickaxey=1, material_stone=1, stonecutter_output=15},
{"mcl_end_purpur_block.png"},
S("Purpur Stairs"),
mcl_sounds.node_sound_stone_defaults(), 6, 1.5,
nil)
mcl_stairs.register_slab("purpur_block", "group:purpur_block",
{pickaxey=1, material_stone=1},
{pickaxey=1, material_stone=1, stonecutter_output=15},
{"mcl_end_purpur_block.png"},
S("Purpur Slab"),
mcl_sounds.node_sound_stone_defaults(), 6, 2,
S("Double Purpur Slab"))
mcl_stairs.register_stair_and_slab_simple("prismarine", "mcl_ocean:prismarine", S("Prismarine Stairs"), S("Prismarine Slab"), S("Double Prismarine Slab"))
mcl_stairs.register_stair("prismarine", "mcl_ocean:prismarine",
{pickaxey=1, material_stone=1, stonecutter_output=11},
{{name="mcl_ocean_prismarine_anim.png", animation={type="vertical_frames", aspect_w=32, aspect_h=32, length=45.0}}},
S("Prismarine Stairs"),
mcl_sounds.node_sound_stone_defaults(), 6, 1.5,
nil)
mcl_stairs.register_slab("prismarine", "mcl_ocean:prismarine",
{pickaxey=1, material_stone=1, stonecutter_output=11},
{{name="mcl_ocean_prismarine_anim.png", animation={type="vertical_frames", aspect_w=32, aspect_h=32, length=45.0}}},
S("Prismarine Slab"),
mcl_sounds.node_sound_stone_defaults(), 6, 2,
S("Double Prismarine Slab"))
mcl_stairs.register_stair_and_slab_simple("mud_brick", "mcl_mud:mud_bricks", S("Mud Brick Stair"), S("Mud Brick Slab"), S("Double Mud Brick Slab"))
mcl_stairs.register_stair("prismarine_brick", "mcl_ocean:prismarine_brick",
{pickaxey=1, material_stone=1, stonecutter_output=12},
{"mcl_ocean_prismarine_bricks.png"},
S("prismarine Brick Stairs"),
mcl_sounds.node_sound_stone_defaults(), 6, 1.5,
nil)
mcl_stairs.register_slab("prismarine_brick", "mcl_ocean:prismarine_brick",
{pickaxey=1, material_stone=1, stonecutter_output=12},
{"mcl_ocean_prismarine_bricks.png"},
S("prismarine Brick Slab"),
mcl_sounds.node_sound_stone_defaults(), 6, 2,
S("Double prismarine_brick Slab"))
mcl_stairs.register_stair_and_slab_simple("prismarine_brick", "mcl_ocean:prismarine_brick", S("Prismarine Brick Stairs"), S("Prismarine Brick Slab"), S("Double Prismarine Brick Slab"))
mcl_stairs.register_stair_and_slab_simple("prismarine_dark", "mcl_ocean:prismarine_dark", S("Dark Prismarine Stairs"), S("Dark Prismarine Slab"), S("Double Dark Prismarine Slab"))
mcl_stairs.register_stair("prismarine_dark", "mcl_ocean:prismarine_dark",
{pickaxey=1, material_stone=1, stonecutter_output=13},
{"mcl_ocean_prismarine_dark.png"},
S("prismarine Brick Stairs"),
mcl_sounds.node_sound_stone_defaults(), 6, 1.5,
nil)
mcl_stairs.register_slab("prismarine_dark", "mcl_ocean:prismarine_dark",
{pickaxey=1, material_stone=1, stonecutter_output=13},
{"mcl_ocean_prismarine_dark.png"},
S("Dark Prismarine Slab"),
mcl_sounds.node_sound_stone_defaults(), 6, 2,
S("Double Dark Prismarine Slab"))
mcl_stairs.register_stair_and_slab("mud_brick", "mcl_mud:mud_bricks",
{pickaxey=1, material_stone=1, stonecutter_output=30},
{"mcl_mud_bricks.png"},
S("Mud Brick Stairs"),
S("Mud Brick Slab"),
mcl_sounds.node_sound_stone_defaults(), 6, 2,
S("Double Mud Brick Slab"), nil)
mcl_stairs.register_slab("andesite_smooth", "mcl_core:andesite_smooth",
{pickaxey=1},
{pickaxey=1, stonecutter_output=5, stonecutter_stage=1},
{"mcl_core_andesite_smooth.png", "mcl_core_andesite_smooth.png", "mcl_stairs_andesite_smooth_slab.png"},
S("Polished Andesite Slab"),
nil, 6, nil,
S("Double Polished Andesite Slab"))
mcl_stairs.register_stair("andesite_smooth", "mcl_core:andesite_smooth",
{pickaxey=1},
{pickaxey=1, stonecutter_output=5, stonecutter_stage=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,
"woodlike")
mcl_stairs.register_slab("granite_smooth", "mcl_core:granite_smooth",
{pickaxey=1},
{pickaxey=1, stonecutter_output=4, stonecutter_stage=1},
{"mcl_core_granite_smooth.png", "mcl_core_granite_smooth.png", "mcl_stairs_granite_smooth_slab.png"},
S("Polished Granite Slab"),
nil, 6, nil,
S("Double Polished Granite Slab"))
mcl_stairs.register_stair("granite_smooth", "mcl_core:granite_smooth",
{pickaxey=1},
{pickaxey=1, stonecutter_output=4, stonecutter_stage=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,
"woodlike")
mcl_stairs.register_slab("diorite_smooth", "mcl_core:diorite_smooth",
{pickaxey=1},
{pickaxey=1, stonecutter_output=6, stonecutter_stage=1},
{"mcl_core_diorite_smooth.png", "mcl_core_diorite_smooth.png", "mcl_stairs_diorite_smooth_slab.png"},
S("Polished Diorite Slab"),
nil, 6, nil,
S("Double Polished Diorite Slab"))
mcl_stairs.register_stair("diorite_smooth", "mcl_core:diorite_smooth",
{pickaxey=1},
{pickaxey=1, stonecutter_output=6, stonecutter_stage=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,
"woodlike")
mcl_stairs.register_stair("stonebrickmossy", "mcl_core:stonebrickmossy",
{pickaxey=1},
{pickaxey=1, stonecutter_output=3},
{"mcl_core_stonebrick_mossy.png"},
S("Mossy Stone Brick Stairs"),
mcl_sounds.node_sound_stone_defaults(), 6, 1.5,
nil)
mcl_stairs.register_slab("stonebrickmossy", "mcl_core:stonebrickmossy",
{pickaxey=1},
{pickaxey=1, stonecutter_output=3},
{"mcl_core_stonebrick_mossy.png"},
S("Mossy Stone Brick Slab"),
mcl_sounds.node_sound_stone_defaults(), 6, 2,

View File

@ -2,10 +2,19 @@ mcl_stonecutter
===============
Adds the stonecutter block. Used to cut stone like materials into stairs, slabs, etc. Also used as the Stone Mason Villager's jobsite.
### Adding recipes
* To add a new compatible input the item needs to be in the group "stonecuttable".
* It's output item needs to be in the group "stonecutter_output".
* "stonecuttable" and "stonecutter_output" need to have the same number.
* Items like polished granite should only be able to make it's polished variants
while normal granite can make both. These inputs and outputs need to be in the group
"stonecutter_stage".
License of code
---------------
See the main MineClone 2 README.md file.
Author: PrairieWind
Author: PrairieWind, ChrisPHP, cora
License of media
----------------

View File

@ -2,10 +2,121 @@
--||||| STONECUTTER |||||
--|||||||||||||||||||||||
-- TO-DO:
-- * Add GUI
local S = minetest.get_translator(minetest.get_current_modname())
local S = minetest.get_translator("mcl_stonecutter")
-- formspecs
local function show_stonecutter_formspec(items, input)
local cut_items = {}
local x_len = 0
local y_len = 0.5
-- This loops through all the items that can be made and inserted into the formspec
if items ~= nil then
for index, value in pairs(items) do
x_len = x_len + 1
if x_len > 5 then
y_len = y_len + 1
x_len = 1
end
table.insert(cut_items,string.format("item_image_button[%f,%f;%f,%f;%s;%s;%s]",x_len+1,y_len,1,1, value, value, ""))
end
end
local formspec = "size[9,8.75]"..
"label[0,4.0;"..minetest.formspec_escape(minetest.colorize("#313131", S("Inventory"))).."]"..
"label[1,0.1;"..minetest.formspec_escape(minetest.colorize("#313131", S("Stone Cutter"))).."]"..
"list[current_player;main;0,4.5;9,3;9]"..
mcl_formspec.get_itemslot_bg(0,4.5,9,3)..
"list[current_player;main;0,7.74;9,1;]"..
mcl_formspec.get_itemslot_bg(0,7.74,9,1)..
"list[context;input;0.5,1.7;1,1;]"..
mcl_formspec.get_itemslot_bg(0.5,1.7,1,1)..
"list[context;output;7.5,1.7;1,1;]"..
mcl_formspec.get_itemslot_bg(7.5,1.7,1,1)..
table.concat(cut_items)..
"listring[context;output]"..
"listring[current_player;main]"..
"listring[context;input]"..
"listring[current_player;main]"
return formspec
end
--Checks for the string for the different stair and wall positions that shouldn't be craftable
local function check(item_name, input_name)
print(item_name)
if string.match(item_name, "mcl_walls") then
if string.match(item_name, "%d") then
return true
end
end
if string.match(item_name, "_outer") then
return true
elseif string.match(item_name, "_inner") then
return true
elseif string.match(item_name, "_top") then
return true
elseif string.match(item_name, "_double") then
return true
end
if minetest.get_item_group(item_name, "stonecutter_stage") == 0 and minetest.get_item_group(input_name, "stonecutter_stage") > 0 then
return true
end
return false
end
-- Updates the formspec
local function update_stonecutter_slots(pos,str)
local meta = minetest.get_meta(pos)
local inv = meta:get_inventory()
local input = inv:get_stack("input", 1)
local name = input:get_name()
local compat_item = minetest.get_item_group(name, "stonecuttable")
-- Checks if input is in the group
if compat_item > 0 then
local cuttable_recipes = {}
for item_name, item_def in pairs(minetest.registered_items) do
if item_def.groups and item_def.groups["stonecutter_output"] == compat_item then
if check(item_name, name) == false and name ~= item_name then
table.insert(cuttable_recipes, item_name)
end
end
end
meta:set_string("formspec", show_stonecutter_formspec(cuttable_recipes))
else
meta:set_string("formspec", show_stonecutter_formspec(nil))
end
-- Checks if the chosen item is a slab or not, if it's a slab set the output to be a stack of 2
if minetest.get_item_group(str, "stonecutter_output") > 0 then
local cut_item = ItemStack(str)
if string.match(str, "mcl_stairs:slab_") then
cut_item:set_count(2)
else
cut_item:set_count(1)
end
inv:set_stack("output", 1, cut_item)
else
inv:set_stack("output", 1, "")
end
end
-- Only drop the items that were in the input slot
local function drop_stonecutter_items(pos, meta)
local meta = minetest.get_meta(pos)
local inv = meta:get_inventory()
for i=1, inv:get_size("input") do
local stack = inv:get_stack("input", i)
if not stack:is_empty() then
local p = {x=pos.x+math.random(0, 10)/10-0.5, y=pos.y, z=pos.z+math.random(0, 10)/10-0.5}
minetest.add_item(p, stack)
end
end
end
minetest.register_node("mcl_stonecutter:stonecutter", {
description = S("Stone Cutter"),
@ -46,6 +157,106 @@ minetest.register_node("mcl_stonecutter:stonecutter", {
_mcl_blast_resistance = 3.5,
_mcl_hardness = 3.5,
sounds = mcl_sounds.node_sound_stone_defaults(),
on_destruct = drop_stonecutter_items,
allow_metadata_inventory_take = function(pos, listname, index, stack, player)
local name = player:get_player_name()
if minetest.is_protected(pos, name) then
minetest.record_protection_violation(pos, name)
return 0
else
return stack:get_count()
end
end,
allow_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player)
local name = player:get_player_name()
if minetest.is_protected(pos, name) then
minetest.record_protection_violation(pos, name)
return 0
elseif to_list == "output" then
return 0
elseif from_list == "output" and to_list == "input" then
local meta = minetest.get_meta(pos)
local inv = meta:get_inventory()
if inv:get_stack(to_list, to_index):is_empty() then
return count
else
return 0
end
else
return count
end
end,
on_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player)
local meta = minetest.get_meta(pos)
if from_list == "output" and to_list == "input" then
local inv = meta:get_inventory()
for i=1, inv:get_size("input") do
if i ~= to_index then
local istack = inv:get_stack("input", i)
istack:set_count(math.max(0, istack:get_count() - count))
inv:set_stack("input", i, istack)
end
end
end
update_stonecutter_slots(pos)
end,
allow_metadata_inventory_put = function(pos, listname, index, stack, player)
local name = player:get_player_name()
if minetest.is_protected(pos, name) then
minetest.record_protection_violation(pos, name)
return 0
elseif listname == "output" then
return 0
else
return stack:get_count()
end
end,
on_metadata_inventory_put = function(pos, listname, index, stack, player)
update_stonecutter_slots(pos)
end,
on_metadata_inventory_take = function(pos, listname, index, stack, player)
local meta = minetest.get_meta(pos)
if listname == "output" then
local inv = meta:get_inventory()
local input = inv:get_stack("input", 1)
input:take_item()
inv:set_stack("input", 1, input)
if input:get_count() == 0 then
meta:set_string("cut_stone", nil)
end
else
meta:set_string("cut_stone", nil)
end
update_stonecutter_slots(pos)
end,
on_construct = function(pos)
local meta = minetest.get_meta(pos)
local inv = meta:get_inventory()
inv:set_size("input", 1)
inv:set_size("output", 1)
local form = show_stonecutter_formspec()
meta:set_string("formspec", form)
end,
on_rightclick = function(pos, node, player, itemstack)
if not player:get_player_control().sneak then
update_stonecutter_slots(pos)
end
end,
on_receive_fields = function(pos, formname, fields, sender)
local sender_name = sender:get_player_name()
if minetest.is_protected(pos, sender_name) then
minetest.record_protection_violation(pos, sender_name)
return
end
if fields then
for field_name, value in pairs(fields) do
local item_name = tostring(field_name)
if item_name then
update_stonecutter_slots(pos, item_name)
end
end
end
end,
})
minetest.register_craft({

View File

@ -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"}, "", {pickaxey=1, material_stone=1, stonecutter_output=7})
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"}, "", {pickaxey=1, material_stone=1, stonecutter_output=8})
mcl_walls.register_wall("mcl_walls:andesite", S("Andesite Wall"), "mcl_core:andesite", {"mcl_core_andesite.png"}, "", {pickaxey=1, material_stone=1, stonecutter_output=5})
mcl_walls.register_wall("mcl_walls:granite", S("Granite Wall"), "mcl_core:granite", {"mcl_core_granite.png"}, "", {pickaxey=1, material_stone=1, stonecutter_output=4})
mcl_walls.register_wall("mcl_walls:diorite", S("Diorite Wall"), "mcl_core:diorite", {"mcl_core_diorite.png"}, "", {pickaxey=1, material_stone=1, stonecutter_output=6})
mcl_walls.register_wall("mcl_walls:brick", S("Brick Wall"), "mcl_core:brick_block", {"default_brick.png"}, "", {pickaxey=1, material_stone=1, stonecutter_output=16})
mcl_walls.register_wall("mcl_walls:sandstone", S("Sandstone Wall"), "mcl_core:sandstone", {"mcl_core_sandstone_top.png", "mcl_core_sandstone_bottom.png", "mcl_core_sandstone_normal.png"}, "", {pickaxey=1, material_stone=1, stonecutter_output=9})
mcl_walls.register_wall("mcl_walls:redsandstone", S("Red Sandstone Wall"), "mcl_core:redsandstone", {"mcl_core_red_sandstone_top.png", "mcl_core_red_sandstone_bottom.png", "mcl_core_red_sandstone_carved.png"}, "", {pickaxey=1, material_stone=1, stonecutter_output=10})
mcl_walls.register_wall("mcl_walls:stonebrick", S("Stone Brick Wall"), "mcl_core:stonebrick", {"default_stone_brick.png"}, "", {pickaxey=1, material_stone=1, stonecutter_output=1, stonecutter_stage=1})
mcl_walls.register_wall("mcl_walls:stonebrickmossy", S("Mossy Stone Brick Wall"), "mcl_core:stonebrickmossy", {"mcl_core_stonebrick_mossy.png"}, "", {pickaxey=1, material_stone=1, stonecutter_output=3})
mcl_walls.register_wall("mcl_walls:prismarine", S("Prismarine Wall"), "mcl_ocean:prismarine",{{name="mcl_ocean_prismarine_anim.png", animation={type="vertical_frames", aspect_w=32, aspect_h=32, length=45.0}}}, "", {pickaxey=1, material_stone=1, stonecutter_output=11})
mcl_walls.register_wall("mcl_walls:endbricks", S("End Stone Brick Wall"), "mcl_end:end_bricks", {"mcl_end_end_bricks.png"}, "", {pickaxey=1, material_stone=1, stonecutter_output=20})
mcl_walls.register_wall("mcl_walls:netherbrick", S("Nether Brick Wall"), "mcl_nether:nether_brick", {"mcl_nether_nether_brick.png"}, "", {pickaxey=1, material_stone=1, stonecutter_output=17})
mcl_walls.register_wall("mcl_walls:rednetherbrick", S("Red Nether Brick Wall"), "mcl_nether:red_nether_brick", {"mcl_nether_red_nether_brick.png"}, "", {pickaxey=1, material_stone=1, stonecutter_output=18})
mcl_walls.register_wall("mcl_walls:mudbrick", S("Mud Brick Wall"), "mcl_mud:mud_bricks", {"mcl_mud_bricks.png"}, "", {handy=1, pickaxey=1, material_stone=1, stonecutter_output=30})