mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-18 00:51:06 +01:00
Disable Nether portals in the End
This commit is contained in:
parent
69ade14509
commit
526217a21b
1 changed files with 6 additions and 1 deletions
|
@ -288,6 +288,11 @@ end
|
||||||
-- If no Nether portal can be lit, nothing happens.
|
-- If no Nether portal can be lit, nothing happens.
|
||||||
-- Returns true on success and false on failure.
|
-- Returns true on success and false on failure.
|
||||||
function mcl_portals.light_nether_portal(pos)
|
function mcl_portals.light_nether_portal(pos)
|
||||||
|
-- Only allow to make portals in Overworld and Nether
|
||||||
|
local _, dim = mcl_util.y_to_layer(pos.y)
|
||||||
|
if dim ~= "overworld" and dim ~= "nether" then
|
||||||
|
return false
|
||||||
|
end
|
||||||
-- Create Nether portal nodes
|
-- Create Nether portal nodes
|
||||||
local p1, p2 = is_portal(pos)
|
local p1, p2 = is_portal(pos)
|
||||||
if not p1 or not p2 then
|
if not p1 or not p2 then
|
||||||
|
@ -449,7 +454,7 @@ minetest.register_abm({
|
||||||
|
|
||||||
local longdesc = minetest.registered_nodes["mcl_core:obsidian"]._doc_items_longdesc
|
local longdesc = minetest.registered_nodes["mcl_core:obsidian"]._doc_items_longdesc
|
||||||
longdesc = longdesc .. "\n" .. "Obsidian is also used as the frame of Nether portals."
|
longdesc = longdesc .. "\n" .. "Obsidian is also used as the frame of Nether portals."
|
||||||
local usagehelp = "To open a Nether portal, place an upright frame of obsidian with a width of 4 blocks and a height of 5 blocks, leaving only air in the center. After placing this frame, light a fire in the obsidian frame."
|
local usagehelp = "To open a Nether portal, place an upright frame of obsidian with a width of 4 blocks and a height of 5 blocks, leaving only air in the center. After placing this frame, light a fire in the obsidian frame. Nether portals only work in the Overworld and the Nether."
|
||||||
|
|
||||||
minetest.override_item("mcl_core:obsidian", {
|
minetest.override_item("mcl_core:obsidian", {
|
||||||
_doc_items_longdesc = longdesc,
|
_doc_items_longdesc = longdesc,
|
||||||
|
|
Loading…
Reference in a new issue