mirror of
https://git.minetest.land/Mineclonia/Mineclonia.git
synced 2024-11-16 04:45:04 +00:00
Add end portal frame with eye into creative inv.
This commit is contained in:
parent
bf37c06de4
commit
f62f627443
1 changed files with 9 additions and 4 deletions
|
@ -309,7 +309,7 @@ minetest.register_node("mcl_portals:end_portal_frame", {
|
||||||
minetest.register_node("mcl_portals:end_portal_frame_eye", {
|
minetest.register_node("mcl_portals:end_portal_frame_eye", {
|
||||||
description = "End Portal Frame with Eye of Ender",
|
description = "End Portal Frame with Eye of Ender",
|
||||||
_doc_items_create_entry = false,
|
_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" },
|
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",
|
paramtype2 = "facedir",
|
||||||
drawtype = "nodebox",
|
drawtype = "nodebox",
|
||||||
|
@ -331,6 +331,12 @@ minetest.register_node("mcl_portals:end_portal_frame_eye", {
|
||||||
end_portal_area(ppos, true)
|
end_portal_area(ppos, true)
|
||||||
end
|
end
|
||||||
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,
|
on_rotate = rotate_frame_eye,
|
||||||
|
|
||||||
|
@ -358,7 +364,7 @@ minetest.override_item("mcl_end:ender_eye", {
|
||||||
|
|
||||||
-- Place eye of ender into end portal frame
|
-- Place eye of ender into end portal frame
|
||||||
if pointed_thing.under and node.name == "mcl_portals:end_portal_frame" then
|
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
|
if minetest.get_modpath("doc") then
|
||||||
doc.mark_entry_as_revealed(user:get_player_name(), "nodes", "mcl_portals:end_portal_frame")
|
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
|
itemstack:take_item() -- 1 use
|
||||||
end
|
end
|
||||||
|
|
||||||
local ok, ppos = check_end_portal_frame(pointed_thing.under)
|
local ok = check_end_portal_frame(pointed_thing.under)
|
||||||
if ok then
|
if ok then
|
||||||
end_portal_area(ppos)
|
|
||||||
if minetest.get_modpath("doc") then
|
if minetest.get_modpath("doc") then
|
||||||
doc.mark_entry_as_revealed(user:get_player_name(), "nodes", "mcl_portals:portal_end")
|
doc.mark_entry_as_revealed(user:get_player_name(), "nodes", "mcl_portals:portal_end")
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue