7 Commits

3 changed files with 11 additions and 6 deletions

View File

@ -51,8 +51,8 @@ nether.useBiomes = minetest.get_mapgen_setting("mg_name") ~= "v6" and minet
-- Settings -- Settings
nether.DEPTH_CEILING = -5000 -- The y location of the Nether's celing nether.DEPTH_CEILING = -25000 -- The y location of the Nether's celing
nether.DEPTH_FLOOR = -11000 -- The y location of the Nether's floor nether.DEPTH_FLOOR = -31000 -- The y location of the Nether's floor
nether.FASTTRAVEL_FACTOR = 8 -- 10 could be better value for Minetest, since there's no sprint, but ex-Minecraft players will be mathing for 8 nether.FASTTRAVEL_FACTOR = 8 -- 10 could be better value for Minetest, since there's no sprint, but ex-Minecraft players will be mathing for 8
nether.PORTAL_BOOK_LOOT_WEIGHTING = 0.9 -- Likelyhood of finding the Book of Portals (guide) in dungeon chests. Set to 0 to disable. nether.PORTAL_BOOK_LOOT_WEIGHTING = 0.9 -- Likelyhood of finding the Book of Portals (guide) in dungeon chests. Set to 0 to disable.
nether.NETHER_REALM_ENABLED = true -- Setting to false disables the Nether and Nether portal nether.NETHER_REALM_ENABLED = true -- Setting to false disables the Nether and Nether portal

View File

@ -503,4 +503,4 @@ end
-- if a biome defines the dungeon nodes -- if a biome defines the dungeon nodes
minetest.set_gen_notify({dungeon = true}) minetest.set_gen_notify({dungeon = true})
minetest.register_on_generated(on_generated) minetest.register_on_generated(on_generated)

View File

@ -2169,18 +2169,23 @@ function nether.register_portal_ignition_item(item_name, ignition_failure_sound)
minetest.override_item(item_name, { minetest.override_item(item_name, {
on_place = function(stack, placer, pt) on_place = function(stack, placer, pt)
local node = minetest.get_node(pt.under)
local def = minetest.registered_nodes[node.name]
local done = false local done = false
if pt.under and nether.is_frame_node[minetest.get_node(pt.under).name] then
if pt.under and nether.is_frame_node[node.name] then
done = ignite_portal(pt.under, placer:get_player_name()) done = ignite_portal(pt.under, placer:get_player_name())
if done and not minetest.settings:get_bool("creative_mode") then if done and not minetest.settings:get_bool("creative_mode") then
stack:take_item() stack:take_item()
end end
elseif def and def.on_rightclick then
def.on_rightclick(pt.under, node, placer, stack, pt)
end end
if not done and ignition_failure_sound ~= nil then if not done and ignition_failure_sound ~= nil then
minetest.sound_play(ignition_failure_sound, {pos = pt.under, max_hear_distance = 10}) minetest.sound_play(ignition_failure_sound, {pos = pt.under, max_hear_distance = 10})
end end
return stack return stack
end, end,
}) })
@ -2388,4 +2393,4 @@ function nether.find_nearest_working_portal(portal_name, anchorPos, distance_lim
end end
end end
return nil return nil
end end