Fix some codestyle issues with `mcl_crimson`

This commit is contained in:
AFCMS 2022-05-04 12:23:08 +02:00 committed by cora
parent 7d653011fc
commit f285e18d24
5 changed files with 320 additions and 346 deletions

View File

@ -1,4 +1,4 @@
local S = minetest.get_translator("mcl_mushroom") local S = minetest.get_translator("mcl_crimson")
-- Warped fungus -- Warped fungus
-- Crimson fungus -- Crimson fungus
@ -16,7 +16,6 @@ minetest.register_node("mcl_crimson:warped_fungus", {
paramtype = "light", paramtype = "light",
walkable = false, walkable = false,
groups = {dig_immediate=3,mushroom=1,attached_node=1,dig_by_water=1,destroy_by_lava_flow=1,dig_by_piston=1,enderman_takable=1,deco_block=1}, groups = {dig_immediate=3,mushroom=1,attached_node=1,dig_by_water=1,destroy_by_lava_flow=1,dig_by_piston=1,enderman_takable=1,deco_block=1},
light_source = 1, light_source = 1,
selection_box = { selection_box = {
type = "fixed", type = "fixed",
@ -35,7 +34,6 @@ minetest.register_node("mcl_crimson:warped_fungus", {
end end
end, end,
_mcl_blast_resistance = 0, _mcl_blast_resistance = 0,
stack_max = 64,
}) })
minetest.register_node("mcl_crimson:twisting_vines", { minetest.register_node("mcl_crimson:twisting_vines", {
@ -55,7 +53,6 @@ minetest.register_node("mcl_crimson:twisting_vines", {
}, },
node_placement_prediction = "", node_placement_prediction = "",
on_rightclick = function(pos, node, pointed_thing, itemstack) on_rightclick = function(pos, node, pointed_thing, itemstack)
if pointed_thing:get_wielded_item():get_name() == "mcl_crimson:twisting_vines" then if pointed_thing:get_wielded_item():get_name() == "mcl_crimson:twisting_vines" then
itemstack:take_item() itemstack:take_item()
grow_twisting_vines(pos, 1) grow_twisting_vines(pos, 1)
@ -68,16 +65,21 @@ minetest.register_node("mcl_crimson:twisting_vines", {
max_items = 1, max_items = 1,
items = { items = {
{items = {"mcl_crimson:twisting_vines"}, rarity = 3}, {items = {"mcl_crimson:twisting_vines"}, rarity = 3},
} },
}, },
_mcl_shears_drop = true, _mcl_shears_drop = true,
_mcl_silk_touch_drop = true, _mcl_silk_touch_drop = true,
_mcl_fortune_drop = { items = {{items = {"mcl_crimson:twisting_vines"}, rarity = 3},}, _mcl_fortune_drop = {
items = {{items = {"mcl_crimson:twisting_vines"}, rarity = 1.8181818181818181},}, items = {
{items = {"mcl_crimson:twisting_vines"}, rarity = 3},
},
items = {
{items = {"mcl_crimson:twisting_vines"}, rarity = 1.8181818181818181},
},
"mcl_crimson:twisting_vines", "mcl_crimson:twisting_vines",
"mcl_crimson:twisting_vines"}, "mcl_crimson:twisting_vines",
},
_mcl_blast_resistance = 0, _mcl_blast_resistance = 0,
stack_max = 64,
}) })
minetest.register_node("mcl_crimson:nether_sprouts", { minetest.register_node("mcl_crimson:nether_sprouts", {
@ -99,7 +101,6 @@ minetest.register_node("mcl_crimson:nether_sprouts", {
_mcl_shears_drop = true, _mcl_shears_drop = true,
_mcl_silk_touch_drop = false, _mcl_silk_touch_drop = false,
_mcl_blast_resistance = 0, _mcl_blast_resistance = 0,
stack_max = 64,
}) })
minetest.register_node("mcl_crimson:warped_roots", { minetest.register_node("mcl_crimson:warped_roots", {
@ -119,25 +120,22 @@ minetest.register_node("mcl_crimson:warped_roots", {
node_placement_prediction = "", node_placement_prediction = "",
_mcl_silk_touch_drop = false, _mcl_silk_touch_drop = false,
_mcl_blast_resistance = 0, _mcl_blast_resistance = 0,
stack_max = 64,
}) })
minetest.register_node("mcl_crimson:warped_wart_block", { minetest.register_node("mcl_crimson:warped_wart_block", {
description = S("Warped Wart Block"), description = S("Warped Wart Block"),
tiles = {"warped_wart_block.png"}, tiles = {"warped_wart_block.png"},
groups = {handy=1,hoe=7,swordy=1, deco_block=1, }, groups = {handy = 1, hoe = 7, swordy = 1, deco_block = 1},
stack_max = 64,
_mcl_hardness = 2, _mcl_hardness = 2,
}) })
minetest.register_node("mcl_crimson:shroomlight", { minetest.register_node("mcl_crimson:shroomlight", {
description = S("Shroomlight"), description = S("Shroomlight"),
tiles = {"shroomlight.png"}, tiles = {"shroomlight.png"},
groups = {handy=1,hoe=7,swordy=1, leafdecay=1, leafdecay_distance=1, leaves=1, deco_block=1, }, groups = {handy = 1, hoe = 7, swordy = 1, leafdecay = 1, leafdecay_distance = 1, leaves = 1, deco_block = 1},
stack_max = 64,
_mcl_hardness = 2,
-- this is 15 in Minecraft -- this is 15 in Minecraft
light_source = 14, light_source = 14,
_mcl_hardness = 2,
}) })
minetest.register_node("mcl_crimson:warped_hyphae", { minetest.register_node("mcl_crimson:warped_hyphae", {
@ -154,46 +152,38 @@ minetest.register_node("mcl_crimson:warped_hyphae", {
}, },
paramtype2 = "facedir", paramtype2 = "facedir",
on_place = mcl_util.rotate_axis, on_place = mcl_util.rotate_axis,
groups = {handy=1,axey=1, tree=1, building_block=1, material_wood=1}, groups = {handy = 1, axey = 1, tree = 1, building_block = 1, material_wood = 1},
sounds = mcl_sounds.node_sound_wood_defaults(), sounds = mcl_sounds.node_sound_wood_defaults(),
on_rotate = on_rotate, on_rotate = on_rotate,
_mcl_blast_resistance = 2, _mcl_blast_resistance = 2,
stack_max = 64,
_mcl_hardness = 2, _mcl_hardness = 2,
_mcl_stripped_variant = "mcl_crimson:stripped_warped_hyphae", _mcl_stripped_variant = "mcl_crimson:stripped_warped_hyphae",
}) })
minetest.register_node("mcl_crimson:warped_nylium", { minetest.register_node("mcl_crimson:warped_nylium", {
description = S("Warped Nylium"), description = S("Warped Nylium"),
tiles = {"warped_nylium.png", tiles = {
"warped_nylium.png",
"mcl_nether_netherrack.png", "mcl_nether_netherrack.png",
"mcl_nether_netherrack.png^warped_nylium_side.png", "mcl_nether_netherrack.png^warped_nylium_side.png",
"mcl_nether_netherrack.png^warped_nylium_side.png", "mcl_nether_netherrack.png^warped_nylium_side.png",
"mcl_nether_netherrack.png^warped_nylium_side.png", "mcl_nether_netherrack.png^warped_nylium_side.png",
"mcl_nether_netherrack.png^warped_nylium_side.png", "mcl_nether_netherrack.png^warped_nylium_side.png",
}, },
groups = {pickaxey=1, building_block=1, material_stone=1},
paramtype2 = "facedir", paramtype2 = "facedir",
stack_max = 64,
_mcl_hardness = 0.4,
_mcl_blast_resistance = 0.4,
is_ground_content = true, is_ground_content = true,
drop = "mcl_nether:netherrack", drop = "mcl_nether:netherrack",
groups = {pickaxey=1, building_block=1, material_stone=1},
_mcl_hardness = 0.4,
_mcl_blast_resistance = 0.4,
_mcl_silk_touch_drop = true, _mcl_silk_touch_drop = true,
}) })
minetest.register_node("mcl_crimson:warped_checknode", { minetest.register_node("mcl_crimson:warped_checknode", {
description = S("Warped Checknode - only to check!"), description = S("Warped Checknode - only to check!"),
tiles = {"mcl_nether_netherrack.png", tiles = {"mcl_nether_netherrack.png"},
"mcl_nether_netherrack.png", groups = {pickaxey = 1, building_block = 1, material_stone = 1, not_in_creative_inventory = 1},
"mcl_nether_netherrack.png",
"mcl_nether_netherrack.png",
"mcl_nether_netherrack.png",
"mcl_nether_netherrack.png",
},
groups = {pickaxey=1, building_block=1, material_stone=1, not_in_creative_inventory=1},
paramtype2 = "facedir", paramtype2 = "facedir",
stack_max = 64,
_mcl_hardness = 0.4, _mcl_hardness = 0.4,
_mcl_blast_resistance = 0.4, _mcl_blast_resistance = 0.4,
is_ground_content = true, is_ground_content = true,
@ -208,23 +198,22 @@ minetest.register_node("mcl_crimson:warped_hyphae_bark", {
tiles = {"warped_hyphae_side.png"}, tiles = {"warped_hyphae_side.png"},
paramtype2 = "facedir", paramtype2 = "facedir",
on_place = mcl_util.rotate_axis, on_place = mcl_util.rotate_axis,
stack_max = 64, groups = {handy = 1, axey = 1, bark = 1, building_block = 1, material_wood = 1},
groups = {handy=1,axey=1, bark=1, building_block=1, material_wood=1},
sounds = mcl_sounds.node_sound_wood_defaults(), sounds = mcl_sounds.node_sound_wood_defaults(),
is_ground_content = false, is_ground_content = false,
on_rotate = on_rotate, on_rotate = on_rotate,
_mcl_blast_resistance = 2, _mcl_blast_resistance = 2,
_mcl_hardness = 2, _mcl_hardness = 2,
_mcl_stripped_variant = "mcl_crimson:stripped_warped_hyphae_bark", _mcl_stripped_variant = "mcl_crimson:stripped_warped_hyphae_bark",
}) })
minetest.register_craft({ minetest.register_craft({
output = "mcl_crimson:warped_hyphae_bark 3", output = "mcl_crimson:warped_hyphae_bark 3",
recipe = { recipe = {
{ "mcl_crimson:warped_hyphae", "mcl_crimson:warped_hyphae" }, { "mcl_crimson:warped_hyphae", "mcl_crimson:warped_hyphae" },
{ "mcl_crimson:warped_hyphae", "mcl_crimson:warped_hyphae" }, { "mcl_crimson:warped_hyphae", "mcl_crimson:warped_hyphae" },
} },
}) })
minetest.register_node("mcl_crimson:stripped_warped_hyphae", { minetest.register_node("mcl_crimson:stripped_warped_hyphae", {
description = description_stripped_trunk, description = description_stripped_trunk,
@ -233,13 +222,12 @@ minetest.register_node("mcl_crimson:stripped_warped_hyphae", {
tiles = {tile_stripped_inner, tile_stripped_inner, tile_stripped_bark}, tiles = {tile_stripped_inner, tile_stripped_inner, tile_stripped_bark},
paramtype2 = "facedir", paramtype2 = "facedir",
on_place = mcl_util.rotate_axis, on_place = mcl_util.rotate_axis,
stack_max = 64, groups = {handy = 1, axey = 1, tree = 1, building_block = 1, material_wood = 1},
groups = {handy=1, axey=1, tree=1, building_block=1, material_wood=1},
sounds = mcl_sounds.node_sound_wood_defaults(), sounds = mcl_sounds.node_sound_wood_defaults(),
on_rotate = on_rotate, on_rotate = on_rotate,
_mcl_blast_resistance = 2, _mcl_blast_resistance = 2,
_mcl_hardness = 2, _mcl_hardness = 2,
}) })
minetest.register_node("mcl_crimson:stripped_warped_hyphae_bark", { minetest.register_node("mcl_crimson:stripped_warped_hyphae_bark", {
description = description_stripped_bark, description = description_stripped_bark,
@ -247,31 +235,29 @@ minetest.register_node("mcl_crimson:stripped_warped_hyphae_bark", {
tiles = {tile_stripped_bark}, tiles = {tile_stripped_bark},
paramtype2 = "facedir", paramtype2 = "facedir",
on_place = mcl_util.rotate_axis, on_place = mcl_util.rotate_axis,
stack_max = 64, groups = {handy = 1, axey = 1, bark = 1, building_block = 1, material_wood = 1},
groups = {handy=1, axey=1, bark=1, building_block=1, material_wood=1},
sounds = mcl_sounds.node_sound_wood_defaults(), sounds = mcl_sounds.node_sound_wood_defaults(),
is_ground_content = false, is_ground_content = false,
on_rotate = on_rotate, on_rotate = on_rotate,
_mcl_blast_resistance = 2, _mcl_blast_resistance = 2,
_mcl_hardness = 2, _mcl_hardness = 2,
}) })
minetest.register_craft({ minetest.register_craft({
output = "mcl_crimson:stripped_warped_hyphae_bark 3", output = "mcl_crimson:stripped_warped_hyphae_bark 3",
recipe = { recipe = {
{ "mcl_crimson:stripped_warped_hyphae", "mcl_crimson:stripped_warped_hyphae" }, { "mcl_crimson:stripped_warped_hyphae", "mcl_crimson:stripped_warped_hyphae" },
{ "mcl_crimson:stripped_warped_hyphae", "mcl_crimson:stripped_warped_hyphae" }, { "mcl_crimson:stripped_warped_hyphae", "mcl_crimson:stripped_warped_hyphae" },
} },
}) })
--Wood --Wood
minetest.register_node("mcl_crimson:warped_hyphae_wood", { minetest.register_node("mcl_crimson:warped_hyphae_wood", {
description = S("Warped Hyphae Wood"), description = S("Warped Hyphae Wood"),
tiles = {"warped_hyphae_wood.png"}, tiles = {"warped_hyphae_wood.png"},
groups = {handy=5,axey=1, flammable=3,wood=1,building_block=1, material_wood=1, fire_encouragement=5, fire_flammability=20}, groups = {handy = 5,axey = 1, flammable = 3, wood=1,building_block = 1, material_wood = 1, fire_encouragement = 5, fire_flammability = 20},
paramtype2 = "facedir", paramtype2 = "facedir",
stack_max = 64,
_mcl_hardness = 2, _mcl_hardness = 2,
}) })
@ -281,7 +267,7 @@ minetest.register_craft({
output = "mcl_crimson:warped_hyphae_wood 4", output = "mcl_crimson:warped_hyphae_wood 4",
recipe = { recipe = {
{"mcl_crimson:warped_hyphae"}, {"mcl_crimson:warped_hyphae"},
} },
}) })
minetest.register_craft({ minetest.register_craft({
@ -289,7 +275,7 @@ minetest.register_craft({
recipe = { recipe = {
{"mcl_crimson:warped_wart_block"}, {"mcl_crimson:warped_wart_block"},
{"mcl_nether:netherrack"}, {"mcl_nether:netherrack"},
} },
}) })
minetest.register_abm({ minetest.register_abm({
@ -298,7 +284,7 @@ minetest.register_abm({
interval = 11, interval = 11,
chance = 128, chance = 128,
action = function(pos) action = function(pos)
local nodepos = minetest.get_node({x = pos.x, y = pos.y - 1, z = pos.z}) local nodepos = minetest.get_node(vector.offset(pos, 0, -1, 0))
if nodepos.name == "mcl_crimson:warped_nylium" or nodepos.name == "mcl_nether:netherrack" then if nodepos.name == "mcl_crimson:warped_nylium" or nodepos.name == "mcl_nether:netherrack" then
if pos.y < -28400 then if pos.y < -28400 then
generate_warped_tree(pos) generate_warped_tree(pos)
@ -313,20 +299,20 @@ minetest.register_abm({
interval = 1, interval = 1,
chance = 1, chance = 1,
action = function(pos) action = function(pos)
local nodepos = minetest.get_node({x = pos.x, y = pos.y + 1, z = pos.z}) local pos1 = vector.offset(pos, 0, 1, 0)
local nodepos = minetest.get_node(pos1)
if nodepos.name == "air" then if nodepos.name == "air" then
minetest.swap_node({ x = pos.x, y = pos.y, z = pos.z }, { name = "mcl_crimson:warped_nylium" }) minetest.swap_node(pos, { name = "mcl_crimson:warped_nylium" })
local randomg = math.random(1, 40) local randomg = math.random(1, 40)
if randomg == 2 then if randomg == 2 then
minetest.set_node({ x = pos.x, y = pos.y + 1, z = pos.z }, { name = "mcl_crimson:warped_fungus" }) minetest.set_node(pos1, { name = "mcl_crimson:warped_fungus" })
elseif randomg == 7 then elseif randomg == 7 then
local pos1 = { x = pos.x, y = pos.y + 1, z = pos.z }
generate_warped_tree(pos1) generate_warped_tree(pos1)
end end
else else
minetest.swap_node({ x = pos.x, y = pos.y, z = pos.z }, { name = "mcl_nether:netherrack" }) minetest.swap_node(pos, { name = "mcl_nether:netherrack" })
end
end end
end,
}) })
mobs:spawn({ mobs:spawn({
@ -339,8 +325,6 @@ mobs:spawn({
max_height = -28940, max_height = -28940,
}) })
minetest.register_node("mcl_crimson:crimson_fungus", { minetest.register_node("mcl_crimson:crimson_fungus", {
description = S("Crimson Fungus Mushroom"), description = S("Crimson Fungus Mushroom"),
drawtype = "plantlike", drawtype = "plantlike",
@ -351,7 +335,6 @@ minetest.register_node("mcl_crimson:crimson_fungus", {
paramtype = "light", paramtype = "light",
walkable = false, walkable = false,
groups = {dig_immediate=3,mushroom=1,attached_node=1,dig_by_water=1,destroy_by_lava_flow=1,dig_by_piston=1,enderman_takable=1,deco_block=1}, groups = {dig_immediate=3,mushroom=1,attached_node=1,dig_by_water=1,destroy_by_lava_flow=1,dig_by_piston=1,enderman_takable=1,deco_block=1},
light_source = 1, light_source = 1,
selection_box = { selection_box = {
type = "fixed", type = "fixed",
@ -360,7 +343,7 @@ minetest.register_node("mcl_crimson:crimson_fungus", {
node_placement_prediction = "", node_placement_prediction = "",
on_rightclick = function(pos, node, pointed_thing, player) on_rightclick = function(pos, node, pointed_thing, player)
if pointed_thing:get_wielded_item():get_name() == "mcl_dye:white" then if pointed_thing:get_wielded_item():get_name() == "mcl_dye:white" then
local nodepos = minetest.get_node({x = pos.x, y = pos.y - 1, z = pos.z}) local nodepos = minetest.get_node(vector.offset(pos, 0, -1, 0))
if nodepos.name == "mcl_crimson:crimson_nylium" or nodepos.name == "mcl_nether:netherrack" then if nodepos.name == "mcl_crimson:crimson_nylium" or nodepos.name == "mcl_nether:netherrack" then
local random = math.random(1, 5) local random = math.random(1, 5)
if random == 1 then if random == 1 then
@ -370,8 +353,6 @@ minetest.register_node("mcl_crimson:crimson_fungus", {
end end
end, end,
_mcl_blast_resistance = 0, _mcl_blast_resistance = 0,
stack_max = 64,
}) })
minetest.register_node("mcl_crimson:crimson_roots", { minetest.register_node("mcl_crimson:crimson_roots", {
@ -391,7 +372,6 @@ minetest.register_node("mcl_crimson:crimson_roots", {
node_placement_prediction = "", node_placement_prediction = "",
_mcl_silk_touch_drop = false, _mcl_silk_touch_drop = false,
_mcl_blast_resistance = 0, _mcl_blast_resistance = 0,
stack_max = 64,
}) })
minetest.register_node("mcl_crimson:crimson_hyphae", { minetest.register_node("mcl_crimson:crimson_hyphae", {
@ -408,11 +388,10 @@ minetest.register_node("mcl_crimson:crimson_hyphae", {
}, },
paramtype2 = "facedir", paramtype2 = "facedir",
on_place = mcl_util.rotate_axis, on_place = mcl_util.rotate_axis,
groups = {handy=1,axey=1, tree=1, building_block=1, material_wood=1}, groups = {handy = 1, axey = 1, tree = 1, building_block = 1, material_wood = 1},
sounds = mcl_sounds.node_sound_wood_defaults(), sounds = mcl_sounds.node_sound_wood_defaults(),
on_rotate = on_rotate, on_rotate = on_rotate,
_mcl_blast_resistance = 2, _mcl_blast_resistance = 2,
stack_max = 64,
_mcl_hardness = 2, _mcl_hardness = 2,
_mcl_stripped_variant = stripped_variant, _mcl_stripped_variant = stripped_variant,
}) })
@ -425,23 +404,22 @@ minetest.register_node("mcl_crimson:crimson_hyphae_bark", {
tiles = {"crimson_hyphae_side.png"}, tiles = {"crimson_hyphae_side.png"},
paramtype2 = "facedir", paramtype2 = "facedir",
on_place = mcl_util.rotate_axis, on_place = mcl_util.rotate_axis,
stack_max = 64, groups = {handy = 1, axey = 1, bark = 1, building_block = 1, material_wood = 1},
groups = {handy=1,axey=1, bark=1, building_block=1, material_wood=1,},
sounds = mcl_sounds.node_sound_wood_defaults(), sounds = mcl_sounds.node_sound_wood_defaults(),
is_ground_content = false, is_ground_content = false,
on_rotate = on_rotate, on_rotate = on_rotate,
_mcl_blast_resistance = 2, _mcl_blast_resistance = 2,
_mcl_hardness = 2, _mcl_hardness = 2,
_mcl_stripped_variant = "mcl_crimson:stripped_crimson_hyphae_bark", _mcl_stripped_variant = "mcl_crimson:stripped_crimson_hyphae_bark",
}) })
minetest.register_craft({ minetest.register_craft({
output = "mcl_crimson:crimson_hyphae_bark 3", output = "mcl_crimson:crimson_hyphae_bark 3",
recipe = { recipe = {
{ "mcl_crimson:crimson_hyphae", "mcl_crimson:crimson_hyphae" }, { "mcl_crimson:crimson_hyphae", "mcl_crimson:crimson_hyphae" },
{ "mcl_crimson:crimson_hyphae", "mcl_crimson:crimson_hyphae" }, { "mcl_crimson:crimson_hyphae", "mcl_crimson:crimson_hyphae" },
} },
}) })
minetest.register_node("mcl_crimson:stripped_crimson_hyphae", { minetest.register_node("mcl_crimson:stripped_crimson_hyphae", {
description = S("Stripped Crimson Hyphae"), description = S("Stripped Crimson Hyphae"),
@ -450,13 +428,12 @@ minetest.register_node("mcl_crimson:stripped_crimson_hyphae", {
tiles = {"stripped_crimson_stem_top.png", "stripped_crimson_stem_top.png", "stripped_crimson_stem_side.png"}, tiles = {"stripped_crimson_stem_top.png", "stripped_crimson_stem_top.png", "stripped_crimson_stem_side.png"},
paramtype2 = "facedir", paramtype2 = "facedir",
on_place = mcl_util.rotate_axis, on_place = mcl_util.rotate_axis,
stack_max = 64, groups = {handy = 1, axey = 1, tree = 1, building_block = 1, material_wood = 1},
groups = {handy=1, axey=1, tree=1, building_block=1, material_wood=1},
sounds = mcl_sounds.node_sound_wood_defaults(), sounds = mcl_sounds.node_sound_wood_defaults(),
on_rotate = on_rotate, on_rotate = on_rotate,
_mcl_blast_resistance = 2, _mcl_blast_resistance = 2,
_mcl_hardness = 2, _mcl_hardness = 2,
}) })
minetest.register_node("mcl_crimson:stripped_crimson_hyphae_bark", { minetest.register_node("mcl_crimson:stripped_crimson_hyphae_bark", {
description = S("Stripped Crimson Hyphae Bark"), description = S("Stripped Crimson Hyphae Bark"),
@ -464,76 +441,67 @@ minetest.register_node("mcl_crimson:stripped_crimson_hyphae_bark", {
tiles = {"stripped_crimson_stem_side.png"}, tiles = {"stripped_crimson_stem_side.png"},
paramtype2 = "facedir", paramtype2 = "facedir",
on_place = mcl_util.rotate_axis, on_place = mcl_util.rotate_axis,
stack_max = 64, groups = {handy = 1, axey = 1, bark = 1, building_block = 1, material_wood = 1},
groups = {handy=1, axey=1, bark=1, building_block=1, material_wood=1},
sounds = mcl_sounds.node_sound_wood_defaults(), sounds = mcl_sounds.node_sound_wood_defaults(),
is_ground_content = false, is_ground_content = false,
on_rotate = on_rotate, on_rotate = on_rotate,
_mcl_blast_resistance = 2, _mcl_blast_resistance = 2,
_mcl_hardness = 2, _mcl_hardness = 2,
}) })
minetest.register_craft({ minetest.register_craft({
output = "mcl_crimson:stripped_crimson_hyphae_bark 3", output = "mcl_crimson:stripped_crimson_hyphae_bark 3",
recipe = { recipe = {
{ "mcl_crimson:stripped_crimson_hyphae", "mcl_crimson:stripped_crimson_hyphae" }, { "mcl_crimson:stripped_crimson_hyphae", "mcl_crimson:stripped_crimson_hyphae" },
{ "mcl_crimson:stripped_crimson_hyphae", "mcl_crimson:stripped_crimson_hyphae" }, { "mcl_crimson:stripped_crimson_hyphae", "mcl_crimson:stripped_crimson_hyphae" },
} },
}) })
--Wood --Wood
minetest.register_node("mcl_crimson:crimson_hyphae_wood", { minetest.register_node("mcl_crimson:crimson_hyphae_wood", {
description = S("Crimson Hyphae Wood"), description = S("Crimson Hyphae Wood"),
tiles = {"crimson_hyphae_wood.png"}, tiles = {"crimson_hyphae_wood.png"},
groups = {handy=5,axey=1, wood=1,building_block=1, material_wood=1,}, groups = {handy = 5, axey = 1, wood = 1, building_block = 1, material_wood = 1},
paramtype2 = "facedir", paramtype2 = "facedir",
stack_max = 64,
_mcl_hardness = 2, _mcl_hardness = 2,
}) })
minetest.register_node("mcl_crimson:crimson_nylium", { minetest.register_node("mcl_crimson:crimson_nylium", {
description = S("Crimson Nylium"), description = S("Crimson Nylium"),
tiles = {"crimson_nylium.png", tiles = {
"crimson_nylium.png",
"mcl_nether_netherrack.png", "mcl_nether_netherrack.png",
"mcl_nether_netherrack.png^crimson_nylium_side.png", "mcl_nether_netherrack.png^crimson_nylium_side.png",
"mcl_nether_netherrack.png^crimson_nylium_side.png", "mcl_nether_netherrack.png^crimson_nylium_side.png",
"mcl_nether_netherrack.png^crimson_nylium_side.png", "mcl_nether_netherrack.png^crimson_nylium_side.png",
"mcl_nether_netherrack.png^crimson_nylium_side.png", "mcl_nether_netherrack.png^crimson_nylium_side.png",
}, },
groups = {pickaxey=1, building_block=1, material_stone=1}, groups = {pickaxey = 1, building_block = 1, material_stone = 1},
paramtype2 = "facedir", paramtype2 = "facedir",
stack_max = 64,
_mcl_hardness = 0.4,
_mcl_blast_resistance = 0.4,
is_ground_content = true, is_ground_content = true,
drop = "mcl_nether:netherrack", drop = "mcl_nether:netherrack",
_mcl_hardness = 0.4,
_mcl_blast_resistance = 0.4,
_mcl_silk_touch_drop = true, _mcl_silk_touch_drop = true,
}) })
minetest.register_node("mcl_crimson:crimson_checknode", { minetest.register_node("mcl_crimson:crimson_checknode", {
description = S("Crimson Checknode - only to check!"), description = S("Crimson Checknode - only to check!"),
tiles = {"mcl_nether_netherrack.png", tiles = {"mcl_nether_netherrack.png"},
"mcl_nether_netherrack.png", groups = {pickaxey = 1, building_block = 1, material_stone = 1, not_in_creative_inventory = 1},
"mcl_nether_netherrack.png",
"mcl_nether_netherrack.png",
"mcl_nether_netherrack.png",
"mcl_nether_netherrack.png",
},
groups = {pickaxey=1, building_block=1, material_stone=1, not_in_creative_inventory=1},
paramtype2 = "facedir", paramtype2 = "facedir",
stack_max = 64, is_ground_content = true,
drop = "mcl_nether:netherrack",
_mcl_hardness = 0.4, _mcl_hardness = 0.4,
_mcl_blast_resistance = 0.4, _mcl_blast_resistance = 0.4,
is_ground_content = true,
drop = "mcl_nether:netherrack"
}) })
minetest.register_craft({ minetest.register_craft({
output = "mcl_crimson:crimson_hyphae_wood 4", output = "mcl_crimson:crimson_hyphae_wood 4",
recipe = { recipe = {
{"mcl_crimson:crimson_hyphae"}, {"mcl_crimson:crimson_hyphae"},
} },
}) })
minetest.register_craft({ minetest.register_craft({
@ -541,7 +509,7 @@ minetest.register_craft({
recipe = { recipe = {
{"mcl_nether:nether_wart"}, {"mcl_nether:nether_wart"},
{"mcl_nether:netherrack"}, {"mcl_nether:netherrack"},
} },
}) })
mcl_stairs.register_stair_and_slab_simple("crimson_hyphae_wood", "mcl_crimson:crimson_hyphae_wood", "Crimson Stair", "Crimson Slab", "Double Crimson Slab") mcl_stairs.register_stair_and_slab_simple("crimson_hyphae_wood", "mcl_crimson:crimson_hyphae_wood", "Crimson Stair", "Crimson Slab", "Double Crimson Slab")
@ -552,7 +520,7 @@ minetest.register_abm({
interval = 11, interval = 11,
chance = 128, chance = 128,
action = function(pos) action = function(pos)
local nodepos = minetest.get_node({x = pos.x, y = pos.y - 1, z = pos.z}) local nodepos = minetest.get_node(vector.offset(pos, 0, -1, 0))
if nodepos.name == "mcl_crimson:crimson_nylium" or nodepos.name == "mcl_nether:netherrack" then if nodepos.name == "mcl_crimson:crimson_nylium" or nodepos.name == "mcl_nether:netherrack" then
if pos.y < -28400 then if pos.y < -28400 then
generate_crimson_tree(pos) generate_crimson_tree(pos)
@ -567,35 +535,37 @@ minetest.register_abm({
interval = 1, interval = 1,
chance = 1, chance = 1,
action = function(pos) action = function(pos)
local nodepos = minetest.get_node({x = pos.x, y = pos.y + 1, z = pos.z}) local pos1 = vector.offset(pos, 0, 1, 0)
local nodepos = minetest.get_node(pos1)
if nodepos.name == "air" then if nodepos.name == "air" then
minetest.swap_node({ x = pos.x, y = pos.y, z = pos.z }, { name = "mcl_crimson:crimson_nylium" }) minetest.swap_node(pos, { name = "mcl_crimson:crimson_nylium" })
local randomg = math.random(1, 400) local randomg = math.random(1, 400)
if randomg <= 10 then if randomg <= 10 then
minetest.set_node({ x = pos.x, y = pos.y + 1, z = pos.z }, { name = "mcl_crimson:crimson_fungus" }) minetest.set_node(pos1, { name = "mcl_crimson:crimson_fungus" })
elseif randomg > 10 and randomg <= 25 then elseif randomg > 10 and randomg <= 25 then
local pos1 = { x = pos.x, y = pos.y + 1, z = pos.z }
generate_crimson_tree(pos1) generate_crimson_tree(pos1)
elseif randomg > 25 and randomg <= 30 then elseif randomg > 25 and randomg <= 30 then
minetest.set_node({ x = pos.x, y = pos.y + 1, z = pos.z }, { name = "mcl_crimson:warped_fungus" }) minetest.set_node(pos1, { name = "mcl_crimson:warped_fungus" })
elseif randomg > 30 and randomg <= 130 then elseif randomg > 30 and randomg <= 130 then
minetest.set_node({ x = pos.x, y = pos.y + 1, z = pos.z }, { name = "mcl_crimson:crimson_roots" }) minetest.set_node(pos1, { name = "mcl_crimson:crimson_roots" })
end end
else else
minetest.swap_node({ x = pos.x, y = pos.y, z = pos.z }, { name = "mcl_nether:netherrack" }) minetest.swap_node(pos, { name = "mcl_nether:netherrack" })
end end
end end
}) })
function generate_warped_tree(pos) local function generate_warped_tree(pos)
breakgrow = false local breakgrow = false
breakgrow2 = false local breakgrow2 = false
-- Baumgenerator -- Baumgenerator
-- erste und zweite Etage -- erste und zweite Etage
for x = pos.x - 2,pos.x + 2 do for x = pos.x - 2,pos.x + 2 do
for y = pos.y + 3, pos.y + 4 do for y = pos.y + 3, pos.y + 4 do
for z = pos.z - 2, pos.z + 2 do for z = pos.z - 2, pos.z + 2 do
if not (minetest.get_node({x = x, y = y, z = z}).name == "air") then breakgrow = true end if not (minetest.get_node(vector.new(x, y, z)).name == "air") then breakgrow = true end
end end
end end
end end
@ -604,7 +574,7 @@ function generate_warped_tree(pos)
for x = pos.x - 1,pos.x + 1 do for x = pos.x - 1,pos.x + 1 do
for y = pos.y + 5, pos.y + 6 do for y = pos.y + 5, pos.y + 6 do
for z = pos.z - 1, pos.z + 1 do for z = pos.z - 1, pos.z + 1 do
if not (minetest.get_node({x = x, y = y, z = z}).name == "air") then breakgrow = true end if not (minetest.get_node(vector.new(x, y, z)).name == "air") then breakgrow = true end
end end
end end
end end
@ -616,17 +586,17 @@ function generate_warped_tree(pos)
if not (minetest.get_node({x = pos.x, y = pos.y, z = pos.z}).name == "air") and not (minetest.get_node({x = pos.x, y = pos.y, z = pos.z}).name == "mcl_crimson:warped_fungus") then breakgrow = true end if not (minetest.get_node({x = pos.x, y = pos.y, z = pos.z}).name == "air") and not (minetest.get_node({x = pos.x, y = pos.y, z = pos.z}).name == "mcl_crimson:warped_fungus") then breakgrow = true end
for y = pos.y + 1, pos.y + 4 do for y = pos.y + 1, pos.y + 4 do
if not (minetest.get_node({x = pos.x, y = y, z = pos.z}).name == "air") then breakgrow = true end if not (minetest.get_node({x = pos.x, y = y, z = pos.z}).name == "air") then breakgrow = true end
print(minetest.get_node({x = pos.x, y = y, z = pos.z}).name) --print(minetest.get_node({x = pos.x, y = y, z = pos.z}).name)
end end
if not (minetest.get_node({x = pos.x, y = pos.y, z = pos.z}).name == "air") and not (minetest.get_node({x = pos.x, y = pos.y, z = pos.z}).name == "mcl_crimson:warped_fungus") then breakgrow2 = true end if not (minetest.get_node({x = pos.x, y = pos.y, z = pos.z}).name == "air") and not (minetest.get_node({x = pos.x, y = pos.y, z = pos.z}).name == "mcl_crimson:warped_fungus") then breakgrow2 = true end
print(tostring(breakgrow)) --print(tostring(breakgrow))
if breakgrow == false then if breakgrow == false then
-- Warzen -- Warzen
-- erste und zweite Etage -- erste und zweite Etage
for x = pos.x - 2,pos.x + 2 do for x = pos.x - 2,pos.x + 2 do
for y = pos.y + 3, pos.y + 4 do for y = pos.y + 3, pos.y + 4 do
for z = pos.z - 2, pos.z + 2 do for z = pos.z - 2, pos.z + 2 do
minetest.set_node({x = x, y = y, z = z}, { name = "mcl_crimson:warped_wart_block" }) minetest.set_node(vector.new(x, y, z), { name = "mcl_crimson:warped_wart_block" })
end end
end end
end end
@ -635,7 +605,7 @@ function generate_warped_tree(pos)
for x = pos.x - 1,pos.x + 1 do for x = pos.x - 1,pos.x + 1 do
for y = pos.y + 5, pos.y + 6 do for y = pos.y + 5, pos.y + 6 do
for z = pos.z - 1, pos.z + 1 do for z = pos.z - 1, pos.z + 1 do
minetest.set_node({x = x, y = y, z = z}, { name = "mcl_crimson:warped_wart_block" }) minetest.set_node(vector.new(x, y, z), { name = "mcl_crimson:warped_wart_block" })
end end
end end
end end
@ -662,19 +632,19 @@ function generate_warped_tree(pos)
--print("Placed at " .. x .. " " .. y .. " " .. z) --print("Placed at " .. x .. " " .. y .. " " .. z)
end end
else else
if breakgrow2 == false then minetest.set_node(pos,{ name = "mcl_crimson:warped_fungus" }) end if breakgrow2 == false then minetest.set_node(pos, { name = "mcl_crimson:warped_fungus" }) end
end end
end end
function generate_crimson_tree(pos) function generate_crimson_tree(pos)
breakgrow = false local breakgrow = false
breakgrow2 = false local breakgrow2 = false
-- Baumgenerator -- Baumgenerator
-- erste und zweite Etage -- erste und zweite Etage
for x = pos.x - 2,pos.x + 2 do for x = pos.x - 2,pos.x + 2 do
for y = pos.y + 3, pos.y + 4 do for y = pos.y + 3, pos.y + 4 do
for z = pos.z - 2, pos.z + 2 do for z = pos.z - 2, pos.z + 2 do
if not (minetest.get_node({x = x, y = y, z = z}).name == "air") then breakgrow = true end if not (minetest.get_node(vector.new(x, y, z)).name == "air") then breakgrow = true end
end end
end end
end end
@ -683,7 +653,7 @@ function generate_crimson_tree(pos)
for x = pos.x - 1,pos.x + 1 do for x = pos.x - 1,pos.x + 1 do
for y = pos.y + 5, pos.y + 6 do for y = pos.y + 5, pos.y + 6 do
for z = pos.z - 1, pos.z + 1 do for z = pos.z - 1, pos.z + 1 do
if not (minetest.get_node({x = x, y = y, z = z}).name == "air") then breakgrow = true end if not (minetest.get_node(vector.new(x, y, z)).name == "air") then breakgrow = true end
end end
end end
end end
@ -695,10 +665,10 @@ function generate_crimson_tree(pos)
if not (minetest.get_node({x = pos.x, y = pos.y, z = pos.z}).name == "air") and not (minetest.get_node({x = pos.x, y = pos.y, z = pos.z}).name == "mcl_crimson:crimson_fungus") then breakgrow = true end if not (minetest.get_node({x = pos.x, y = pos.y, z = pos.z}).name == "air") and not (minetest.get_node({x = pos.x, y = pos.y, z = pos.z}).name == "mcl_crimson:crimson_fungus") then breakgrow = true end
for y = pos.y + 1, pos.y + 4 do for y = pos.y + 1, pos.y + 4 do
if not (minetest.get_node({x = pos.x, y = y, z = pos.z}).name == "air") then breakgrow = true end if not (minetest.get_node({x = pos.x, y = y, z = pos.z}).name == "air") then breakgrow = true end
print(minetest.get_node({x = pos.x, y = y, z = pos.z}).name) --print(minetest.get_node({x = pos.x, y = y, z = pos.z}).name)
end end
if not (minetest.get_node({x = pos.x, y = pos.y, z = pos.z}).name == "air") and not (minetest.get_node({x = pos.x, y = pos.y, z = pos.z}).name == "mcl_crimson:crimson_fungus") then breakgrow2 = true end if not (minetest.get_node({x = pos.x, y = pos.y, z = pos.z}).name == "air") and not (minetest.get_node({x = pos.x, y = pos.y, z = pos.z}).name == "mcl_crimson:crimson_fungus") then breakgrow2 = true end
print(tostring(breakgrow)) --print(tostring(breakgrow))
if breakgrow == false then if breakgrow == false then
-- Warzen -- Warzen
-- erste und zweite Etage -- erste und zweite Etage
@ -741,7 +711,7 @@ function generate_crimson_tree(pos)
--print("Placed at " .. x .. " " .. y .. " " .. z) --print("Placed at " .. x .. " " .. y .. " " .. z)
end end
else else
if breakgrow2 == false then minetest.set_node(pos,{ name = "mcl_crimson:crimson_fungus" }) end if breakgrow2 == false then minetest.set_node(pos, { name = "mcl_crimson:crimson_fungus" }) end
end end
end end
@ -827,6 +797,7 @@ minetest.register_ore({
}) })
--]] --]]
--[[
minetest.register_decoration({ minetest.register_decoration({
deco_type = "simple", deco_type = "simple",
place_on = {"mcl_crimson:warped_nylium"}, place_on = {"mcl_crimson:warped_nylium"},
@ -849,3 +820,4 @@ minetest.register_decoration({
y_min = -29065, y_min = -29065,
decoration = "mcl_crimson:crimson_fungus", decoration = "mcl_crimson:crimson_fungus",
}) })
]]

View File

@ -1,4 +1,4 @@
# textdomain: mcl_mushroom # textdomain: mcl_crimson
Warped Fungus Mushroom=Wirrpilz Warped Fungus Mushroom=Wirrpilz
Twisting Vines=Zwirbelranken Twisting Vines=Zwirbelranken

View File

@ -1,4 +1,4 @@
# textdomain: mcl_mushroom # textdomain: mcl_crimson
Warped Fungus Mushroom=Champignon tordu Warped Fungus Mushroom=Champignon tordu
Twisting Vines=Liane tordue Twisting Vines=Liane tordue

View File

@ -1,4 +1,4 @@
# textdomain: mcl_mushroom # textdomain: mcl_crimson
Warped Fungus Mushroom= Warped Fungus Mushroom=
Twisting Vines= Twisting Vines=

View File

@ -1,2 +1,4 @@
depends = mcl_stairs, mobs_mc
name = mcl_crimson name = mcl_crimson
author = debiankaios
depends = mcl_stairs, mobs_mc, mcl_util