2022-10-26 11:44:48 +00:00
|
|
|
local modname = minetest.get_current_modname()
|
|
|
|
local modpath = minetest.get_modpath(modname)
|
2015-06-29 17:55:56 +00:00
|
|
|
|
2022-10-26 11:44:48 +00:00
|
|
|
local S = minetest.get_translator(minetest.get_current_modname())
|
2015-06-29 17:55:56 +00:00
|
|
|
|
2022-10-26 11:44:48 +00:00
|
|
|
-- mcl_itemframes API
|
|
|
|
dofile(modpath .. "/item_frames_API.lua")
|
2018-05-12 17:21:41 +00:00
|
|
|
|
2022-11-04 09:23:40 +00:00
|
|
|
-- actual api initialization.
|
|
|
|
mcl_itemframes.create_base_definitions()
|
|
|
|
|
|
|
|
-- necessary to maintain compatibility amongst older versions.
|
2022-11-04 10:00:52 +00:00
|
|
|
mcl_itemframes.backwards_compatibility()
|
2015-06-29 17:55:56 +00:00
|
|
|
|
2022-11-04 22:54:06 +00:00
|
|
|
-- Define the standard frames.
|
2022-11-04 09:23:40 +00:00
|
|
|
mcl_itemframes.create_custom_frame("false", "item_frame", false,
|
2022-11-04 10:00:52 +00:00
|
|
|
"mcl_itemframes_item_frame.png", mcl_colors.WHITE, "Item Frame",
|
2022-11-04 22:54:06 +00:00
|
|
|
"Can hold an item.","")
|
2022-11-04 09:23:40 +00:00
|
|
|
mcl_itemframes.create_custom_frame("false", "glow_item_frame", true,
|
2022-11-04 10:00:52 +00:00
|
|
|
"mcl_itemframes_glow_item_frame.png", mcl_colors.WHITE, "Glowing Item Frame",
|
2022-11-04 22:54:06 +00:00
|
|
|
"Can hold an item and glows.","")
|
2022-11-04 09:23:40 +00:00
|
|
|
|
|
|
|
-- Register the base frame's recipes.
|
2022-10-26 11:44:48 +00:00
|
|
|
-- was going to make it a specialized function, but minetest refuses to play nice.
|
2017-01-12 02:04:58 +00:00
|
|
|
minetest.register_craft({
|
2022-11-04 10:00:52 +00:00
|
|
|
output = "mcl_itemframes:item_frame",
|
|
|
|
recipe = {
|
|
|
|
{ "mcl_core:stick", "mcl_core:stick", "mcl_core:stick" },
|
|
|
|
{ "mcl_core:stick", "mcl_mobitems:leather", "mcl_core:stick" },
|
|
|
|
{ "mcl_core:stick", "mcl_core:stick", "mcl_core:stick" },
|
|
|
|
}
|
2017-01-12 02:04:58 +00:00
|
|
|
})
|
2018-05-12 16:18:17 +00:00
|
|
|
|
2022-10-26 11:44:48 +00:00
|
|
|
minetest.register_craft({
|
2022-11-04 10:00:52 +00:00
|
|
|
type = "shapeless",
|
|
|
|
output = 'mcl_itemframes:glow_item_frame',
|
|
|
|
recipe = { 'mcl_mobitems:glow_ink_sac', 'mcl_itemframes:item_frame' },
|
2018-05-12 16:50:44 +00:00
|
|
|
})
|
2018-05-12 22:57:32 +00:00
|
|
|
|
2022-11-04 09:23:40 +00:00
|
|
|
--[[ green frames just for testing
|
|
|
|
mcl_itemframes.create_custom_frame("false", "my_regular_frame", false,
|
2022-11-04 10:00:52 +00:00
|
|
|
"mcl_itemframes_item_frame.png", mcl_colors.DARK_GREEN, "A Green frame",
|
|
|
|
"My Green Frame")
|
2022-11-04 09:23:40 +00:00
|
|
|
mcl_itemframes.create_custom_frame("false", "my_glowing_frame", true,
|
2022-11-04 10:00:52 +00:00
|
|
|
"mcl_itemframes_glow_item_frame.png", mcl_colors.DARK_GREEN, "A Green glowing frame",
|
|
|
|
"My Green glowing Frame")
|
2022-11-01 00:54:19 +00:00
|
|
|
|
|
|
|
minetest.register_craft({
|
2022-11-04 10:00:52 +00:00
|
|
|
output = "mcl_itemframes:my_regular_frame",
|
|
|
|
recipe = {
|
|
|
|
{ "", "mcl_core:stick", "" },
|
|
|
|
{ "mcl_core:stick", "", "mcl_core:stick" },
|
|
|
|
{ "", "mcl_core:stick", "" },
|
|
|
|
}
|
2022-11-01 00:54:19 +00:00
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_craft({
|
2022-11-04 10:00:52 +00:00
|
|
|
type = "shapeless",
|
|
|
|
output = "mcl_itemframes:my_glowing_frame",
|
|
|
|
recipe = { "mcl_mobitems:glow_ink_sac", "mcl_itemframes:my_regular_frame" },
|
2022-11-01 00:54:19 +00:00
|
|
|
})
|
2022-11-04 09:23:40 +00:00
|
|
|
--]]
|