-- =================================================================== -- This is a fork of Poikilos's fork of "nether". It provides "nether" -- materials and also live-portal code, but the latter is disabled un- -- less the following config-file setting is used: -- -- enable_nether_portal = true -- =================================================================== --[[ Nether mod for minetest Copyright (C) 2013 PilzAdam Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ]]-- -- =================================================================== local modname = minetest.get_current_modname() local modpath = minetest.get_modpath (modname) local enable_nether_portal = minetest.setting_getbool ("enable_nether_portal") -- =================================================================== -- handle live portals -- =================================================================== if enable_nether_portal then dofile (modpath .. "/portal.lua") end -- =================================================================== -- just the materials -- =================================================================== -- Nodes minetest.register_node ("nether:portal", { description = "Nether Portal", tiles = { "nether_transparent.png", "nether_transparent.png", "nether_transparent.png", "nether_transparent.png", { name = "nether_portal.png", animation = { type = "vertical_frames", aspect_w = 16, aspect_h = 16, length = 0.5, }, }, { name = "nether_portal.png", animation = { type = "vertical_frames", aspect_w = 16, aspect_h = 16, length = 0.5, }, }, }, drawtype = "nodebox", paramtype = "light", paramtype2 = "facedir", sunlight_propagates = true, use_texture_alpha = true, walkable = false, diggable = false, pointable = false, buildable_to = false, is_ground_content = false, drop = "", light_source = 5, post_effect_color = {a = 180, r = 128, g = 0, b = 128}, alpha = 192, node_box = { type = "fixed", fixed = { {-0.5, -0.5, -0.1, 0.5, 0.5, 0.1}, }, }, groups = {not_in_creative_inventory = 1} }) minetest.register_node ("nether:rack", { description = "Netherrack", tiles = {"nether_rack.png"}, is_ground_content = true, groups = {cracky = 3, level = 2}, sounds = default.node_sound_stone_defaults(), }) minetest.register_node ("nether:sand", { description = "Nethersand", tiles = {"nether_sand.png"}, is_ground_content = true, groups = {crumbly = 3, level = 2, falling_node = 1}, sounds = default.node_sound_gravel_defaults ({ footstep = {name = "default_gravel_footstep", gain = 0.45}, }), }) minetest.register_node ("nether:glowstone", { description = "Nether Glowstone", tiles = {"nether_glowstone.png"}, is_ground_content = true, light_source = 14, paramtype = "light", groups = {cracky = 3, oddly_breakable_by_hand = 3}, sounds = default.node_sound_glass_defaults(), }) minetest.register_node ("nether:block", { description = "Nether Block", tiles = {"nether_glowstone.png"}, is_ground_content = true, light_source = 14, paramtype = "light", groups = {cracky = 3, oddly_breakable_by_hand = 3}, sounds = default.node_sound_glass_defaults(), }) minetest.register_node ("nether:brick", { description = "Nether Brick", tiles = {"nether_brick.png"}, is_ground_content = false, groups = {cracky = 2, level = 2}, sounds = default.node_sound_stone_defaults(), }) local fence_texture = "default_fence_overlay.png^nether_brick.png^default_fence_overlay.png^[makealpha:255,126,126" minetest.register_node ("nether:fence_nether_brick", { description = "Nether Brick Fence", drawtype = "fencelike", tiles = {"nether_brick.png"}, inventory_image = fence_texture, wield_image = fence_texture, paramtype = "light", sunlight_propagates = true, is_ground_content = false, selection_box = { type = "fixed", fixed = {-1/7, -1/2, -1/7, 1/7, 1/2, 1/7}, }, groups = {cracky = 2, level = 2}, sounds = default.node_sound_stone_defaults(), }) -- Register stair and slab stairs.register_stair_and_slab ( "nether_brick", "nether:brick", {cracky = 2, level = 2}, {"nether_brick.png"}, "nether stair", "nether slab", default.node_sound_stone_defaults() ) -- StairsPlus if minetest.get_modpath ("moreblocks") then stairsplus:register_all ( "nether", "brick", "nether:brick", { description = "Nether Brick", groups = {cracky = 2, level = 2}, tiles = {"nether_brick.png"}, sounds = default.node_sound_stone_defaults(), }) end stairs.register_stair_and_slab ("nether_brick", "nether:brick", {cracky=3, oddly_breakable_by_hand=1}, {"nether_brick.png"}, "nether stair", "nether slab", default.node_sound_stone_defaults()) -- Crafting minetest.register_craft ({ output = "nether:brick 4", recipe = { {"nether:rack", "nether:rack"}, {"nether:rack", "nether:rack"}, } }) minetest.register_craft ({ output = "nether:fence_nether_brick 6", recipe = { {"nether:brick", "nether:brick", "nether:brick"}, {"nether:brick", "nether:brick", "nether:brick"}, }, })