mirror of
https://github.com/minetest-mods/nether.git
synced 2025-07-16 23:30:41 +02:00
Compare commits
7 Commits
master
...
281d6fc07f
Author | SHA1 | Date | |
---|---|---|---|
281d6fc07f | |||
97cf3250e4 | |||
c0481ea4ca | |||
3577fd1f5e | |||
9ab325fa8c | |||
9e3d5bf997 | |||
c5ef9136ec |
4
init.lua
4
init.lua
@ -51,8 +51,8 @@ nether.useBiomes = minetest.get_mapgen_setting("mg_name") ~= "v6" and minet
|
||||
|
||||
|
||||
-- Settings
|
||||
nether.DEPTH_CEILING = -5000 -- The y location of the Nether's celing
|
||||
nether.DEPTH_FLOOR = -11000 -- The y location of the Nether's floor
|
||||
nether.DEPTH_CEILING = -25000 -- The y location of the Nether's celing
|
||||
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.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
|
||||
|
@ -503,4 +503,4 @@ end
|
||||
-- if a biome defines the dungeon nodes
|
||||
minetest.set_gen_notify({dungeon = true})
|
||||
|
||||
minetest.register_on_generated(on_generated)
|
||||
minetest.register_on_generated(on_generated)
|
||||
|
@ -2169,18 +2169,23 @@ function nether.register_portal_ignition_item(item_name, ignition_failure_sound)
|
||||
|
||||
minetest.override_item(item_name, {
|
||||
on_place = function(stack, placer, pt)
|
||||
local node = minetest.get_node(pt.under)
|
||||
local def = minetest.registered_nodes[node.name]
|
||||
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())
|
||||
if done and not minetest.settings:get_bool("creative_mode") then
|
||||
stack:take_item()
|
||||
end
|
||||
elseif def and def.on_rightclick then
|
||||
def.on_rightclick(pt.under, node, placer, stack, pt)
|
||||
end
|
||||
|
||||
if not done and ignition_failure_sound ~= nil then
|
||||
minetest.sound_play(ignition_failure_sound, {pos = pt.under, max_hear_distance = 10})
|
||||
end
|
||||
|
||||
|
||||
return stack
|
||||
end,
|
||||
})
|
||||
@ -2388,4 +2393,4 @@ function nether.find_nearest_working_portal(portal_name, anchorPos, distance_lim
|
||||
end
|
||||
end
|
||||
return nil
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user