lapis-cd2025/init.lua

104 lines
2.3 KiB
Lua
Raw Normal View History

2016-08-28 10:21:07 +02:00
-- mods/lapis/init.lua
-- ===================
-- See LICENSE.txt for licensing and README.md for other information.
2017-02-20 17:03:38 +01:00
-- load support for intllib
local modpath = minetest.get_modpath(minetest.get_current_modname())
local S = minetest.get_translator("lapis")
2017-02-20 17:03:38 +01:00
2017-02-20 18:10:44 +01:00
-- Lapis Lazuli Ore
2016-08-28 10:21:07 +02:00
minetest.register_node("lapis:stone_with_lapis", {
2017-02-20 17:03:38 +01:00
description = S("Lapis Lazuli Ore"),
tiles = {"default_stone.png^lapis_mineral_lapislazuli.png"},
2016-08-28 10:21:07 +02:00
is_ground_content = true,
groups = {cracky=2},
drop = {
max_items = 5,
items = {
{
items = {'lapis:lapis 2'}, --The first and second drops ever
},
{
items = {'lapis:lapis'}, --The 3rd drops with a 1/2 chance
rarity = 2,
},
{
items = {'lapis:lapis'}, --The 4th drops with a 1/3 chance
rarity = 3,
},
{
items = {'lapis:lapis'}, --The 5th drops with a 1/8 chance
rarity = 8,
},
}
},
sounds = default.node_sound_stone_defaults(),
})
2017-02-20 18:10:44 +01:00
-- Lapis Item
2016-08-28 10:21:07 +02:00
minetest.register_craftitem("lapis:lapis", {
2017-02-20 17:03:38 +01:00
description = S("Lapis Lazuli"),
inventory_image = "lapis_lapislazuli.png",
2016-08-28 10:21:07 +02:00
})
2017-02-20 18:10:44 +01:00
-- Lapis Block
2016-08-28 10:21:07 +02:00
minetest.register_node("lapis:lapisblock", {
2017-02-20 17:03:38 +01:00
description = S("Lapis Lazuli Block"),
tiles = {"lapis_lapislazuliblock.png"},
2016-08-28 10:21:07 +02:00
is_ground_content = true,
groups = {cracky = 1, level = 2},
2016-08-28 10:21:07 +02:00
sounds = default.node_sound_stone_defaults(),
})
2017-02-20 18:10:44 +01:00
-- Lapis Block Crafting
2016-08-28 10:21:07 +02:00
minetest.register_craft({
output = 'lapis:lapisblock',
recipe = {
{'lapis:lapis', 'lapis:lapis', 'lapis:lapis'},
{'lapis:lapis', 'lapis:lapis', 'lapis:lapis'},
{'lapis:lapis', 'lapis:lapis', 'lapis:lapis'},
}
})
2017-02-20 18:10:44 +01:00
-- Lapis Items from Lapis Block Crafting
2016-08-28 10:21:07 +02:00
minetest.register_craft({
output = 'lapis:lapis 9',
recipe = {
{'lapis:lapisblock'},
}
})
2017-02-20 18:10:44 +01:00
-- Ore generation
-- -128 <-> -255
2016-08-28 10:21:07 +02:00
minetest.register_ore({
ore_type = "scatter",
ore = "lapis:stone_with_lapis",
wherein = "default:stone",
clust_scarcity = 16 * 16 * 16,
clust_num_ores = 5,
clust_size = 3,
height_min = -255,
height_max = -128,
})
2017-02-20 18:10:44 +01:00
-- -256 <-> -31000
2016-08-28 10:21:07 +02:00
minetest.register_ore({
ore_type = "scatter",
ore = "lapis:stone_with_lapis",
wherein = "default:stone",
clust_scarcity = 15 * 15 * 15,
clust_num_ores = 6,
clust_size = 4,
height_min = -31000,
height_max = -256,
})
2017-02-20 18:10:44 +01:00
-- Blue dye crafting
2016-08-28 10:21:07 +02:00
minetest.register_craft({
output = 'dye:blue 2',
recipe = {
{'lapis:lapis'},
}
})