add copper nuggets and make lantern craftable #32

Merged
Ghost merged 4 commits from add-copper-lantern-recipe into master 2023-03-22 03:05:55 +01:00
2 changed files with 33 additions and 1 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 135 B

View File

@ -229,7 +229,7 @@ minetest.register_tool("mcl_copper_stuff:shears_copper", {
})
-- Copper Lantern
mcl_lanterns.register_lantern("mcl_copper_stuff:copper_lantern", {
Ghost marked this conversation as resolved
Review

Why did you change this?

Why did you change this?
Review

"mcl_copper_stuff:" had to be removed in order for the crafting recipe to work, I believe this is because the function mcl_lanterns.register_lantern is used instead of the regular minetest.register_node which classifies the copper lantern as part of the mcl_lantern set.

Notice the crafting recipe for the lantern:

-- copper lantern recipe
minetest.register_craft({
	output = "mcl_lanterns:copper_lantern_floor",
	recipe = {
		{"mcl_copper_stuff:copper_nugget", "mcl_copper_stuff:copper_nugget", "mcl_copper_stuff:copper_nugget"},
		{"mcl_copper_stuff:copper_nugget", "mcl_torches:torch"             , "mcl_copper_stuff:copper_nugget"},
		{"mcl_copper_stuff:copper_nugget", "mcl_copper_stuff:copper_nugget", "mcl_copper_stuff:copper_nugget"},
	},
})
"mcl_copper_stuff:" had to be removed in order for the crafting recipe to work, I believe this is because the function mcl_lanterns.register_lantern is used instead of the regular minetest.register_node which classifies the copper lantern as part of the mcl_lantern set. Notice the crafting recipe for the lantern: ``` -- copper lantern recipe minetest.register_craft({ output = "mcl_lanterns:copper_lantern_floor", recipe = { {"mcl_copper_stuff:copper_nugget", "mcl_copper_stuff:copper_nugget", "mcl_copper_stuff:copper_nugget"}, {"mcl_copper_stuff:copper_nugget", "mcl_torches:torch" , "mcl_copper_stuff:copper_nugget"}, {"mcl_copper_stuff:copper_nugget", "mcl_copper_stuff:copper_nugget", "mcl_copper_stuff:copper_nugget"}, }, }) ```
mcl_lanterns.register_lantern("copper_lantern", {
description = S("Copper Lantern"),
longdesc = S("Copper Lanterns are light sources which can be placed on the top or the bottom of most blocks."),
texture = "mcl_copper_stuff_copper_lantern.png",
@ -237,6 +237,13 @@ mcl_lanterns.register_lantern("mcl_copper_stuff:copper_lantern", {
light_level = 10,
})
--copper nugget
minetest.register_craftitem("mcl_copper_stuff:copper_nugget", {
description = S("Copper Nugget"),
_doc_items_longdesc = S("Small chunks of copper, mainly used for crafting copper lanterns"),
inventory_image = "mcl_copper_stuff_copper_nugget.png",
})
-- Registering crafts
minetest.register_craft({
output = "mcl_copper_stuff:pick_copper",
@ -280,4 +287,29 @@ minetest.register_craft({
{ "", "mcl_copper:copper_ingot" },
{ "mcl_copper:copper_ingot", "" },
}
})
-- copper nugget crafting
minetest.register_craft({
output = "mcl_copper_stuff:copper_nugget 9",
recipe = {
{"mcl_copper:copper_ingot"},
},
})
-- copper ingot crafting (nuggets)
minetest.register_craft({
output = "mcl_copper:copper_ingot",
recipe = {
{"mcl_copper_stuff:copper_nugget", "mcl_copper_stuff:copper_nugget", "mcl_copper_stuff:copper_nugget"},
{"mcl_copper_stuff:copper_nugget", "mcl_copper_stuff:copper_nugget", "mcl_copper_stuff:copper_nugget"},
{"mcl_copper_stuff:copper_nugget", "mcl_copper_stuff:copper_nugget", "mcl_copper_stuff:copper_nugget"},
},
})
-- copper lantern recipe
minetest.register_craft({
output = "mcl_lanterns:copper_lantern_floor",
recipe = {
{"mcl_copper_stuff:copper_nugget", "mcl_copper_stuff:copper_nugget", "mcl_copper_stuff:copper_nugget"},
{"mcl_copper_stuff:copper_nugget", "mcl_torches:torch" , "mcl_copper_stuff:copper_nugget"},
{"mcl_copper_stuff:copper_nugget", "mcl_copper_stuff:copper_nugget", "mcl_copper_stuff:copper_nugget"},
},
})