2020-01-08 10:06:00 +01:00
|
|
|
--[[
|
|
|
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
]]--
|
|
|
|
|
2020-01-06 12:21:15 +01:00
|
|
|
local S = nether.get_translator
|
|
|
|
|
2020-01-08 10:06:00 +01:00
|
|
|
-- Portal/wormhole node
|
2019-08-06 23:23:06 +02:00
|
|
|
|
2020-01-08 10:06:00 +01:00
|
|
|
nether.register_wormhole_node("nether:portal", {
|
2020-01-06 12:21:15 +01:00
|
|
|
description = S("Nether Portal"),
|
2019-08-06 23:23:06 +02:00
|
|
|
post_effect_color = {
|
|
|
|
-- post_effect_color can't be changed dynamically in Minetest like the portal colour is.
|
2020-01-08 11:37:31 +01:00
|
|
|
-- If you need a different post_effect_color then use register_wormhole_node to create
|
2020-01-08 10:06:00 +01:00
|
|
|
-- another wormhole node and set it as the wormhole_node_name in your portaldef.
|
2019-08-06 23:23:06 +02:00
|
|
|
-- Hopefully this colour is close enough to magenta to work with the traditional magenta
|
|
|
|
-- portals, close enough to red to work for a red portal, and also close enough to red to
|
|
|
|
-- work with blue & cyan portals - since blue portals are sometimes portrayed as being red
|
|
|
|
-- from the opposite side / from the inside.
|
|
|
|
a = 160, r = 128, g = 0, b = 80
|
2020-01-08 10:06:00 +01:00
|
|
|
}
|
2019-08-06 23:23:06 +02:00
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
-- Nether nodes
|
|
|
|
|
|
|
|
minetest.register_node("nether:rack", {
|
2020-01-06 12:21:15 +01:00
|
|
|
description = S("Netherrack"),
|
2019-08-06 23:23:06 +02:00
|
|
|
tiles = {"nether_rack.png"},
|
|
|
|
is_ground_content = true,
|
|
|
|
groups = {cracky = 3, level = 2},
|
|
|
|
sounds = default.node_sound_stone_defaults(),
|
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_node("nether:sand", {
|
2020-01-06 12:21:15 +01:00
|
|
|
description = S("Nethersand"),
|
2019-08-06 23:23:06 +02:00
|
|
|
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", {
|
2020-01-06 12:21:15 +01:00
|
|
|
description = S("Glowstone"),
|
2019-08-06 23:23:06 +02:00
|
|
|
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", {
|
2020-01-06 12:21:15 +01:00
|
|
|
description = S("Nether Brick"),
|
2019-08-06 23:23:06 +02:00
|
|
|
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", {
|
2020-01-06 12:21:15 +01:00
|
|
|
description = S("Nether Brick Fence"),
|
2019-08-06 23:23:06 +02:00
|
|
|
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"},
|
2020-01-06 12:21:15 +01:00
|
|
|
S("Nether stair"),
|
|
|
|
S("Nether slab"),
|
2019-08-06 23:23:06 +02:00
|
|
|
default.node_sound_stone_defaults()
|
|
|
|
)
|
|
|
|
|
|
|
|
-- StairsPlus
|
|
|
|
|
|
|
|
if minetest.get_modpath("moreblocks") then
|
|
|
|
stairsplus:register_all(
|
|
|
|
"nether", "brick", "nether:brick", {
|
2020-01-06 12:21:15 +01:00
|
|
|
description = S("Nether Brick"),
|
2019-08-06 23:23:06 +02:00
|
|
|
groups = {cracky = 2, level = 2},
|
|
|
|
tiles = {"nether_brick.png"},
|
|
|
|
sounds = default.node_sound_stone_defaults(),
|
|
|
|
})
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
-- 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"},
|
|
|
|
},
|
|
|
|
})
|
|
|
|
|
|
|
|
|