1
0
mirror of https://github.com/sys4-fr/server-nalc.git synced 2024-12-24 17:50:37 +01:00

Move our [default] edits to mff_classic, alias nodes

This commit is contained in:
Dorian Wouters 2016-08-20 21:19:10 +02:00
parent 6d5a0d1056
commit 5f17957058
No known key found for this signature in database
GPG Key ID: 6E9DA8063322434B
63 changed files with 837 additions and 846 deletions

View File

@ -39,8 +39,6 @@ minetest.register_alias("locked_chest", "default:chest_locked")
minetest.register_alias("cobble", "default:cobble")
minetest.register_alias("mossycobble", "default:mossycobble")
minetest.register_alias("steelblock", "default:steelblock")
minetest.register_alias("nyancat", "default:nyancat")
minetest.register_alias("nyancat_rainbow", "default:nyancat_rainbow")
minetest.register_alias("sapling", "default:sapling")
minetest.register_alias("apple", "default:apple")
@ -77,26 +75,3 @@ minetest.register_alias("default:pinewood", "default:pine_wood")
minetest.register_alias("default:ladder", "default:ladder_wood")
minetest.register_alias("default:sign_wall", "default:sign_wall_wood")
-- Those lines are for moreores integration
minetest.register_alias("moreores:pick_silver", "default:pick_silver")
minetest.register_alias("moreores:pick_mithril", "default:pick_mithril")
minetest.register_alias("moreores:shovel_silver", "default:shovel_silver")
minetest.register_alias("moreores:shovel_mithril", "default:shovel_mithril")
minetest.register_alias("moreores:axe_silver", "default:axe_silver")
minetest.register_alias("moreores:axe_mithril", "default:axe_mithril")
minetest.register_alias("moreores:sword_silver", "default:sword_silver")
minetest.register_alias("moreores:sword_mithril", "default:sword_mithril")
minetest.register_alias("moreores:mineral_silver", "default:stone_with_silver")
minetest.register_alias("moreores:mineral_tin", "default:stone_with_tin")
minetest.register_alias("moreores:mineral_mithril", "default:stone_with_mithril")
minetest.register_alias("moreores:mithril_ingot", "default:mithril_ingot")
minetest.register_alias("moreores:silver_ingot", "default:silver_ingot")
minetest.register_alias("moreores:tin_ingot", "default:tin_ingot")
minetest.register_alias("moreores:mithril_lump", "default:mithril_lump")
minetest.register_alias("moreores:silver_lump", "default:silver_lump")
minetest.register_alias("moreores:tin_lump", "default:tin_lump")
minetest.register_alias("moreores:mithril_block", "default:mithrilblock")
minetest.register_alias("moreores:silver_block", "default:silverblock")
minetest.register_alias("moreores:tin_block", "default:tinblock")

View File

@ -126,6 +126,7 @@ minetest.register_abm({
--
-- optimized helper to put all items in an inventory into a drops list
--
function default.get_inventory_drops(pos, inventory, drops)
local inv = minetest.get_meta(pos):get_inventory()
local n = #drops
@ -230,6 +231,7 @@ end
--
-- Fence registration helper
--
function default.register_fence(name, def)
minetest.register_craft({
output = name .. " 4",
@ -306,6 +308,8 @@ default.after_place_leaves = function(pos, placer, itemstack, pointed_thing)
end
end
-- Leafdecay ABM
minetest.register_abm({
label = "Leaf decay",
nodenames = {"group:leafdecay"},
@ -446,6 +450,7 @@ minetest.register_abm({
end
})
--
-- Grass and dry grass removed in darkness
--

View File

@ -301,150 +301,6 @@ function default.register_ores()
flags = "absheight",
})
-- Beware of Meze
minetest.register_ore({
ore_type = "scatter",
ore = "default:meze",
wherein = "default:stone",
clust_scarcity = 40 * 40 * 40,
clust_num_ores = 3,
clust_size = 2,
y_min = 0,
y_max = 64,
flags = "absheight",
})
minetest.register_ore({
ore_type = "scatter",
ore = "default:meze",
wherein = "default:desert_stone",
clust_scarcity = 40 * 40 * 40,
clust_num_ores = 3,
clust_size = 2,
y_min = 0,
y_max = 64,
flags = "absheight",
})
-- Tin
minetest.register_ore({
ore_type = "scatter",
ore = "default:stone_with_tin",
wherein = "default:stone",
clust_scarcity = 7 * 7 * 7,
clust_num_ores = 3,
clust_size = 7,
y_min = -31000,
y_max = 12,
})
minetest.register_ore({
ore_type = "scatter",
ore = "default:desert_stone_with_tin",
wherein = "default:desert_stone",
clust_scarcity = 7 * 7 * 7,
clust_num_ores = 3,
clust_size = 7,
y_min = -31000,
y_max = 12,
})
-- Silver
minetest.register_ore({
ore_type = "scatter",
ore = "default:stone_with_silver",
wherein = "default:stone",
clust_scarcity = 11 * 11 * 11,
clust_num_ores = 4,
clust_size = 11,
y_min = -31000,
y_max = -12,
})
minetest.register_ore({
ore_type = "scatter",
ore = "default:desert_stone_with_silver",
wherein = "default:desert_stone",
clust_scarcity = 11 * 11 * 11,
clust_num_ores = 4,
clust_size = 11,
y_min = -31000,
y_max = -12,
})
-- Mithril
minetest.register_ore({
ore_type = "scatter",
ore = "default:stone_with_mithril",
wherein = "default:stone",
clust_scarcity = 11 * 11 * 11,
clust_num_ores = 1,
clust_size = 11,
y_min = -31000,
y_max = -1024,
})
minetest.register_ore({
ore_type = "scatter",
ore = "default:stone_with_mithril",
wherein = "default:stone",
clust_scarcity = 15 * 15 * 15,
clust_num_ores = 2,
clust_size = 3,
y_min = -31000,
y_max = -2048,
})
minetest.register_ore({
ore_type = "scatter",
ore = "default:stone_with_mithril",
wherein = "default:stone",
clust_scarcity = 22 * 22 * 22,
clust_num_ores = 5,
clust_size = 5,
y_min = -31000,
y_max = -4096,
})
minetest.register_ore({
ore_type = "scatter",
ore = "default:stone_with_mithril",
wherein = "default:stone",
clust_scarcity = 28 * 28 * 28,
clust_num_ores = 20,
clust_size = 7,
y_min = -31000,
y_max = -12288,
})
-- Gold
minetest.register_ore({
ore_type = "scatter",
ore = "default:stone_with_gold",
wherein = "default:stone",
clust_scarcity = 15 * 15 * 15,
clust_num_ores = 3,
clust_size = 2,
y_min = -255,
y_max = -64,
})
minetest.register_ore({
ore_type = "scatter",
ore = "default:stone_with_gold",
wherein = "default:stone",
clust_scarcity = 13 * 13 * 13,
clust_num_ores = 5,
clust_size = 3,
y_min = -30000,
y_max = -256,
})
-- Diamond
@ -516,20 +372,6 @@ function default.register_ores()
y_max = -64,
})
-- Gold Coins
minetest.register_ore({
ore_type = "scatter",
ore = "default:stone_with_coin",
wherein = "default:stone",
clust_scarcity = 26 * 26 * 26,
clust_num_ores = 1,
clust_size = 1,
y_min = -30000,
y_max = 0,
flags = "absheight",
})
-- Super Apples
minetest.register_ore({

View File

@ -32,7 +32,6 @@ default:sandstonebrick
default:sandstone_block
default:obsidian
default:obsidian_cooled
default:obsidianbrick
default:obsidian_block
@ -52,7 +51,6 @@ default:desert_sand
default:gravel
default:clay
default:clay_burned
default:snow
default:snowblock
@ -89,52 +87,29 @@ default:aspen_wood
default:aspen_leaves
default:aspen_sapling
default:cherry_tree
default:cherry_log
default:cherry_plank
default:cherry_blossom_leaves
default:cherry_leaves_deco
Ores
----
(1. In stone 2. Blocks)
default:stone_with_coal
default:desert_stone_with_coal
default:coalblock
default:stone_with_iron
default:steelblock
default:stone_with_copper
default:desert_stone_with_copper
default:copperblock
default:stone_with_tin
default:desert_stone_with_tin
default:tinblock
default:bronzeblock
default:stone_with_silver
default:desert_stone_with_silver
default:silverblock
default:stone_with_mithril
default:mithrilblock
default:stone_with_gold
default:goldblock
default:stone_with_mese
default:mese
default:meze
default:stone_with_diamond
default:diamondblock
default:stone_with_coin
Plantlife (non-cubic)
---------------------
@ -168,12 +143,6 @@ default:river_water_flowing
default:lava_source
default:lava_flowing
default:acid_source
default:acid_flowing
default:sand_source
default:sand_flowing
Tools / "Advanced" crafting / Non-"natural"
-------------------------------------------
@ -189,17 +158,12 @@ default:sign_wall_steel
default:ladder_wood
default:ladder_steel
default:ladder_obsidian
default:fence_wood
default:fence_acacia_wood
default:fence_junglewood
default:fence_pine_wood
default:fence_aspen_wood
default:fence_cobble
default:fence_desert_cobble
default:fence_steelblock
default:fence_brick
default:glass
default:obsidian_glass
@ -214,8 +178,6 @@ Misc
----
default:cloud
default:nyancat
default:nyancat_rainbow
--]]
@ -240,15 +202,6 @@ minetest.register_node("default:cobble", {
sounds = default.node_sound_stone_defaults(),
})
minetest.register_node("default:cobble_cooled", {
description = "Cobblestone (cooled)",
tiles = {"default_cobble.png"},
is_ground_content = true,
drop = "default:cobble",
groups = {cracky = 3, stone = 2},
sounds = default.node_sound_stone_defaults(),
})
minetest.register_node("default:stonebrick", {
description = "Stone Brick",
paramtype2 = "facedir",
@ -358,15 +311,6 @@ minetest.register_node("default:obsidian", {
groups = {cracky = 1, level = 2},
})
minetest.register_node("default:obsidian_cooled", {
description = "Obsidian (cooled)",
tiles = {"default_obsidian.png"},
is_ground_content = true,
drop = "default:obsidian",
sounds = default.node_sound_stone_defaults(),
groups = {cracky = 1, level = 2},
})
minetest.register_node("default:obsidianbrick", {
description = "Obsidian Brick",
paramtype2 = "facedir",
@ -510,15 +454,6 @@ minetest.register_node("default:clay", {
sounds = default.node_sound_dirt_defaults(),
})
minetest.register_node("default:clay_burned", {
description = "Burned Clay",
tiles = {"default_clay_burned.png"},
is_ground_content = true,
groups = {crumbly = 3},
drop = 'default:clay_lump 4',
sounds = default.node_sound_dirt_defaults(),
})
minetest.register_node("default:snow", {
description = "Snow",
@ -1014,94 +949,6 @@ minetest.register_node("default:aspen_sapling", {
end,
})
-- From BFD, cherry tree
minetest.register_node("default:cherry_tree", {
description = "Cherry Log",
tiles = {"default_cherry_top.png", "default_cherry_top.png", "default_cherry_tree.png"},
is_ground_content = false,
groups = {tree=1,choppy=2,oddly_breakable_by_hand=1,flammable=2},
sounds = default.node_sound_wood_defaults(),
drop = "default:cherry_log"
})
minetest.register_node("default:cherry_log", {
description = "Cherry Log",
tiles = {"default_cherry_top.png", "default_cherry_top.png", "default_cherry_tree.png"},
paramtype2 = "facedir",
is_ground_content = false,
groups = {choppy=2,oddly_breakable_by_hand=1,flammable=2},
sounds = default.node_sound_wood_defaults(),
on_place = minetest.rotate_node,
})
minetest.register_node("default:cherry_plank", {
description = "Cherry Planks",
tiles = {"default_wood_cherry_planks.png"},
sounds = default.node_sound_wood_defaults(),
groups = {oddly_breakable_by_hand=1, flammable=1, choppy=3, wood=1},
})
minetest.register_node("default:cherry_blossom_leaves", {
description = "Cherry Blossom Leaves",
drawtype = "allfaces_optional",
visual_scale = 1.3,
tiles = {"default_cherry_blossom_leaves.png"},
paramtype = "light",
waving = 1,
is_ground_content = false,
groups = {snappy=3, leafdecay=3, leafdecay_drop = 1, flammable=2, leaves=1},
drop = {
max_items = 1,
items = {
{
items = {'default:cherry_sapling'},
rarity = 32,
},
{
items = {'default:cherry_blossom_leaves'},
}
}
},
sounds = default.node_sound_leaves_defaults(),
on_place = function(itemstack, placer, pointed_thing)
-- place a random grass node
local stack = ItemStack("default:cherry_leaves_deco")
local ret = minetest.item_place(stack, placer, pointed_thing)
return ItemStack("default:cherry_blossom_leaves".." "..itemstack:get_count()-(1-ret:get_count()))
end,
})
minetest.register_node("default:cherry_leaves_deco", {
description = "Cherry Leaves",
drawtype = "allfaces_optional",
visual_scale = 1.3,
tiles = {"default_cherry_blossom_leaves.png"},
paramtype = "light",
waving=1,
is_ground_content = false,
groups = {snappy=3, flammable=2, leaves=1},
sounds = default.node_sound_leaves_defaults(),
drop = {'default:cherry_blossom_leaves'},
})
minetest.register_node("default:cherry_sapling", {
description = "Cherry Sapling",
waving = 1,
visual_scale = 1.0,
inventory_image = "default_cherry_sapling.png",
wield_image = "default_cherry_sapling.png",
drawtype = "plantlike",
paramtype = "light",
tiles = {"default_cherry_sapling.png"},
walkable = false,
selection_box = {
type = "fixed",
fixed = {-0.3, -0.5, -0.3, 0.3, 0.35, 0.3}
},
groups = {snappy = 2, dig_immediate = 3, flammable = 2,
attached_node = 1, sapling = 1},
sounds = default.node_sound_leaves_defaults(),
})
--
-- Ores
--
@ -1120,21 +967,6 @@ minetest.register_node("default:stone_with_coal", {
sounds = default.node_sound_stone_defaults(),
})
minetest.register_node("default:desert_stone_with_coal", {
description = "Coal Ore",
tiles = {"default_desert_stone.png^default_mineral_coal.png"},
is_ground_content = true,
groups = {crumbly = 1, cracky = 3},
drop = {
items = {
{items = {"default:desert_cobble"}},
{items = {"default:coal_lump"}},
{items = {"maptools:copper_coin"}},
},
},
sounds = default.node_sound_stone_defaults(),
})
minetest.register_node("default:coalblock", {
description = "Coal Block",
tiles = {"default_coal_block.png"},
@ -1182,21 +1014,6 @@ minetest.register_node("default:stone_with_copper", {
sounds = default.node_sound_stone_defaults(),
})
minetest.register_node("default:desert_stone_with_copper", {
description = "Copper Ore",
tiles = {"default_desert_stone.png^default_mineral_copper.png"},
is_ground_content = true,
groups = {crumbly = 1, cracky = 3},
drop = {
items = {
{items = {"default:desert_cobble"}},
{items = {"default:copper_lump"}},
{items = {"maptools:copper_coin 3"}},
},
},
sounds = default.node_sound_stone_defaults(),
})
minetest.register_node("default:copperblock", {
description = "Copper Block",
tiles = {"default_copper_block.png"},
@ -1213,81 +1030,6 @@ minetest.register_node("default:bronzeblock", {
sounds = default.node_sound_stone_defaults(),
})
minetest.register_node("default:stone_with_tin", {
description = "Tin Ore",
tiles = {"default_stone.png^default_mineral_tin.png"},
is_ground_content = true,
groups = {cracky = 3},
drop = {
items = {
{items = {"default:cobble"}},
{items = {"default:tin_lump"}},
{items = {"maptools:copper_coin 3"}},
},
},
sounds = default.node_sound_stone_defaults(),
})
minetest.register_node("default:desert_stone_with_tin", {
description = "Tin Ore",
tiles = {"default_desert_stone.png^default_mineral_tin.png"},
is_ground_content = true,
groups = {crumbly = 1, cracky = 3},
drop = {
items = {
{items = {"default:desert_cobble"}},
{items = {"default:tin_lump"}},
{items = {"maptools:copper_coin 3"}},
},
},
sounds = default.node_sound_stone_defaults(),
})
minetest.register_node("default:tinblock", {
description = "Tin Block",
tiles = {"default_tin_block.png"},
is_ground_content = false,
groups = {snappy = 1, bendy = 2, cracky = 1, melty = 2, level = 2},
sounds = default.node_sound_stone_defaults(),
})
minetest.register_node("default:stone_with_silver", {
description = "Silver Ore",
tiles = {"default_stone.png^default_mineral_silver.png"},
is_ground_content = true,
groups = {cracky = 3},
drop = {
items = {
{items = {"default:cobble"}},
{items = {"default:silver_lump"}},
{items = {"maptools:copper_coin 3"}},
},
},
sounds = default.node_sound_stone_defaults(),
})
minetest.register_node("default:desert_stone_with_silver", {
description = "Silver Ore",
tiles = {"default_desert_stone.png^default_mineral_silver.png"},
is_ground_content = true,
groups = {crumbly = 1, cracky = 3},
drop = {
items = {
{items = {"default:desert_cobble"}},
{items = {"default:silver_lump"}},
{items = {"maptools:copper_coin 3"}},
},
},
sounds = default.node_sound_stone_defaults(),
})
minetest.register_node("default:silverblock", {
description = "Silver Block",
tiles = {"default_silver_block.png"},
is_ground_content = false,
groups = {snappy = 1, bendy = 2, cracky = 1, melty = 2, level = 2},
sounds = default.node_sound_stone_defaults(),
})
minetest.register_node("default:stone_with_mese", {
description = "Mese Ore",
@ -1319,30 +1061,6 @@ minetest.register_node("default:mese", {
light_source = 3,
})
local function die_later(digger)
digger:set_hp(0)
end
minetest.register_node("default:meze", {
description = "Meze Block",
tiles = {"default_meze_block.png"},
is_ground_content = true,
drop = "",
groups = {cracky = 1, level = 2, fall_damage_add_percent = -75},
sounds = default.node_sound_wood_defaults(), -- Intended.
on_dig = function(pos, node, digger)
if digger and minetest.setting_getbool("enable_damage") and not minetest.setting_getbool("creative_mode") then
minetest.after(3, die_later, digger)
minetest.chat_send_player(digger:get_player_name(), "You feel like you did a mistake.")
minetest.node_dig(pos, node, digger)
elseif digger then
minetest.node_dig(pos, node, digger)
end
end,
})
minetest.register_alias("default:meze_block", "default:meze")
minetest.register_node("default:stone_with_gold", {
description = "Gold Ore",
@ -1366,28 +1084,6 @@ minetest.register_node("default:goldblock", {
sounds = default.node_sound_stone_defaults(),
})
minetest.register_node("default:stone_with_mithril", {
description = "Mithril Ore",
tiles = {"default_stone.png^default_mineral_mithril.png"},
is_ground_content = true,
groups = {cracky = 3},
drop = {
items = {
{items = {"default:cobble"}},
{items = {"default:mithril_lump"}},
{items = {"maptools:copper_coin 3"}},
},
},
sounds = default.node_sound_stone_defaults(),
})
minetest.register_node("default:mithrilblock", {
description = "Mithril Block",
tiles = {"default_mithril_block.png"},
is_ground_content = false,
groups = {snappy = 1, bendy = 2, cracky = 1, melty = 2, level = 2},
sounds = default.node_sound_stone_defaults(),
})
minetest.register_node("default:stone_with_diamond", {
description = "Diamond Ore",
@ -1411,21 +1107,6 @@ minetest.register_node("default:diamondblock", {
sounds = default.node_sound_defaults(),
})
minetest.register_node("default:stone_with_coin", {
description = "Stone with Coin",
tiles = {"default_stone.png^maptools_gold_coin.png"},
is_ground_content = true,
groups = {cracky = 3},
drop = {
items = {
{items = {"default:cobble"}},
{items = {"maptools:gold_coin"}},
},
},
sounds = default.node_sound_stone_defaults(),
})
--
-- Plantlife (non-cubic)
--
@ -1898,131 +1579,6 @@ minetest.register_node("default:lava_flowing", {
not_in_creative_inventory = 1},
})
minetest.register_node("default:acid_source", {
description = "Acid Source",
inventory_image = minetest.inventorycube("default_acid.png"),
drawtype = "liquid",
tiles = {
{name = "default_acid_source_animated.png", animation={type = "vertical_frames", aspect_w = 16, aspect_h = 16, length = 1.5}}
},
special_tiles = {
-- New-style acid source material (mostly unused)
{
name = "default_acid_source_animated.png",
animation = {type = "vertical_frames", aspect_w= 16, aspect_h = 16, length = 1.5},
backface_culling = false,
}
},
alpha = 160,
paramtype = "light",
walkable = false,
pointable = false,
diggable = false,
buildable_to = true,
drop = "",
drowning = 2,
liquidtype = "source",
liquid_alternative_flowing = "default:acid_flowing",
liquid_alternative_source = "default:acid_source",
liquid_viscosity = 1,
liquid_range = 4,
damage_per_second = 3,
post_effect_color = {a = 120, r = 50, g = 90, b = 30},
groups = {water = 3, acid = 3, liquid = 3, puts_out_fire = 1},
})
minetest.register_node("default:acid_flowing", {
description = "Flowing Acid",
inventory_image = minetest.inventorycube("default_acid.png"),
drawtype = "flowingliquid",
tiles = {"default_acid.png"},
special_tiles = {
{
image = "default_acid_flowing_animated.png",
backface_culling=false,
animation={type = "vertical_frames", aspect_w= 16, aspect_h = 16, length = 0.6}
},
{
image = "default_acid_flowing_animated.png",
backface_culling=true,
animation={type = "vertical_frames", aspect_w= 16, aspect_h = 16, length = 0.6}
},
},
alpha = 160,
paramtype = "light",
paramtype2 = "flowingliquid",
walkable = false,
pointable = false,
diggable = false,
buildable_to = true,
drop = "",
drowning = 2,
liquidtype = "flowing",
liquid_alternative_flowing = "default:acid_flowing",
liquid_alternative_source = "default:acid_source",
liquid_viscosity = 1,
liquid_range = 4,
damage_per_second = 3,
post_effect_color = {a = 120, r = 50, g = 90, b = 30},
groups = {water = 3, acid = 3, liquid = 3, puts_out_fire = 1, not_in_creative_inventory = 1},
})
minetest.register_node("default:sand_source", {
description = "Sand Source",
inventory_image = minetest.inventorycube("default_sand.png"),
drawtype = "liquid",
tiles = {"default_sand.png"},
alpha = 255,
paramtype = "light",
walkable = false,
pointable = false,
diggable = false,
buildable_to = true,
drop = "",
drowning = 4,
liquidtype = "source",
liquid_alternative_flowing = "default:sand_flowing",
liquid_alternative_source = "default:sand_source",
liquid_viscosity = 20,
liquid_renewable = false,
post_effect_color = {a = 250, r = 0, g = 0, b = 0},
groups = {liquid = 3},
})
minetest.register_node("default:sand_flowing", {
description = "Flowing Sand",
inventory_image = minetest.inventorycube("default_sand.png"),
drawtype = "flowingliquid",
tiles = {"default_sand.png"},
special_tiles = {
{
image = "default_sand_flowing_animated.png",
backface_culling=false,
animation={type = "vertical_frames", aspect_w= 16, aspect_h = 16, length = 0.6}
},
{
image = "default_sand_flowing_animated.png",
backface_culling=true,
animation={type = "vertical_frames", aspect_w= 16, aspect_h = 16, length = 0.6}
},
},
alpha = 255,
paramtype = "light",
paramtype2 = "flowingliquid",
walkable = false,
pointable = false,
diggable = false,
buildable_to = true,
drop = "",
drowning = 4,
liquidtype = "flowing",
liquid_alternative_flowing = "default:sand_flowing",
liquid_alternative_source = "default:sand_source",
liquid_viscosity = 20,
post_effect_color = {a = 250, r = 0, g = 0, b = 0},
groups = {liquid = 3, not_in_creative_inventory = 1},
})
--
-- Tools / "Advanced" crafting / Non-"natural"
--
@ -2386,28 +1942,6 @@ minetest.register_node("default:ladder_wood", {
sounds = default.node_sound_wood_defaults(),
})
minetest.register_node("default:ladder_obsidian", {
description = "Obsidian Ladder",
drawtype = "signlike",
tiles = {"default_ladder_obsidian.png"},
inventory_image = "default_ladder_obsidian.png",
wield_image = "default_ladder_obsidian.png",
paramtype = "light",
paramtype2 = "wallmounted",
sunlight_propagates = true,
walkable = false,
climbable = true,
is_ground_content = false,
selection_box = {
type = "wallmounted",
--wall_top = = <default>
--wall_bottom = = <default>
--wall_side = = <default>
},
groups = {cracky = 2},
sounds = default.node_sound_stone_defaults(),
})
minetest.register_node("default:ladder_steel", {
description = "Steel Ladder",
drawtype = "signlike",
@ -2433,6 +1967,8 @@ minetest.register_node("default:ladder_steel", {
default.register_fence("default:fence_wood", {
description = "Wooden Fence",
texture = "default_fence_wood.png",
inventory_image = "default_fence_overlay.png^default_wood.png^default_fence_overlay.png^[makealpha:255,126,126",
wield_image = "default_fence_overlay.png^default_wood.png^default_fence_overlay.png^[makealpha:255,126,126",
material = "default:wood",
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
sounds = default.node_sound_wood_defaults()
@ -2441,6 +1977,8 @@ default.register_fence("default:fence_wood", {
default.register_fence("default:fence_acacia_wood", {
description = "Acacia Fence",
texture = "default_fence_acacia_wood.png",
inventory_image = "default_fence_overlay.png^default_acacia_wood.png^default_fence_overlay.png^[makealpha:255,126,126",
wield_image = "default_fence_overlay.png^default_acacia_wood.png^default_fence_overlay.png^[makealpha:255,126,126",
material = "default:acacia_wood",
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
sounds = default.node_sound_wood_defaults()
@ -2449,6 +1987,8 @@ default.register_fence("default:fence_acacia_wood", {
default.register_fence("default:fence_junglewood", {
description = "Junglewood Fence",
texture = "default_fence_junglewood.png",
inventory_image = "default_fence_overlay.png^default_junglewood.png^default_fence_overlay.png^[makealpha:255,126,126",
wield_image = "default_fence_overlay.png^default_junglewood.png^default_fence_overlay.png^[makealpha:255,126,126",
material = "default:junglewood",
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
sounds = default.node_sound_wood_defaults()
@ -2457,6 +1997,8 @@ default.register_fence("default:fence_junglewood", {
default.register_fence("default:fence_pine_wood", {
description = "Pine Fence",
texture = "default_fence_pine_wood.png",
inventory_image = "default_fence_overlay.png^default_pine_wood.png^default_fence_overlay.png^[makealpha:255,126,126",
wield_image = "default_fence_overlay.png^default_pine_wood.png^default_fence_overlay.png^[makealpha:255,126,126",
material = "default:pine_wood",
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
sounds = default.node_sound_wood_defaults()
@ -2465,43 +2007,13 @@ default.register_fence("default:fence_pine_wood", {
default.register_fence("default:fence_aspen_wood", {
description = "Aspen Fence",
texture = "default_fence_aspen_wood.png",
inventory_image = "default_fence_overlay.png^default_aspen_wood.png^default_fence_overlay.png^[makealpha:255,126,126",
wield_image = "default_fence_overlay.png^default_aspen_wood.png^default_fence_overlay.png^[makealpha:255,126,126",
material = "default:aspen_wood",
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
sounds = default.node_sound_wood_defaults()
})
default.register_fence("default:fence_cobble", {
description = "Cobble Fence",
texture = "default_fence_cobble.png",
material = "default:cobble",
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
sounds = default.node_sound_wood_defaults()
})
default.register_fence("default:fence_desert_cobble", {
description = "Desert Cobble Fence",
texture = "default_fence_desert_cobble.png",
material = "default:desert_cobble",
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
sounds = default.node_sound_wood_defaults()
})
default.register_fence("default:fence_steelblock", {
description = "Steel Block Fence",
texture = "default_fence_steelblock.png",
material = "default:steelblock",
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
sounds = default.node_sound_wood_defaults()
})
default.register_fence("default:fence_brick", {
description = "Brick Fence",
texture = "default_fence_brick.png",
material = "default:brick",
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
sounds = default.node_sound_wood_defaults()
})
minetest.register_node("default:glass", {
description = "Glass",
drawtype = "glasslike_framed_optional",
@ -2580,34 +2092,3 @@ minetest.register_node("default:cloud", {
sounds = default.node_sound_defaults(),
groups = {not_in_creative_inventory = 1},
})
minetest.register_node("default:nyancat", {
description = "Nyan Cat",
tiles = {"default_nc_side.png", "default_nc_side.png", "default_nc_side.png",
"default_nc_side.png", "default_nc_back.png", "default_nc_front.png"},
paramtype2 = "facedir",
groups = {cracky = 2},
is_ground_content = false,
post_effect_color = {a = 128, r= 255, g= 128, b= 255},
legacy_facedir_simple = true,
sounds = default.node_sound_defaults(),
})
minetest.register_node("default:nyancat_rainbow", {
description = "Nyan Cat Rainbow",
drawtype = "glasslike",
tiles = {
"default_nc_rb.png^[transformR90", "default_nc_rb.png^[transformR90",
"default_nc_rb.png", "default_nc_rb.png"
},
paramtype = "light",
paramtype2 = "facedir",
groups = {cracky = 2},
sunlight_propagate = true,
walkable = false,
use_texture_alpha = true,
climbable = true,
is_ground_content = false,
post_effect_color = {a = 128, r= 255, g= 128, b= 255},
sounds = default.node_sound_defaults(),
})

View File

@ -472,137 +472,3 @@ function default.sapling_on_place(itemstack, placer, pointed_thing,
return itemstack
end
-- From BFD:
minetest.register_node("default:mg_cherry_sapling", {
description = "Impossible to get node.",
drawtype = "airlike",
paramtype = "light",
tiles = {"xfences_space.png"},
groups = {not_in_creative_inventory=1},
})
local c_mg_cherry_sapling = minetest.get_content_id("default:mg_cherry_sapling")
minetest.register_on_generated(function(minp, maxp, seed)
local timer = os.clock()
local vm, emin, emax = minetest.get_mapgen_object("voxelmanip")
local data = vm:get_data()
local area = VoxelArea:new{MinEdge=emin, MaxEdge=emax}
local trees_grown = 0
for z=minp.z, maxp.z, 1 do
for y=minp.y, maxp.y, 1 do
for x=minp.x, maxp.x, 1 do
local p_pos = area:index(x,y,z)
local content_id = data[p_pos]
if content_id == c_mg_cherry_sapling then
minetest.after(1, default.grow_cherry_tree,
{x=x, y=y, z=z},
false,
"default:cherry_tree",
"default:cherry_blossom_leaves")
trees_grown = trees_grown + 1
else
-- nope
end
end
end
end
local geninfo = string.format(" trees grown after: %.2fs", os.clock() - timer)
minetest.log("action", trees_grown..geninfo)
end)
function default.grow_cherry_tree(pos, is_apple_tree, trunk_node, leaves_node)
--[[
NOTE: Tree-placing code is currently duplicated in the engine
and in games that have saplings; both are deprecated but not
replaced yet
--]]
local x, y, z = pos.x, pos.y, pos.z
local height = random(4, 5)
local c_tree = minetest.get_content_id(trunk_node)
local c_leaves = minetest.get_content_id(leaves_node)
local vm = minetest.get_voxel_manip()
local minp, maxp = vm:read_from_map(
{x = pos.x - 2, y = pos.y, z = pos.z - 2},
{x = pos.x + 2, y = pos.y + height + 1, z = pos.z + 2}
)
local a = VoxelArea:new({MinEdge = minp, MaxEdge = maxp})
local data = vm:get_data()
add_trunk_and_leaves(data, a, pos, c_tree, c_leaves, height, 2, 8, is_apple_tree)
vm:set_data(data)
vm:write_to_map()
vm:update_map()
end
minetest.register_abm({
nodenames = {"default:cherry_sapling", "default:mg_cherry_sapling"},
interval = 80,
chance = 3,
action = function(pos, node)
local nu = minetest.get_node({x=pos.x, y=pos.y-1, z=pos.z}).name
local is_soil = minetest.get_item_group(nu, "soil")
if is_soil == 0 then
return
end
minetest.remove_node({x=pos.x, y=pos.y, z=pos.z})
default.grow_cherry_tree(pos, false, "default:cherry_tree", "default:cherry_blossom_leaves")
end,
})
minetest.register_biome({
name = "cherry_blossom_forest",
node_shore_filler = "default:sand",
node_top = "default:grass",
depth_top = 1,
node_filler = "default:dirt",
depth_filler = 3,
node_dust = "air",
node_underwater = "default:gravel",
y_min = 1,
y_max = 40,
heat_point = 50,
humidity_point = 55,
})
minetest.register_biome({
name = "cherry_blossom_forest_floral",
node_shore_filler = "default:sand",
node_top = "default:grass",
depth_top = 1,
node_filler = "default:dirt",
depth_filler = 3,
node_dust = "air",
node_underwater = "default:gravel",
y_min = 1,
y_max = 40,
heat_point = 47,
humidity_point = 50,
})
minetest.register_biome({
name = "cherry_blossom_forest_grassy",
node_shore_filler = "default:sand",
node_top = "default:grass",
depth_top = 1,
node_filler = "default:dirt",
depth_filler = 3,
node_dust = "air",
node_underwater = "default:gravel",
y_min = 1,
y_max = 42,
heat_point = 55,
humidity_point = 55,
})

View File

@ -0,0 +1,19 @@
local modname = minetest.get_current_modname()
minetest.register_abm({
nodenames = {'default:cherry_sapling', modname .. 'mg_cherry_sapling'},
interval = 80,
chance = 3,
action = function(pos, node)
local nu = minetest.get_node({x=pos.x, y=pos.y-1, z=pos.z}).name
local is_soil = minetest.get_item_group(nu, 'soil')
if is_soil == 0 then
return
end
minetest.remove_node({x=pos.x, y=pos.y, z=pos.z})
default.grow_cherry_tree(pos, false, 'default:cherry_tree', 'default:cherry_blossom_leaves')
end,
})

View File

@ -0,0 +1,35 @@
local modname = minetest.get_current_modname()
do -- default
local aliases = {
'mg_cherry_sapling', 'acid_source', 'acid_flowing', 'sand_source', 'sand_flowing',
'clay_burned', 'cherry_tree', 'cherry_log', 'cherry_plank', 'cherry_blossom_leaves',
'cherry_leaves_deco', 'cherry_sapling', 'desert_stone_with_coal', 'desert_stone_with_copper',
'stone_with_tin', 'desert_stone_with_tin', 'tinblock', 'stone_with_silver',
'desert_stone_with_silver', 'silverblock', 'meze', 'stone_with_mithril', 'mithrilblock',
'stone_with_coin', 'ladder_obsidian', 'fence_cobble', 'fence_desert_cobble',
'fence_steelblock', 'fence_brick', 'nyancat', 'nyancat_rainbow', 'obsidian_cooled',
'cobble_cooled'
}
for node in pairs(aliases) do
minetest.register_alias('default:' .. node, modname .. ':' .. node)
end
minetest.register_alias('default:meze_block', modname .. ':meze')
end
do -- moreores
local aliases = {
'pick_silver', 'pick_mithril', 'shovel_silver', 'shovel_mithril', 'axe_silver', 'axe_mithril',
'sword_silver', 'sword_mithril', 'mithril_ingot', 'silver_ingot', 'tin_ingot', 'mithril_lump',
'silver_lump', 'tin_lump'
}
for node in pairs(aliases) do
minetest.register_alias('moreores:' .. node, modname .. ':' .. node)
end
minetest.register_alias('mineral_silver', modname .. ':stone_with_silver')
minetest.register_alias('mineral_tin', modname .. ':stone_with_tin')
minetest.register_alias('mineral_mithril', modname .. ':stone_with_mithril')
minetest.register_alias('mithril_block', modname .. ':mithrilblock')
minetest.register_alias('silver_block', modname .. ':silverblock')
minetest.register_alias('tin_block', modname .. ':tinblock')
end

View File

@ -0,0 +1,44 @@
minetest.register_biome({
name = "cherry_blossom_forest",
node_shore_filler = "default:sand",
node_top = "default:grass",
depth_top = 1,
node_filler = "default:dirt",
depth_filler = 3,
node_dust = "air",
node_underwater = "default:gravel",
y_min = 1,
y_max = 40,
heat_point = 50,
humidity_point = 55,
})
minetest.register_biome({
name = "cherry_blossom_forest_floral",
node_shore_filler = "default:sand",
node_top = "default:grass",
depth_top = 1,
node_filler = "default:dirt",
depth_filler = 3,
node_dust = "air",
node_underwater = "default:gravel",
y_min = 1,
y_max = 40,
heat_point = 47,
humidity_point = 50,
})
minetest.register_biome({
name = "cherry_blossom_forest_grassy",
node_shore_filler = "default:sand",
node_top = "default:grass",
depth_top = 1,
node_filler = "default:dirt",
depth_filler = 3,
node_dust = "air",
node_underwater = "default:gravel",
y_min = 1,
y_max = 42,
heat_point = 55,
humidity_point = 55,
})

View File

@ -0,0 +1 @@
default

View File

@ -0,0 +1,13 @@
local modname = minetest.get_current_modname()
local modpath = minetest.get_modpath(modname)
local thismod = {}
_G[modname] = thismod
dofile(modpath .. '/aliases.lua')
dofile(modpath .. '/abms.lua')
dofile(modpath .. '/biomes.lua')
dofile(modpath .. '/mapgen.lua')
dofile(modpath .. '/nodes.lua')
dofile(modpath .. '/trees.lua')

View File

@ -0,0 +1,136 @@
local modname = minetest.get_current_modname()
-- Beware of Meze
minetest.register_ore({
ore_type = 'scatter',
ore = modname .. ':meze',
wherein = 'default:stone',
clust_scarcity = 40 * 40 * 40,
clust_num_ores = 3,
clust_size = 2,
y_min = 0,
y_max = 64,
flags = 'absheight',
})
minetest.register_ore({
ore_type = 'scatter',
ore = modname .. ':meze',
wherein = 'default:desert_stone',
clust_scarcity = 40 * 40 * 40,
clust_num_ores = 3,
clust_size = 2,
y_min = 0,
y_max = 64,
flags = 'absheight',
})
-- Tin
minetest.register_ore({
ore_type = 'scatter',
ore = modname .. ':stone_with_tin',
wherein = 'default:stone',
clust_scarcity = 7 * 7 * 7,
clust_num_ores = 3,
clust_size = 7,
y_min = -31000,
y_max = 12,
})
minetest.register_ore({
ore_type = 'scatter',
ore = modname .. ':desert_stone_with_tin',
wherein = 'default:desert_stone',
clust_scarcity = 7 * 7 * 7,
clust_num_ores = 3,
clust_size = 7,
y_min = -31000,
y_max = 12,
})
-- Silver
minetest.register_ore({
ore_type = 'scatter',
ore = modname .. ':stone_with_silver',
wherein = 'default:stone',
clust_scarcity = 11 * 11 * 11,
clust_num_ores = 4,
clust_size = 11,
y_min = -31000,
y_max = -12,
})
minetest.register_ore({
ore_type = 'scatter',
ore = modname .. ':desert_stone_with_silver',
wherein = 'default:desert_stone',
clust_scarcity = 11 * 11 * 11,
clust_num_ores = 4,
clust_size = 11,
y_min = -31000,
y_max = -12,
})
-- Mithril
minetest.register_ore({
ore_type = 'scatter',
ore = modname .. ':stone_with_mithril',
wherein = 'default:stone',
clust_scarcity = 11 * 11 * 11,
clust_num_ores = 1,
clust_size = 11,
y_min = -31000,
y_max = -1024,
})
minetest.register_ore({
ore_type = 'scatter',
ore = modname .. ':stone_with_mithril',
wherein = 'default:stone',
clust_scarcity = 15 * 15 * 15,
clust_num_ores = 2,
clust_size = 3,
y_min = -31000,
y_max = -2048,
})
minetest.register_ore({
ore_type = 'scatter',
ore = modname .. ':stone_with_mithril',
wherein = 'default:stone',
clust_scarcity = 22 * 22 * 22,
clust_num_ores = 5,
clust_size = 5,
y_min = -31000,
y_max = -4096,
})
minetest.register_ore({
ore_type = 'scatter',
ore = modname .. ':stone_with_mithril',
wherein = 'default:stone',
clust_scarcity = 28 * 28 * 28,
clust_num_ores = 20,
clust_size = 7,
y_min = -31000,
y_max = -12288,
})
-- Gold Coins
minetest.register_ore({
ore_type = 'scatter',
ore = modname .. ':stone_with_coin',
wherein = 'default:stone',
clust_scarcity = 26 * 26 * 26,
clust_num_ores = 1,
clust_size = 1,
y_min = -30000,
y_max = 0,
flags = 'absheight',
})

View File

@ -0,0 +1,504 @@
local modname = minetest.get_current_modname()
minetest.register_node(modname .. ':acid_source', {
description = 'Acid Source',
inventory_image = minetest.inventorycube('default_acid.png'),
drawtype = 'liquid',
tiles = {
{name = 'default_acid_source_animated.png', animation={type = 'vertical_frames', aspect_w = 16, aspect_h = 16, length = 1.5}}
},
special_tiles = {
-- New-style acid source material (mostly unused)
{
name = 'default_acid_source_animated.png',
animation = {type = 'vertical_frames', aspect_w= 16, aspect_h = 16, length = 1.5},
backface_culling = false,
}
},
alpha = 160,
paramtype = 'light',
walkable = false,
pointable = false,
diggable = false,
buildable_to = true,
drop = '',
drowning = 2,
liquidtype = 'source',
liquid_alternative_flowing = modname .. ':acid_flowing',
liquid_alternative_source = modname .. ':acid_source',
liquid_viscosity = 1,
liquid_range = 4,
damage_per_second = 3,
post_effect_color = {a = 120, r = 50, g = 90, b = 30},
groups = {water = 3, acid = 3, liquid = 3, puts_out_fire = 1},
})
minetest.register_node(modname .. ':acid_flowing', {
description = 'Flowing Acid',
inventory_image = minetest.inventorycube('default_acid.png'),
drawtype = 'flowingliquid',
tiles = {'default_acid.png'},
special_tiles = {
{
image = 'default_acid_flowing_animated.png',
backface_culling=false,
animation={type = 'vertical_frames', aspect_w= 16, aspect_h = 16, length = 0.6}
},
{
image = 'default_acid_flowing_animated.png',
backface_culling=true,
animation={type = 'vertical_frames', aspect_w= 16, aspect_h = 16, length = 0.6}
},
},
alpha = 160,
paramtype = 'light',
paramtype2 = 'flowingliquid',
walkable = false,
pointable = false,
diggable = false,
buildable_to = true,
drop = '',
drowning = 2,
liquidtype = 'flowing',
liquid_alternative_flowing = modname .. ':acid_flowing',
liquid_alternative_source = modname .. ':acid_source',
liquid_viscosity = 1,
liquid_range = 4,
damage_per_second = 3,
post_effect_color = {a = 120, r = 50, g = 90, b = 30},
groups = {water = 3, acid = 3, liquid = 3, puts_out_fire = 1, not_in_creative_inventory = 1},
})
minetest.register_node(modname .. ':sand_source', {
description = 'Sand Source',
inventory_image = minetest.inventorycube('default_sand.png'),
drawtype = 'liquid',
tiles = {'default_sand.png'},
alpha = 255,
paramtype = 'light',
walkable = false,
pointable = false,
diggable = false,
buildable_to = true,
drop = '',
drowning = 4,
liquidtype = 'source',
liquid_alternative_flowing = modname .. ':sand_flowing',
liquid_alternative_source = modname .. ':sand_source',
liquid_viscosity = 20,
liquid_renewable = false,
post_effect_color = {a = 250, r = 0, g = 0, b = 0},
groups = {liquid = 3},
})
minetest.register_node(modname .. ':sand_flowing', {
description = 'Flowing Sand',
inventory_image = minetest.inventorycube('default_sand.png'),
drawtype = 'flowingliquid',
tiles = {'default_sand.png'},
special_tiles = {
{
image = 'default_sand_flowing_animated.png',
backface_culling=false,
animation={type = 'vertical_frames', aspect_w= 16, aspect_h = 16, length = 0.6}
},
{
image = 'default_sand_flowing_animated.png',
backface_culling=true,
animation={type = 'vertical_frames', aspect_w= 16, aspect_h = 16, length = 0.6}
},
},
alpha = 255,
paramtype = 'light',
paramtype2 = 'flowingliquid',
walkable = false,
pointable = false,
diggable = false,
buildable_to = true,
drop = '',
drowning = 4,
liquidtype = 'flowing',
liquid_alternative_flowing = modname .. ':sand_flowing',
liquid_alternative_source = modname .. ':sand_source',
liquid_viscosity = 20,
post_effect_color = {a = 250, r = 0, g = 0, b = 0},
groups = {liquid = 3, not_in_creative_inventory = 1},
})
minetest.register_node(modname .. ':clay_burned', {
description = 'Burned Clay',
tiles = {'default_clay_burned.png'},
is_ground_content = true,
groups = {crumbly = 3},
drop = 'default:clay_lump 4',
sounds = default.node_sound_dirt_defaults(),
})
-- From BFD, cherry tree
minetest.register_node(modname .. ':cherry_tree', {
description = 'Cherry Log',
tiles = {'default_cherry_top.png', 'default_cherry_top.png', 'default_cherry_tree.png'},
is_ground_content = false,
groups = {tree=1,choppy=2,oddly_breakable_by_hand=1,flammable=2},
sounds = default.node_sound_wood_defaults(),
drop = modname .. 'cherry_log'
})
minetest.register_node(modname .. ':cherry_log', {
description = 'Cherry Log',
tiles = {'default_cherry_top.png', 'default_cherry_top.png', 'default_cherry_tree.png'},
paramtype2 = 'facedir',
is_ground_content = false,
groups = {choppy=2,oddly_breakable_by_hand=1,flammable=2},
sounds = default.node_sound_wood_defaults(),
on_place = minetest.rotate_node,
})
minetest.register_node(modname .. ':cherry_plank', {
description = 'Cherry Planks',
tiles = {'default_wood_cherry_planks.png'},
sounds = default.node_sound_wood_defaults(),
groups = {oddly_breakable_by_hand=1, flammable=1, choppy=3, wood=1},
})
minetest.register_node(modname .. ':cherry_blossom_leaves', {
description = 'Cherry Blossom Leaves',
drawtype = 'allfaces_optional',
visual_scale = 1.3,
tiles = {'default_cherry_blossom_leaves.png'},
paramtype = 'light',
waving = 1,
is_ground_content = false,
groups = {snappy=3, leafdecay=3, leafdecay_drop = 1, flammable=2, leaves=1},
drop = {
max_items = 1,
items = {
{
items = {modname .. ':cherry_sapling'},
rarity = 32,
},
{
items = {modname .. ':cherry_blossom_leaves'},
}
}
},
sounds = default.node_sound_leaves_defaults(),
on_place = function(itemstack, placer, pointed_thing)
-- place a random grass node
local stack = ItemStack(modname .. ':cherry_leaves_deco')
local ret = minetest.item_place(stack, placer, pointed_thing)
return ItemStack(modname .. ':cherry_blossom_leaves'..' '..itemstack:get_count()-(1-ret:get_count()))
end,
})
minetest.register_node(modname .. ':cherry_leaves_deco', {
description = 'Cherry Leaves',
drawtype = 'allfaces_optional',
visual_scale = 1.3,
tiles = {'default_cherry_blossom_leaves.png'},
paramtype = 'light',
waving=1,
is_ground_content = false,
groups = {snappy=3, flammable=2, leaves=1},
sounds = default.node_sound_leaves_defaults(),
drop = {modname .. 'cherry_blossom_leaves'},
})
minetest.register_node(modname .. ':cherry_sapling', {
description = 'Cherry Sapling',
waving = 1,
visual_scale = 1.0,
inventory_image = 'default_cherry_sapling.png',
wield_image = 'default_cherry_sapling.png',
drawtype = 'plantlike',
paramtype = 'light',
tiles = {'default_cherry_sapling.png'},
walkable = false,
selection_box = {
type = 'fixed',
fixed = {-0.3, -0.5, -0.3, 0.3, 0.35, 0.3}
},
groups = {snappy = 2, dig_immediate = 3, flammable = 2,
attached_node = 1, sapling = 1},
sounds = default.node_sound_leaves_defaults(),
})
minetest.register_node(modname .. ':desert_stone_with_coal', {
description = 'Coal Ore',
tiles = {'default_desert_stone.png^default_mineral_coal.png'},
is_ground_content = true,
groups = {crumbly = 1, cracky = 3},
drop = {
items = {
{items = {'default:desert_cobble'}},
{items = {'default:coal_lump'}},
{items = {'maptools:copper_coin'}},
},
},
sounds = default.node_sound_stone_defaults(),
})
minetest.register_node(modname .. ':desert_stone_with_copper', {
description = 'Copper Ore',
tiles = {'default_desert_stone.png^default_mineral_copper.png'},
is_ground_content = true,
groups = {crumbly = 1, cracky = 3},
drop = {
items = {
{items = {'default:desert_cobble'}},
{items = {'default:copper_lump'}},
{items = {'maptools:copper_coin 3'}},
},
},
sounds = default.node_sound_stone_defaults(),
})
minetest.register_node(modname .. ':stone_with_tin', {
description = 'Tin Ore',
tiles = {'default_stone.png^default_mineral_tin.png'},
is_ground_content = true,
groups = {cracky = 3},
drop = {
items = {
{items = {'default:cobble'}},
{items = {'default:tin_lump'}},
{items = {'maptools:copper_coin 3'}},
},
},
sounds = default.node_sound_stone_defaults(),
})
minetest.register_node(modname .. ':desert_stone_with_tin', {
description = 'Tin Ore',
tiles = {'default_desert_stone.png^default_mineral_tin.png'},
is_ground_content = true,
groups = {crumbly = 1, cracky = 3},
drop = {
items = {
{items = {'default:desert_cobble'}},
{items = {'default:tin_lump'}},
{items = {'maptools:copper_coin 3'}},
},
},
sounds = default.node_sound_stone_defaults(),
})
minetest.register_node(modname .. ':tinblock', {
description = 'Tin Block',
tiles = {'default_tin_block.png'},
is_ground_content = false,
groups = {snappy = 1, bendy = 2, cracky = 1, melty = 2, level = 2},
sounds = default.node_sound_stone_defaults(),
})
minetest.register_node(modname .. ':stone_with_silver', {
description = 'Silver Ore',
tiles = {'default_stone.png^default_mineral_silver.png'},
is_ground_content = true,
groups = {cracky = 3},
drop = {
items = {
{items = {'default:cobble'}},
{items = {'default:silver_lump'}},
{items = {'maptools:copper_coin 3'}},
},
},
sounds = default.node_sound_stone_defaults(),
})
minetest.register_node(modname .. ':desert_stone_with_silver', {
description = 'Silver Ore',
tiles = {'default_desert_stone.png^default_mineral_silver.png'},
is_ground_content = true,
groups = {crumbly = 1, cracky = 3},
drop = {
items = {
{items = {'default:desert_cobble'}},
{items = {'default:silver_lump'}},
{items = {'maptools:copper_coin 3'}},
},
},
sounds = default.node_sound_stone_defaults(),
})
minetest.register_node(modname .. ':silverblock', {
description = 'Silver Block',
tiles = {'default_silver_block.png'},
is_ground_content = false,
groups = {snappy = 1, bendy = 2, cracky = 1, melty = 2, level = 2},
sounds = default.node_sound_stone_defaults(),
})
-- Meze
local function die_later(digger)
digger:set_hp(0)
end
minetest.register_node(modname .. ':meze', {
description = 'Meze Block',
tiles = {'default_meze_block.png'},
is_ground_content = true,
drop = '',
groups = {cracky = 1, level = 2, fall_damage_add_percent = -75},
sounds = default.node_sound_wood_defaults(), -- Intended.
on_dig = function(pos, node, digger)
if digger and minetest.setting_getbool('enable_damage') and not minetest.setting_getbool('creative_mode') then
minetest.after(3, die_later, digger)
minetest.chat_send_player(digger:get_player_name(), 'You feel like you did a mistake.')
minetest.node_dig(pos, node, digger)
elseif digger then
minetest.node_dig(pos, node, digger)
end
end,
})
-- Mithril
minetest.register_node(modname .. ':stone_with_mithril', {
description = 'Mithril Ore',
tiles = {'default_stone.png^default_mineral_mithril.png'},
is_ground_content = true,
groups = {cracky = 3},
drop = {
items = {
{items = {'default:cobble'}},
{items = {'default:mithril_lump'}},
{items = {'maptools:copper_coin 3'}},
},
},
sounds = default.node_sound_stone_defaults(),
})
minetest.register_node(modname .. ':mithrilblock', {
description = 'Mithril Block',
tiles = {'default_mithril_block.png'},
is_ground_content = false,
groups = {snappy = 1, bendy = 2, cracky = 1, melty = 2, level = 2},
sounds = default.node_sound_stone_defaults(),
})
--
minetest.register_node(modname .. ':stone_with_coin', {
description = 'Stone with Coin',
tiles = {'default_stone.png^maptools_gold_coin.png'},
is_ground_content = true,
groups = {cracky = 3},
drop = {
items = {
{items = {'default:cobble'}},
{items = {'maptools:gold_coin'}},
},
},
sounds = default.node_sound_stone_defaults(),
})
minetest.register_node(modname .. ':ladder_obsidian', {
description = "Obsidian Ladder",
drawtype = 'signlike',
tiles = {'default_ladder_obsidian.png'},
inventory_image = 'default_ladder_obsidian.png',
wield_image = 'default_ladder_obsidian.png',
paramtype = 'light',
paramtype2 = 'wallmounted',
sunlight_propagates = true,
walkable = false,
climbable = true,
is_ground_content = false,
selection_box = {
type = 'wallmounted',
--wall_top = = <default>
--wall_bottom = = <default>
--wall_side = = <default>
},
groups = {cracky = 2},
sounds = default.node_sound_stone_defaults(),
})
default.register_fence(modname .. ':fence_cobble', {
description = "Cobble Fence",
texture = 'default_fence_cobble.png',
material = 'default:cobble',
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
sounds = default.node_sound_wood_defaults()
})
default.register_fence(modname .. ':fence_desert_cobble', {
description = "Desert Cobble Fence",
texture = 'default_fence_desert_cobble.png',
material = 'default:desert_cobble',
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
sounds = default.node_sound_wood_defaults()
})
default.register_fence(modname .. ':fence_steelblock', {
description = "Steel Block Fence",
texture = 'default_fence_steelblock.png',
material = 'default:steelblock',
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
sounds = default.node_sound_wood_defaults()
})
default.register_fence(modname .. ':fence_brick', {
description = "Brick Fence",
texture = 'default_fence_brick.png',
material = 'default:brick',
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
sounds = default.node_sound_wood_defaults()
})
-- Nyan cat
minetest.register_node(modname .. ':nyancat', {
description = "Nyan Cat",
tiles = {'default_nc_side.png', 'default_nc_side.png', 'default_nc_side.png',
'default_nc_side.png', 'default_nc_back.png', 'default_nc_front.png'},
paramtype2 = 'facedir',
groups = {cracky = 2},
is_ground_content = false,
post_effect_color = {a = 128, r= 255, g= 128, b= 255},
legacy_facedir_simple = true,
sounds = default.node_sound_defaults(),
})
minetest.register_node(modname .. ':nyancat_rainbow', {
description = "Nyan Cat Rainbow",
drawtype = 'glasslike',
tiles = {
'default_nc_rb.png^[transformR90', 'default_nc_rb.png^[transformR90',
'default_nc_rb.png', 'default_nc_rb.png'
},
paramtype = 'light',
paramtype2 = 'facedir',
groups = {cracky = 2},
sunlight_propagate = true,
walkable = false,
use_texture_alpha = true,
climbable = true,
is_ground_content = false,
post_effect_color = {a = 128, r= 255, g= 128, b= 255},
sounds = default.node_sound_defaults(),
})
--
minetest.register_node(modname .. ':obsidian_cooled', {
description = "Obsidian (cooled)",
tiles = {'default_obsidian.png'},
is_ground_content = true,
drop = 'default:obsidian',
sounds = default.node_sound_stone_defaults(),
groups = {cracky = 1, level = 2},
})
minetest.register_node(modname .. ':cobble_cooled', {
description = "Cobblestone (cooled)",
tiles = {'default_cobble.png'},
is_ground_content = true,
drop = 'default:cobble',
groups = {cracky = 3, stone = 2},
sounds = default.node_sound_stone_defaults(),
})

View File

Before

Width:  |  Height:  |  Size: 360 B

After

Width:  |  Height:  |  Size: 360 B

View File

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

Before

Width:  |  Height:  |  Size: 167 B

After

Width:  |  Height:  |  Size: 167 B

View File

Before

Width:  |  Height:  |  Size: 627 B

After

Width:  |  Height:  |  Size: 627 B

View File

Before

Width:  |  Height:  |  Size: 632 B

After

Width:  |  Height:  |  Size: 632 B

View File

Before

Width:  |  Height:  |  Size: 320 B

After

Width:  |  Height:  |  Size: 320 B

View File

Before

Width:  |  Height:  |  Size: 347 B

After

Width:  |  Height:  |  Size: 347 B

View File

Before

Width:  |  Height:  |  Size: 261 B

After

Width:  |  Height:  |  Size: 261 B

View File

Before

Width:  |  Height:  |  Size: 235 B

After

Width:  |  Height:  |  Size: 235 B

View File

Before

Width:  |  Height:  |  Size: 319 B

After

Width:  |  Height:  |  Size: 319 B

View File

Before

Width:  |  Height:  |  Size: 208 B

After

Width:  |  Height:  |  Size: 208 B

View File

Before

Width:  |  Height:  |  Size: 209 B

After

Width:  |  Height:  |  Size: 209 B

View File

Before

Width:  |  Height:  |  Size: 303 B

After

Width:  |  Height:  |  Size: 303 B

View File

Before

Width:  |  Height:  |  Size: 141 B

After

Width:  |  Height:  |  Size: 141 B

View File

Before

Width:  |  Height:  |  Size: 141 B

After

Width:  |  Height:  |  Size: 141 B

View File

Before

Width:  |  Height:  |  Size: 141 B

After

Width:  |  Height:  |  Size: 141 B

View File

Before

Width:  |  Height:  |  Size: 372 B

After

Width:  |  Height:  |  Size: 372 B

View File

Before

Width:  |  Height:  |  Size: 266 B

After

Width:  |  Height:  |  Size: 266 B

View File

Before

Width:  |  Height:  |  Size: 220 B

After

Width:  |  Height:  |  Size: 220 B

View File

Before

Width:  |  Height:  |  Size: 186 B

After

Width:  |  Height:  |  Size: 186 B

View File

Before

Width:  |  Height:  |  Size: 204 B

After

Width:  |  Height:  |  Size: 204 B

View File

Before

Width:  |  Height:  |  Size: 137 B

After

Width:  |  Height:  |  Size: 137 B

View File

Before

Width:  |  Height:  |  Size: 148 B

After

Width:  |  Height:  |  Size: 148 B

View File

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

Before

Width:  |  Height:  |  Size: 315 B

After

Width:  |  Height:  |  Size: 315 B

View File

Before

Width:  |  Height:  |  Size: 181 B

After

Width:  |  Height:  |  Size: 181 B

View File

Before

Width:  |  Height:  |  Size: 183 B

After

Width:  |  Height:  |  Size: 183 B

View File

Before

Width:  |  Height:  |  Size: 486 B

After

Width:  |  Height:  |  Size: 486 B

View File

Before

Width:  |  Height:  |  Size: 258 B

After

Width:  |  Height:  |  Size: 258 B

View File

Before

Width:  |  Height:  |  Size: 224 B

After

Width:  |  Height:  |  Size: 224 B

View File

Before

Width:  |  Height:  |  Size: 257 B

After

Width:  |  Height:  |  Size: 257 B

View File

Before

Width:  |  Height:  |  Size: 311 B

After

Width:  |  Height:  |  Size: 311 B

View File

Before

Width:  |  Height:  |  Size: 304 B

After

Width:  |  Height:  |  Size: 304 B

View File

Before

Width:  |  Height:  |  Size: 856 B

After

Width:  |  Height:  |  Size: 856 B

View File

Before

Width:  |  Height:  |  Size: 434 B

After

Width:  |  Height:  |  Size: 434 B

View File

Before

Width:  |  Height:  |  Size: 308 B

After

Width:  |  Height:  |  Size: 308 B

View File

Before

Width:  |  Height:  |  Size: 274 B

After

Width:  |  Height:  |  Size: 274 B

View File

Before

Width:  |  Height:  |  Size: 334 B

After

Width:  |  Height:  |  Size: 334 B

View File

Before

Width:  |  Height:  |  Size: 220 B

After

Width:  |  Height:  |  Size: 220 B

View File

Before

Width:  |  Height:  |  Size: 270 B

After

Width:  |  Height:  |  Size: 270 B

View File

Before

Width:  |  Height:  |  Size: 204 B

After

Width:  |  Height:  |  Size: 204 B

View File

Before

Width:  |  Height:  |  Size: 480 B

After

Width:  |  Height:  |  Size: 480 B

View File

Before

Width:  |  Height:  |  Size: 555 B

After

Width:  |  Height:  |  Size: 555 B

View File

Before

Width:  |  Height:  |  Size: 735 B

After

Width:  |  Height:  |  Size: 735 B

View File

Before

Width:  |  Height:  |  Size: 788 B

After

Width:  |  Height:  |  Size: 788 B

View File

Before

Width:  |  Height:  |  Size: 856 B

After

Width:  |  Height:  |  Size: 856 B

View File

@ -0,0 +1,68 @@
local modname = minetest.get_current_modname()
-- From BFD:
minetest.register_node(modname .. 'mg_cherry_sapling', {
description = "Impossible to get node.",
drawtype = 'airlike',
paramtype = 'light',
tiles = {'xfences_space.png'},
groups = {not_in_creative_inventory=1},
})
local c_mg_cherry_sapling = minetest.get_content_id(modname .. 'mg_cherry_sapling')
minetest.register_on_generated(function(minp, maxp, seed)
local timer = os.clock()
local vm, emin, emax = minetest.get_mapgen_object('voxelmanip')
local data = vm:get_data()
local area = VoxelArea:new{MinEdge=emin, MaxEdge=emax}
local trees_grown = 0
for z=minp.z, maxp.z, 1 do
for y=minp.y, maxp.y, 1 do
for x=minp.x, maxp.x, 1 do
local p_pos = area:index(x,y,z)
local content_id = data[p_pos]
if content_id == c_mg_cherry_sapling then
minetest.after(1, default.grow_cherry_tree,
{x=x, y=y, z=z},
false,
modname .. ':cherry_tree',
modname .. ':cherry_blossom_leaves')
trees_grown = trees_grown + 1
else
-- nope
end
end
end
end
local geninfo = string.format(" trees grown after: %.2fs", os.clock() - timer)
minetest.log('action', trees_grown..geninfo)
end)
function default.grow_cherry_tree(pos, is_apple_tree, trunk_node, leaves_node)
--[[
NOTE: Tree-placing code is currently duplicated in the engine
and in games that have saplings; both are deprecated but not
replaced yet
--]]
local x, y, z = pos.x, pos.y, pos.z
local height = random(4, 5)
local c_tree = minetest.get_content_id(trunk_node)
local c_leaves = minetest.get_content_id(leaves_node)
local vm = minetest.get_voxel_manip()
local minp, maxp = vm:read_from_map(
{x = pos.x - 2, y = pos.y, z = pos.z - 2},
{x = pos.x + 2, y = pos.y + height + 1, z = pos.z + 2}
)
local a = VoxelArea:new({MinEdge = minp, MaxEdge = maxp})
local data = vm:get_data()
add_trunk_and_leaves(data, a, pos, c_tree, c_leaves, height, 2, 8, is_apple_tree)
vm:set_data(data)
vm:write_to_map()
vm:update_map()
end

View File

@ -3,6 +3,8 @@ backend = redis
redis_hash = IGNORED
redis_address = localhost
load_mod_mff_classic = true
load_mod_darkage = true
load_mod_quartz = true
load_mod_moreblocks = true