Add invisible and invisible glow item frames

This commit is contained in:
Mikita Wiśniewski 2025-01-06 23:15:07 +07:00 committed by the-real-herowl
parent 5ea39f9cc1
commit 6bcd0f8033
4 changed files with 32 additions and 7 deletions

View file

@ -1,6 +1,12 @@
mcl_itemframes = {}
mcl_itemframes.registered_nodes = {}
mcl_itemframes.registered_itemframes = {}
mcl_itemframes = {
registered_nodes = {},
registered_itemframes = {},
}
local S = core.get_translator(core.get_current_modname())
local longdesc = S("Item frames are decorative blocks in which items can be placed.")
local usagehelp = S("Just place any item on the item frame. Use the item frame again to retrieve the item.")
local function table_merge(t, ...)
local t2 = table.copy(t)
@ -41,6 +47,8 @@ local tpl_node = {
node_placement_prediction = "",
_mcl_hardness = 0.5,
_mcl_blast_resistance = 0.5,
_doc_items_longdesc = longdesc,
_doc_items_usagehelp = usagehelp,
after_dig_node = mcl_util.drop_items_from_meta_container({"main"}),
allow_metadata_inventory_move = function() return 0 end,
allow_metadata_inventory_put = function() return 0 end,

View file

@ -4,8 +4,6 @@ mcl_itemframes.register_itemframe("frame", {
node = {
description = S("Item Frame"),
_tt_help = S("Can hold an item"),
_doc_items_longdesc = S("Item frames are decorative blocks in which items can be placed."),
_doc_items_usagehelp = S("Just place any item on the item frame. Use the item frame again to retrieve the item."),
tiles = {"mcl_itemframes_itemframe_background.png"},
inventory_image = "mcl_itemframes_item_frame.png",
wield_image = "mcl_itemframes_item_frame.png",
@ -16,8 +14,6 @@ mcl_itemframes.register_itemframe("glow_frame", {
node = {
description = S("Glow Item Frame"),
_tt_help = S("Can hold an item and glows"),
_doc_items_longdesc = S("Item frames are decorative blocks in which items can be placed."),
_doc_items_usagehelp = S("Just place any item on the item frame. Use the item frame again to retrieve the item."),
tiles = {"mcl_itemframes_glow_item_frame_border.png"},
inventory_image = "mcl_itemframes_glow_item_frame.png",
wield_image = "mcl_itemframes_glow_item_frame.png",
@ -25,6 +21,27 @@ mcl_itemframes.register_itemframe("glow_frame", {
object_properties = {glow = 15},
})
mcl_itemframes.register_itemframe("invisible_frame", {
node = {
description = S("Invisible Item Frame"),
drawtype = "airlike",
_tt_help = S("Can hold an item but is invisible"),
inventory_image = "mcl_itemframes_invisible_item_frame.png",
wield_image = "mcl_itemframes_invisible_item_frame.png",
},
})
mcl_itemframes.register_itemframe("invisible_glow_frame", {
node = {
description = S("Invisible Glow Item Frame"),
drawtype = "airlike",
_tt_help = S("Can hold an item and glows but is invisible"),
inventory_image = "mcl_itemframes_invisible_glow_item_frame.png",
wield_image = "mcl_itemframes_invisible_glow_item_frame.png",
},
object_properties = {glow = 15},
})
awards.register_achievement("mcl_itemframes:glowframe", {
title = S("Glow and Behold!"),
description = S("Craft a glow item frame."),

Binary file not shown.

After

(image error) Size: 170 B

Binary file not shown.

After

(image error) Size: 168 B