forked from mtcontrib/nether-pack
Helper functions for other mods and an obsidian portal bugfix (#15)
* The obsidian portal is the first way for a player to reach the nether, so if damage is enabled and `nether.trap_players` is disabled, the obsidian portal should teleport the player instead of killing him/her since after death he/she respawns in the overworld and not in the nether. A small change in `obsi_teleport_player` fixes this problem. Fixes #16. * There exist other mods which need to check if players are in the nether and teleport them to/from the nether, so we add four helper functions: `nether.is_player_in_nether`, `nether.is_player_trapped_in_nether`. `nether.external_nether_teleport` and `nether.registry_update`. Fixes #14. * Add the `in_hell`, `trapped_in_hell` and `update_hells_registry` chat commands, which can be used for debugging * `players_in_nether` has no meaningful effect if `nether.trap_players` is disabled, so we rename it to `players_trapped_in_nether`. * Add `nether.bottom`, which approximately corresponds to the lower end of the nether
This commit is contained in:
@ -52,6 +52,9 @@ nether.start = f_h_max+100
|
||||
-- Height of the nether (bottom of the nether is nether_middle - NETHER_HEIGHT)
|
||||
local NETHER_HEIGHT = 30
|
||||
|
||||
-- bottom height of the nether.
|
||||
nether.bottom = nether_middle - NETHER_HEIGHT - 100
|
||||
|
||||
-- Maximum amount of randomness in the map generation
|
||||
local NETHER_RANDOM = 2
|
||||
|
||||
|
Reference in New Issue
Block a user