forked from minetest-mods/nether
Compare commits
1 Commits
ddd27690eb
...
v3
Author | SHA1 | Date | |
---|---|---|---|
1fbab7451e |
11
README.md
11
README.md
@ -1,8 +1,8 @@
|
|||||||
# Nether Mod for Minetest, with Portals API.
|
# Nether Mod for Minetest, with Portals API.
|
||||||
|
|
||||||
Enables Nether portals to be built, opening a gateway between the surface
|
Allows Nether portals to be constructed, opening a gateway between the surface
|
||||||
realm and one of lava and netherrack, with rumors of a passageway to a great
|
realm and one of lava and netherrack, with rumors of a passageway through the
|
||||||
magma ocean.
|
netherrack to a great magma ocean.
|
||||||
|
|
||||||
To view the options provided by this mod, see settingtypes.txt or
|
To view the options provided by this mod, see settingtypes.txt or
|
||||||
go to "Settings"->"All Settings"->"Mods"->"nether" in the game.
|
go to "Settings"->"All Settings"->"Mods"->"nether" in the game.
|
||||||
@ -23,6 +23,11 @@ might need to be constructed from basalt, thus requiring a journey through
|
|||||||
the nether first, or basalt might be a crafting ingredient required to reach
|
the nether first, or basalt might be a crafting ingredient required to reach
|
||||||
a particular branch of the tech-tree.
|
a particular branch of the tech-tree.
|
||||||
|
|
||||||
|
Netherbrick tools are provided (pick, shovel, axe, & sword), see tools.lua
|
||||||
|
|
||||||
|
Nether Portals can allow surface fast-travel.
|
||||||
|
|
||||||
|
|
||||||
## License of source code:
|
## License of source code:
|
||||||
|
|
||||||
Copyright (C) 2013 PilzAdam
|
Copyright (C) 2013 PilzAdam
|
||||||
|
4
init.lua
4
init.lua
@ -51,8 +51,8 @@ nether.useBiomes = minetest.get_mapgen_setting("mg_name") ~= "v6" and minet
|
|||||||
|
|
||||||
|
|
||||||
-- Settings
|
-- Settings
|
||||||
nether.DEPTH_CEILING = -25000 -- The y location of the Nether's celing
|
nether.DEPTH_CEILING = -5000 -- The y location of the Nether's celing
|
||||||
nether.DEPTH_FLOOR = -31000 -- The y location of the Nether's floor
|
nether.DEPTH_FLOOR = -11000 -- 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
|
||||||
|
@ -2169,23 +2169,18 @@ 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,
|
||||||
})
|
})
|
||||||
|
Reference in New Issue
Block a user