From f62f627443b3f26f13a9855552c3449f52edd027 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Sun, 13 May 2018 05:20:41 +0200 Subject: [PATCH] Add end portal frame with eye into creative inv. --- mods/ITEMS/mcl_portals/portal_end.lua | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/mods/ITEMS/mcl_portals/portal_end.lua b/mods/ITEMS/mcl_portals/portal_end.lua index a83b42b2e9..eb304586e5 100644 --- a/mods/ITEMS/mcl_portals/portal_end.lua +++ b/mods/ITEMS/mcl_portals/portal_end.lua @@ -309,7 +309,7 @@ minetest.register_node("mcl_portals:end_portal_frame", { minetest.register_node("mcl_portals:end_portal_frame_eye", { description = "End Portal Frame with Eye of Ender", _doc_items_create_entry = false, - groups = { creative_breakable = 1, not_in_creative_inventory = 1, comparator_signal = 15 }, + groups = { creative_breakable = 1, deco_block = 1, comparator_signal = 15 }, tiles = { "mcl_portals_endframe_top.png^[lowpart:75:mcl_portals_endframe_eye.png", "mcl_portals_endframe_bottom.png", "mcl_portals_endframe_eye.png^mcl_portals_endframe_side.png" }, paramtype2 = "facedir", drawtype = "nodebox", @@ -331,6 +331,12 @@ minetest.register_node("mcl_portals:end_portal_frame_eye", { end_portal_area(ppos, true) end end, + on_construct = function(pos) + local ok, ppos = check_end_portal_frame(pos) + if ok then + end_portal_area(ppos) + end + end, on_rotate = rotate_frame_eye, @@ -358,7 +364,7 @@ minetest.override_item("mcl_end:ender_eye", { -- Place eye of ender into end portal frame if pointed_thing.under and node.name == "mcl_portals:end_portal_frame" then - minetest.swap_node(pointed_thing.under, { name = "mcl_portals:end_portal_frame_eye", param2 = node.param2 }) + minetest.set_node(pointed_thing.under, { name = "mcl_portals:end_portal_frame_eye", param2 = node.param2 }) if minetest.get_modpath("doc") then doc.mark_entry_as_revealed(user:get_player_name(), "nodes", "mcl_portals:end_portal_frame") @@ -370,9 +376,8 @@ minetest.override_item("mcl_end:ender_eye", { itemstack:take_item() -- 1 use end - local ok, ppos = check_end_portal_frame(pointed_thing.under) + local ok = check_end_portal_frame(pointed_thing.under) if ok then - end_portal_area(ppos) if minetest.get_modpath("doc") then doc.mark_entry_as_revealed(user:get_player_name(), "nodes", "mcl_portals:portal_end") end