Update Fork #9

Merged
chmodsayshello merged 403 commits from MineClone5/MineClone5:master into master 2022-08-02 15:50:37 +02:00
16 changed files with 664 additions and 483 deletions
Showing only changes of commit b4bc3e70b3 - Show all commits

View File

@ -417,6 +417,7 @@ function mcl_util.deal_damage(target, damage, mcl_reason)
-- target:punch(puncher, 1.0, {full_punch_interval = 1.0, damage_groups = {fleshy = damage}}, vector.direction(puncher:get_pos(), target:get_pos()), damage)
if luaentity.health > 0 then
luaentity.health = luaentity.health - damage
luaentity.pause_timer = 0.4
end
return
end

View File

@ -246,4 +246,4 @@ water-16,
water)
--spawn egg
mobs:register_egg("extra_mobs:dolphin", S("dolphin"), "extra_mobs_spawn_icon_dolphin.png", 0)
mobs:register_egg("extra_mobs:dolphin", S("Dolphin"), "extra_mobs_spawn_icon_dolphin.png", 0)

View File

@ -296,5 +296,5 @@ minetest.LIGHT_MAX+1,
mobs_mc.spawn_height.nether_min,
mobs_mc.spawn_height.nether_max)
-- spawn eggs
mobs:register_egg("extra_mobs:piglin", S("piglin"), "extra_mobs_spawn_icon_piglin.png", 0)
mobs:register_egg("extra_mobs:piglin_brute", S("piglin Brute"), "extra_mobs_spawn_icon_piglin.png", 0)
mobs:register_egg("extra_mobs:piglin", S("Piglin"), "extra_mobs_spawn_icon_piglin.png", 0)
mobs:register_egg("extra_mobs:piglin_brute", S("Piglin Brute"), "extra_mobs_spawn_icon_piglin.png", 0)

View File

@ -65,6 +65,8 @@ mcl_item_entity.register_pickup_achievement("tree", "mcl:mineWood")
mcl_item_entity.register_pickup_achievement("mcl_mobitems:blaze_rod", "mcl:blazeRod")
mcl_item_entity.register_pickup_achievement("mcl_mobitems:leather", "mcl:killCow")
mcl_item_entity.register_pickup_achievement("mcl_core:diamond", "mcl:diamonds")
mcl_item_entity.register_pickup_achievement("mcl_core:crying_obsidian", "mcl:whosCuttingOnions")
mcl_item_entity.register_pickup_achievement("mcl_nether:ancient_debris", "mcl:hiddenInTheDepths")
local function check_pickup_achievements(object, player)
if has_awards then

View File

@ -101,6 +101,18 @@ awards.register_achievement("mcl:bookcase", {
}
})
awards.register_achievement("mcl:buildIronPickaxe", {
title = S("Isn't It Iron Pick"),
-- TODO: This achievement should support all non-wood pickaxes
description = S("Craft a iron pickaxe using sticks and iron."),
icon = "default_tool_steelpick.png",
trigger = {
type = "craft",
item = "mcl_tools:pick_iron",
target = 1
}
})
-- Item pickup achievements: These are awarded when picking up a certain item.
-- The achivements are manually given in the mod mcl_item_entity.
awards.register_achievement("mcl:diamonds", {
@ -125,6 +137,24 @@ awards.register_achievement("mcl:mineWood", {
icon = "default_tree.png",
})
awards.register_achievement("mcl:whosCuttingOnions", {
title = S("Who is Cutting Onions?"),
description = S("Pick up a crying obsidian from the floor."),
icon = "default_obsidian.png^mcl_core_crying_obsidian.png",
})
awards.register_achievement("mcl:hiddenInTheDepths", {
title = S("Hidden in the Depths"),
description = S("Pick up an Ancient Debris from the floor."),
icon = "mcl_nether_ancient_debris_side.png",
})
awards.register_achievement("mcl:notQuiteNineLives", {
title = S('Not Quite "Nine" Lives'),
description = S("Charge a Respawn Anchor to the maximum."),
icon = "respawn_anchor_side4.png",
})
-- Smelting achivements: These are awarded when picking up an item from a furnace
-- output. They are given in mcl_furnaces.
awards.register_achievement("mcl:acquireIron", {
@ -163,6 +193,12 @@ awards.register_achievement("mcl:buildNetherPortal", {
icon = "default_obsidian.png",
})
awards.register_achievement("mcl:enterEndPortal", {
title = S("The End?"),
description = S("Or the beginning?\nHint: Enter an end portal."),
icon = "mcl_end_end_stone.png",
})
-- NON-PC ACHIEVEMENTS (XBox, Pocket Edition, etc.)
if non_pc_achievements then

View File

@ -5,14 +5,14 @@
minetest.register_node("mcl_beds:respawn_anchor",{
description="respawn anchor",
tiles = {
description="Respawn Anchor",
tiles = {
"respawn_anchor_top_off.png",
"respawn_anchor_bottom.png",
"respawn_anchor_side0.png"
},
drawtype = "nodebox",
node_box= { --Reused the composter nodebox, since it is basicly the same
drawtype = "nodebox",
node_box= { --Reused the composter nodebox, since it is basicly the same
type = "fixed",
fixed = {
{-0.5, -0.5, -0.5, -0.375, 0.5, 0.5}, -- Left wall
@ -22,28 +22,28 @@ minetest.register_node("mcl_beds:respawn_anchor",{
{-0.5, -0.5, -0.5, 0.5, -0.47, 0.5}, -- Bottom level, -0.47 because -0.5 is so low that you can see the texture of the block below through
}
},
on_rightclick = function(pos, node, player, itemstack)
if itemstack.get_name(itemstack) == "mcl_nether:glowstone" then
minetest.set_node(pos, {name="mcl_beds:respawn_anchor_charged_1"})
itemstack:take_item()
else
if pos.y < -29077 or pos.y > -28933 then
mcl_explosions.explode(pos, 5, {drop_chance = 0, fire = true})
end
end
on_rightclick = function(pos, node, player, itemstack)
if itemstack.get_name(itemstack) == "mcl_nether:glowstone" then
minetest.set_node(pos, {name="mcl_beds:respawn_anchor_charged_1"})
itemstack:take_item()
else
if pos.y < -29077 or pos.y > -28933 then
mcl_explosions.explode(pos, 5, {drop_chance = 0, fire = true})
end
end
end,
groups = {pickaxey=1, material_stone=1},
_mcl_hardness = 22.5
groups = {pickaxey=1, material_stone=1},
_mcl_hardness = 22.5
})
minetest.register_node("mcl_beds:respawn_anchor_charged_1",{
description="respawn anchor",
tiles = {
description="Respawn Anchor",
tiles = {
"portal.png",
"respawn_anchor_bottom.png",
"respawn_anchor_side1.png"
},
drawtype = "nodebox",
node_box= { --Reused the composter nodebox, since it is basicly the same
drawtype = "nodebox",
node_box= { --Reused the composter nodebox, since it is basicly the same
type = "fixed",
fixed = {
{-0.5, -0.5, -0.5, -0.375, 0.5, 0.5}, -- Left wall
@ -53,31 +53,31 @@ minetest.register_node("mcl_beds:respawn_anchor_charged_1",{
{-0.5, -0.5, -0.5, 0.5, 0.5, 0.5}, -- Bottom level
}
},
on_rightclick = function(pos, node, player, itemstack)
if itemstack.get_name(itemstack) == "mcl_nether:glowstone" then
minetest.set_node(pos, {name="mcl_beds:respawn_anchor_charged_2"})
itemstack:take_item()
else
if pos.y < -29077 or pos.y > -28933 then
mcl_explosions.explode(pos, 5, {drop_chance = 0, fire = true})
else
mcl_spawn.set_spawn_pos(player, pos, nil)
end
end
end,
groups = {pickaxey=1, material_stone=1, not_in_creative_inventory=1},
_mcl_hardness = 22.5
on_rightclick = function(pos, node, player, itemstack)
if itemstack.get_name(itemstack) == "mcl_nether:glowstone" then
minetest.set_node(pos, {name="mcl_beds:respawn_anchor_charged_2"})
itemstack:take_item()
else
if pos.y < -29077 or pos.y > -28933 then
mcl_explosions.explode(pos, 5, {drop_chance = 0, fire = true})
else
mcl_spawn.set_spawn_pos(player, pos, nil)
end
end
end,
groups = {pickaxey=1, material_stone=1, not_in_creative_inventory=1},
_mcl_hardness = 22.5
})
minetest.register_node("mcl_beds:respawn_anchor_charged_2",{
description="respawn anchor",
tiles = {
description="Respawn Anchor",
tiles = {
"portal.png",
"respawn_anchor_bottom.png",
"respawn_anchor_side2.png"
},
drawtype = "nodebox",
node_box= { --Reused the composter nodebox, since it is basicly the same
drawtype = "nodebox",
node_box= { --Reused the composter nodebox, since it is basicly the same
type = "fixed",
fixed = {
{-0.5, -0.5, -0.5, -0.375, 0.5, 0.5}, -- Left wall
@ -87,31 +87,31 @@ minetest.register_node("mcl_beds:respawn_anchor_charged_2",{
{-0.5, -0.5, -0.5, 0.5, 0.5, 0.5}, -- Bottom level
}
},
on_rightclick = function(pos, node, player, itemstack)
if itemstack.get_name(itemstack) == "mcl_nether:glowstone" then
minetest.set_node(pos, {name="mcl_beds:respawn_anchor_charged_3"})
itemstack:take_item()
else
if pos.y < -29077 or pos.y > -28933 then
mcl_explosions.explode(pos, 5, {drop_chance = 0, fire = true})
else
mcl_spawn.set_spawn_pos(player, pos, nil)
end
end
end,
groups = {pickaxey=1, material_stone=1, not_in_creative_inventory=1},
_mcl_hardness = 22.5
on_rightclick = function(pos, node, player, itemstack)
if itemstack.get_name(itemstack) == "mcl_nether:glowstone" then
minetest.set_node(pos, {name="mcl_beds:respawn_anchor_charged_3"})
itemstack:take_item()
else
if pos.y < -29077 or pos.y > -28933 then
mcl_explosions.explode(pos, 5, {drop_chance = 0, fire = true})
else
mcl_spawn.set_spawn_pos(player, pos, nil)
end
end
end,
groups = {pickaxey=1, material_stone=1, not_in_creative_inventory=1},
_mcl_hardness = 22.5
})
minetest.register_node("mcl_beds:respawn_anchor_charged_3",{
description="respawn anchor",
tiles = {
description="Respawn Anchor",
tiles = {
"portal.png",
"respawn_anchor_bottom.png",
"respawn_anchor_side3.png"
},
drawtype = "nodebox",
node_box= { --Reused the composter nodebox, since it is basicly the same
drawtype = "nodebox",
node_box= { --Reused the composter nodebox, since it is basicly the same
type = "fixed",
fixed = {
{-0.5, -0.5, -0.5, -0.375, 0.5, 0.5}, -- Left wall
@ -121,52 +121,56 @@ minetest.register_node("mcl_beds:respawn_anchor_charged_3",{
{-0.5, -0.5, -0.5, 0.5, 0.5, 0.5}, -- Bottom level
}
},
on_rightclick = function(pos, node, player, itemstack)
if itemstack.get_name(itemstack) == "mcl_nether:glowstone" then
minetest.set_node(pos, {name="mcl_beds:respawn_anchor_charged_4"})
itemstack:take_item()
else
if pos.y < -29077 or pos.y > -28933 then
mcl_explosions.explode(pos, 5, {drop_chance = 0, fire = true})
else
mcl_spawn.set_spawn_pos(player, pos, nil)
end
end
end,
groups = {pickaxey=1, material_stone=1, not_in_creative_inventory=1},
_mcl_hardness = 22.5
on_rightclick = function(pos, node, player, itemstack)
if itemstack.get_name(itemstack) == "mcl_nether:glowstone" then
minetest.set_node(pos, {name="mcl_beds:respawn_anchor_charged_4"})
itemstack:take_item()
else
if pos.y < -29077 or pos.y > -28933 then
mcl_explosions.explode(pos, 5, {drop_chance = 0, fire = true})
else
mcl_spawn.set_spawn_pos(player, pos, nil)
end
end
end,
groups = {pickaxey=1, material_stone=1, not_in_creative_inventory=1},
_mcl_hardness = 22.5
})
minetest.register_node("mcl_beds:respawn_anchor_charged_4",{
description="respawn anchor",
tiles = {
description="Respawn Anchor",
tiles = {
"portal.png",
"respawn_anchor_bottom.png",
"respawn_anchor_side4.png"
},
drawtype = "nodebox",
node_box= { --Reused the composter nodebox, since it is basicly the same
drawtype = "nodebox",
node_box= { --Reused the composter nodebox, since it is basicly the same
type = "fixed",
fixed = {
{-0.5, -0.5, -0.5, -0.375, 0.5, 0.5}, -- Left wall
{-0.5, -0.5, -0.5, -0.375, 0.5, 0.5}, -- Left wall
{ 0.375, -0.5, -0.5, 0.5, 0.5, 0.5}, -- Right wall
{-0.375, -0.5, 0.375, 0.375, 0.5, 0.5}, -- Back wall
{-0.375, -0.5, -0.5, 0.375, 0.5, -0.375}, -- Front wall
{-0.5, -0.5, -0.5, 0.5, 0.5, 0.5}, -- Bottom level
}
},
on_rightclick = function(pos, node, player, itemstack)
if pos.y < -29077 or pos.y > -28933 then
mcl_explosions.explode(pos, 5, {drop_chance = 0, fire = true})
else
mcl_spawn.set_spawn_pos(player, pos, nil)
end
end,
groups = {pickaxey=1, material_stone=1, not_in_creative_inventory=1},
_mcl_hardness = 22.5
on_rightclick = function(pos, node, player, itemstack)
if pos.y < -29077 or pos.y > -28933 then
mcl_explosions.explode(pos, 5, {drop_chance = 0, fire = true})
else
mcl_spawn.set_spawn_pos(player, pos, nil)
awards.unlock(player:get_player_name(), "mcl:notQuiteNineLives")
end
end,
groups = {pickaxey=1, material_stone=1, not_in_creative_inventory=1},
_mcl_hardness = 22.5
})
minetest.register_craft({ output = "mcl_beds:respawn_anchor",
recipe = { {"mcl_core:crying_obsidian", "mcl_core:crying_obsidian", "mcl_core:crying_obsidian"},
{"mcl_nether:glowstone", "mcl_nether:glowstone", "mcl_nether:glowstone"},
{"mcl_core:crying_obsidian", "mcl_core:crying_obsidian", "mcl_core:crying_obsidian"} } })
recipe = {
{"mcl_core:crying_obsidian", "mcl_core:crying_obsidian", "mcl_core:crying_obsidian"},
{"mcl_nether:glowstone", "mcl_nether:glowstone", "mcl_nether:glowstone"},
{"mcl_core:crying_obsidian", "mcl_core:crying_obsidian", "mcl_core:crying_obsidian"}
}
})

View File

@ -1,3 +1,5 @@
--TODO: Add advancement
local S = minetest.get_translator(minetest.get_current_modname())
mcl_compass = {}
@ -9,28 +11,58 @@ local compass_frames = 32
-- Timer for random compass spinning
local random_timer = 0
local random_timer_trigger = 0.5 -- random compass spinning tick in seconds. Increase if there are performance problems
local random_timer_trigger = 0.5 -- random compass spinning tick in seconds. Incr ease if there are performance problems
local random_frame = math.random(0, compass_frames-1)
function mcl_compass.get_compass_image(pos, dir)
function mcl_compass.get_compass_image(pos, dir, x, y, z)
-- Compasses do not work in certain zones
if mcl_worlds.compass_works(pos) then
local spawn = {x=0,y=0,z=0}
local ssp = minetest.setting_get_pos("static_spawnpoint")
if ssp then
spawn = ssp
if type(spawn) ~= "table" or type(spawn.x) ~= "number" or type(spawn.y) ~= "number" or type(spawn.z) ~= "number" then
spawn = {x=0,y=0,z=0}
if mcl_worlds.compass_works(pos) and x ~= nil and y ~= nil and z ~= nil then
local _, dim = mcl_worlds.y_to_layer(y)
local _, playerdim = mcl_worlds.y_to_layer(pos.y)
if dim == playerdim then --Check if player and compass target are in the same dimension, above check is just if the diemension is valid for the non lodestone compass
local spawn = {x=x,y=y,z=z}
local ssp = minetest.setting_get_pos("static_spawnpoint")
if ssp and x == 0 and y == 0 and z == 0 then
spawn = ssp
if type(spawn) ~= "table" or type(spawn.x) ~= "number" or type(spawn.y) ~= "number" or type(spawn.z) ~= "number" then
spawn = {x=0,y=0,z=0}
end
end
local angle_north = math.deg(math.atan2(spawn.x - pos.x, spawn.z - pos.z))
if angle_north < 0 then angle_north = angle_north + 360 end
local angle_dir = -math.deg(dir)
local angle_relative = (angle_north - angle_dir + 180) % 360
return math.floor((angle_relative/11.25) + 0.5) % compass_frames
else
return random_frame
end
local angle_north = math.deg(math.atan2(spawn.x - pos.x, spawn.z - pos.z))
if angle_north < 0 then angle_north = angle_north + 360 end
local angle_dir = -math.deg(dir)
local angle_relative = (angle_north - angle_dir + 180) % 360
return math.floor((angle_relative/11.25) + 0.5) % compass_frames
else
return random_frame
if x ~= 0 and y ~= 0 and z~= 0 and x ~= nil and y ~= nil and x~= nil then
local _, dim = mcl_worlds.y_to_layer(y)
local _, playerdim = mcl_worlds.y_to_layer(pos.y)
if dim == playerdim then --already explained that very same if statement above
local spawn = {x=x,y=y,z=z}
local ssp = minetest.setting_get_pos("static_spawnpoint")
if ssp and x == 0 and y == 0 and z == 0 then
spawn = ssp
if type(spawn) ~= "table" or type(spawn.x) ~= "number" or type(spawn.y) ~= "number" or type(spawn.z) ~= "number" then
spawn = {x=0,y=0,z=0}
end
end
local angle_north = math.deg(math.atan2(spawn.x - pos.x, spawn.z - pos.z))
if angle_north < 0 then angle_north = angle_north + 360 end
local angle_dir = -math.deg(dir)
local angle_relative = (angle_north - angle_dir + 180) % 360
return math.floor((angle_relative/11.25) + 0.5) % compass_frames
else
return random_frame
end
else
return random_frame
end
end
end
@ -52,9 +84,39 @@ minetest.register_globalstep(function(dtime)
end
if has_compass(player) then
local pos = player:get_pos()
local compass_image = mcl_compass.get_compass_image(pos, player:get_look_horizontal())
for j,stack in pairs(player:get_inventory():get_list("main")) do
x = stack:get_meta():get_string("x") -- i know i could write the pos in meta, but i like this method more, and it is basicly the same, since else there would be one table with 3 values, and i have 3 values on their own
y = stack:get_meta():get_string("y")
z = stack:get_meta():get_string("z")
x = tonumber(x)
y = tonumber(y)
z = tonumber(z)
if x == nil or y == nil or z == nil then --checking if the compass has lodestone meta
compass_image = mcl_compass.get_compass_image(pos, player:get_look_horizontal(), 0, 0, 0) --no lodestone meta
else
checkblock = {x = x, y = y, z = z}
local function get_far_node(pos) --function that tries to read node normally, and does it even if its unloaded https://dev.minetest.net/minetest.get_node
local node = minetest.get_node(pos)
if node.name == "ignore" then
minetest.get_voxel_manip():read_from_map(pos, pos)
node = minetest.get_node(pos)
end
return node
end
if get_far_node(checkblock).name == "mcl_compass:lodestone" then --check if lodestone still exists
compass_image = mcl_compass.get_compass_image(pos, player:get_look_horizontal(), x, y, z)
compass_image = compass_image .. "_lodestone"
else -- lodestone got destroyed
compass_image = random_frame .. "_lodestone"
end
end
if minetest.get_item_group(stack:get_name(), "compass") ~= 0 and
minetest.get_item_group(stack:get_name(), "compass")-1 ~= compass_image then
local itemname = "mcl_compass:"..compass_image
@ -81,8 +143,8 @@ for i,img in ipairs(images) do
inv = 0
end
local use_doc, longdesc, tt
--Why is there no usage help? This should be fixed.
--local usagehelp
--Why is there no usage help? This should be fixed.
--local usagehelp
use_doc = i == stereotype_frame
if use_doc then
tt = S("Points to the world origin")
@ -101,6 +163,18 @@ for i,img in ipairs(images) do
groups = {not_in_creative_inventory=inv, compass=i, tool=1, disable_repair=1 }
})
minetest.register_craftitem(itemstring .. "_lodestone", {
description = S("Lodestone Compass"),
_tt_help = tt,
_doc_items_create_entry = use_doc,
_doc_items_longdesc = longdesc,
--_doc_items_usagehelp = usagehelp,
inventory_image = img .. "^[colorize:purple:50",
wield_image = img .. "^[colorize:purple:50",
stack_max = 64,
groups = {not_in_creative_inventory=1, compass=i, tool=1, disable_repair=1 }
})
-- Help aliases. Makes sure the lookup tool works correctly
if not use_doc and doc_mod then
doc.add_entry_alias("craftitems", "mcl_compass:"..(stereotype_frame-1), "craftitems", itemstring)
@ -116,9 +190,42 @@ minetest.register_craft({
}
})
minetest.register_craft({
output = "mcl_compass:lodestone",
recipe = {
{"mcl_core:stonebrickcarved","mcl_core:stonebrickcarved","mcl_core:stonebrickcarved"},
{"mcl_core:stonebrickcarved", "mcl_nether:netherite_ingot", "mcl_core:stonebrickcarved"},
{"mcl_core:stonebrickcarved", "mcl_core:stonebrickcarved", "mcl_core:stonebrickcarved"}
}
})
minetest.register_alias("mcl_compass:compass", "mcl_compass:"..stereotype_frame)
-- Export stereotype item for other mods to use
mcl_compass.stereotype = "mcl_compass:"..tostring(stereotype_frame)
minetest.register_node("mcl_compass:lodestone",{
description="Lodestone",
on_rightclick = function(pos, node, player, itemstack)
if itemstack.get_name(itemstack).match(itemstack.get_name(itemstack),"mcl_compass:") then
if itemstack.get_name(itemstack) ~= "mcl_compass:lodestone" then
itemstack:get_meta():set_string("x", pos.x)
itemstack:get_meta():set_string("y", pos.y)
itemstack:get_meta():set_string("z", pos.z)
end
end
end,
tiles = {
"lodestone_top.png",
"lodestone_bottom.png",
"lodestone_side1.png",
"lodestone_side2.png",
"lodestone_side3.png",
"lodestone_side4.png"
},
groups = {pickaxey=1, material_stone=1},
_mcl_hardness = 1.5,
_mcl_blast_resistance = 6,
sounds = mcl_sounds.node_sound_stone_defaults()
})

View File

@ -1,4 +1,4 @@
name = mcl_compass
description = A compass item which points towards the world origin.
depends = mcl_core, mcl_worlds, mesecons
depends = mcl_core, mcl_worlds, mesecons, mcl_nether, mcl_sounds
optional_depends = doc

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.2 KiB

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.4 KiB

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.4 KiB

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.5 KiB

After

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.4 KiB

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.3 KiB

After

Width:  |  Height:  |  Size: 6.3 KiB

View File

@ -3,7 +3,7 @@ local S = minetest.get_translator("mcl_mushroom")
-- function grow()
function grow_twisting_vines(pos, moreontop)
local y = pos.y + 1
while not (moreontop == 0) do
while not (moreontop == 0) do
if minetest.get_node({x = pos.x, y = y, z = pos.z}).name == "air" then
minetest.set_node({x = pos.x, y = y, z = pos.z}, {name="mcl_mushroom:twisting_vines"})
moreontop = moreontop - 1
@ -13,18 +13,18 @@ function grow_twisting_vines(pos, moreontop)
else
moreontop = 0
end
end
end
end
-- Warped fungus
-- Crimson fungus
--Functions and Biomes
-- Functions and Biomes
-- WARNING: The most comments are in german. Please Translate with an translater if you don't speak good german
minetest.register_node("mcl_mushroom:warped_fungus", {
description = S("Warped Fungus Mushroom"),
description = S("Warped Fungus Mushroom"),
drawtype = "plantlike",
tiles = { "farming_warped_fungus.png" },
inventory_image = "farming_warped_fungus.png",
@ -33,7 +33,6 @@ minetest.register_node("mcl_mushroom:warped_fungus", {
paramtype = "light",
walkable = false,
groups = {dig_immediate=3,mushroom=1,attached_node=1,dig_by_water=1,destroy_by_lava_flow=1,dig_by_piston=1,deco_block=1, compostability=65},
light_source = 1,
selection_box = {
type = "fixed",
@ -43,22 +42,22 @@ minetest.register_node("mcl_mushroom:warped_fungus", {
on_rightclick = function(pos, node, pointed_thing, itemstack)
if pointed_thing:get_wielded_item():get_name() == "mcl_dye:white" then
itemstack:take_item()
local nodepos = minetest.get_node({x = pos.x, y = pos.y - 1, z = pos.z})
if nodepos.name == "mcl_mushroom:warped_nylium" or nodepos.name == "mcl_nether:netherrack" then
itemstack:take_item()
local nodepos = minetest.get_node({x = pos.x, y = pos.y - 1, z = pos.z})
if nodepos.name == "mcl_mushroom:warped_nylium" or nodepos.name == "mcl_nether:netherrack" then
local random = math.random(1, 5)
if random == 1 then
generate_warped_tree(pos)
end
end
end
end,
_mcl_blast_resistance = 0,
stack_max = 64,
end
end
end,
_mcl_blast_resistance = 0,
stack_max = 64,
})
minetest.register_node("mcl_mushroom:twisting_vines", {
description = S("Twisting Vines"),
description = S("Twisting Vines"),
drawtype = "plantlike",
tiles = { "twisting_vines_plant.png" },
inventory_image = "twisting_vines.png",
@ -92,15 +91,15 @@ minetest.register_node("mcl_mushroom:twisting_vines", {
_mcl_shears_drop = true,
_mcl_silk_touch_drop = true,
_mcl_fortune_drop = { items = {{items = {"mcl_mushroom:twisting_vines"}, rarity = 3},},
items = {{items = {"mcl_mushroom:twisting_vines"}, rarity = 1.8181818181818181},},
"mcl_mushroom:twisting_vines",
"mcl_mushroom:twisting_vines"},
_mcl_blast_resistance = 0,
stack_max = 64,
items = {{items = {"mcl_mushroom:twisting_vines"}, rarity = 1.8181818181818181},},
"mcl_mushroom:twisting_vines",
"mcl_mushroom:twisting_vines"},
_mcl_blast_resistance = 0,
stack_max = 64,
})
minetest.register_node("mcl_mushroom:nether_sprouts", {
description = S("Nether Sprouts"),
description = S("Nether Sprouts"),
drawtype = "plantlike",
tiles = { "nether_sprouts.png" },
inventory_image = "nether_sprouts.png",
@ -117,12 +116,12 @@ minetest.register_node("mcl_mushroom:nether_sprouts", {
drop = "",
_mcl_shears_drop = true,
_mcl_silk_touch_drop = false,
_mcl_blast_resistance = 0,
stack_max = 64,
_mcl_blast_resistance = 0,
stack_max = 64,
})
minetest.register_node("mcl_mushroom:warped_roots", {
description = S("Warped Roots"),
description = S("Warped Roots"),
drawtype = "plantlike",
tiles = { "warped_roots.png" },
inventory_image = "warped_roots.png",
@ -137,104 +136,107 @@ minetest.register_node("mcl_mushroom:warped_roots", {
},
node_placement_prediction = "",
_mcl_silk_touch_drop = false,
_mcl_blast_resistance = 0,
stack_max = 64,
_mcl_blast_resistance = 0,
stack_max = 64,
})
minetest.register_node("mcl_mushroom:warped_wart_block", {
description = S("Warped Wart Block"),
tiles = {"warped_wart_block.png"},
groups = {handy=1,hoe=7,swordy=1, compostability=85, deco_block=1, },
stack_max = 64,
_mcl_hardness = 2,
description = S("Warped Wart Block"),
tiles = {"warped_wart_block.png"},
groups = {handy=1,hoe=7,swordy=1, compostability=85, deco_block=1, },
stack_max = 64,
_mcl_hardness = 2,
})
minetest.register_node("mcl_mushroom:shroomlight", {
description = S("Shroomlight"),
tiles = {"shroomlight.png"},
groups = {handy=1,hoe=7,swordy=1, leaves=1, deco_block=1, compostability=65, },
stack_max = 64,
_mcl_hardness = 2,
-- this is 15 in Minecraft
light_source = 14,
description = S("Shroomlight"),
tiles = {"shroomlight.png"},
groups = {handy=1,hoe=7,swordy=1, leaves=1, deco_block=1, compostability=65, },
stack_max = 64,
_mcl_hardness = 2,
-- this is 15 in Minecraft
light_source = 14,
})
minetest.register_node("mcl_mushroom:warped_hyphae", {
description = S("Warped Hyphae"),
tiles = {"warped_hyphae.png",
"warped_hyphae.png",
"warped_hyphae_side.png",
"warped_hyphae_side.png",
"warped_hyphae_side.png",
"warped_hyphae_side.png",
},
groups = {handy=5,axey=1, bark=1, building_block=1, material_wood=1,},
paramtype2 = "facedir",
stack_max = 64,
_mcl_hardness = 2,
description = S("Warped Hyphae"),
tiles = {
"warped_hyphae.png",
"warped_hyphae.png",
"warped_hyphae_side.png",
"warped_hyphae_side.png",
"warped_hyphae_side.png",
"warped_hyphae_side.png",
},
groups = {handy=5,axey=1, bark=1, building_block=1, material_wood=1,},
paramtype2 = "facedir",
stack_max = 64,
_mcl_hardness = 2,
})
minetest.register_node("mcl_mushroom:warped_nylium", {
description = S("Warped Nylium"),
tiles = {"warped_nylium.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",
},
groups = {pickaxey=1, building_block=1, material_stone=1},
paramtype2 = "facedir",
stack_max = 64,
_mcl_hardness = 0.4,
_mcl_blast_resistance = 0.4,
is_ground_content = true,
drop = "mcl_nether:netherrack",
_mcl_silk_touch_drop = true,
description = S("Warped Nylium"),
tiles = {
"warped_nylium.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",
},
groups = {pickaxey=1, building_block=1, material_stone=1},
paramtype2 = "facedir",
stack_max = 64,
_mcl_hardness = 0.4,
_mcl_blast_resistance = 0.4,
is_ground_content = true,
drop = "mcl_nether:netherrack",
_mcl_silk_touch_drop = true,
})
minetest.register_node("mcl_mushroom:warped_checknode", {
description = S("Warped Checknode - only to check!"),
tiles = {"mcl_nether_netherrack.png",
"mcl_nether_netherrack.png",
"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",
stack_max = 64,
_mcl_hardness = 0.4,
_mcl_blast_resistance = 0.4,
is_ground_content = true,
drop = "mcl_nether:netherrack"
description = S("Warped Checknode - only to check!"),
tiles = {
"mcl_nether_netherrack.png",
"mcl_nether_netherrack.png",
"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",
stack_max = 64,
_mcl_hardness = 0.4,
_mcl_blast_resistance = 0.4,
is_ground_content = true,
drop = "mcl_nether:netherrack"
})
minetest.register_node("mcl_mushroom:warped_hyphae_wood", {
description = S("Warped Hyphae Wood"),
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},
paramtype2 = "facedir",
stack_max = 64,
_mcl_hardness = 2,
description = S("Warped Hyphae Wood"),
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},
--paramtype2 = "facedir",
stack_max = 64,
_mcl_hardness = 2,
})
mcl_stairs.register_stair_and_slab_simple("warped_hyphae_wood", "mcl_mushroom:warped_hyphae_wood", S("Warped Stair"), S("Warped Slab"), S("Double Warped Slab"))
mcl_stairs.register_stair_and_slab_simple("warped_hyphae_wood", "mcl_mushroom:warped_hyphae_wood", S("Warped Stair"), S("Warped Slab"), S("Double Warped Slab"), "woodlike")
minetest.register_craft({
output = "mcl_mushroom:warped_hyphae_wood 4",
recipe = {
{"mcl_mushroom:warped_hyphae"},
}
output = "mcl_mushroom:warped_hyphae_wood 4",
recipe = {
{"mcl_mushroom:warped_hyphae"},
}
})
minetest.register_craft({
output = "mcl_mushroom:warped_nylium 2",
recipe = {
{"mcl_mushroom:warped_wart_block"},
{"mcl_nether:netherrack"},
}
output = "mcl_mushroom:warped_nylium 2",
recipe = {
{"mcl_mushroom:warped_wart_block"},
{"mcl_nether:netherrack"},
}
})
minetest.register_abm({
@ -245,11 +247,11 @@ minetest.register_abm({
action = function(pos)
local nodepos = minetest.get_node({x = pos.x, y = pos.y - 1, z = pos.z})
if nodepos.name == "mcl_mushroom:warped_nylium" or nodepos.name == "mcl_nether:netherrack" then
if pos.y < -28400 then
generate_warped_tree(pos)
end
if pos.y < -28400 then
generate_warped_tree(pos)
end
end
end
end
})
minetest.register_abm({
@ -260,27 +262,26 @@ minetest.register_abm({
action = function(pos)
local nodepos = minetest.get_node({x = pos.x, y = pos.y + 1, z = pos.z})
if nodepos.name == "air" then
minetest.swap_node({ x = pos.x, y = pos.y, z = pos.z }, { name = "mcl_mushroom:warped_nylium" })
local randomg = math.random(1, 400)
if randomg <= 5 then
minetest.set_node({ x = pos.x, y = pos.y + 1, z = pos.z }, { name = "mcl_mushroom:warped_fungus" })
elseif randomg > 5 and randomg <= 15 then
local pos1 = { x = pos.x, y = pos.y + 1, z = pos.z }
generate_warped_tree(pos1)
elseif randomg > 15 and randomg <= 45 then
grow_twisting_vines({ x = pos.x, y = pos.y, z = pos.z } ,math.random(1, 4))
elseif randomg > 45 and randomg <= 50 then
minetest.set_node({ x = pos.x, y = pos.y + 1, z = pos.z }, { name = "mcl_mushroom:crimson_fungus" })
elseif randomg > 50 and randomg <= 150 then
minetest.set_node({ x = pos.x, y = pos.y + 1, z = pos.z }, { name = "mcl_mushroom:nether_sprouts" })
elseif randomg > 150 and randomg <= 250 then
minetest.set_node({ x = pos.x, y = pos.y + 1, z = pos.z }, { name = "mcl_mushroom:warped_roots" })
end
minetest.swap_node({ x = pos.x, y = pos.y, z = pos.z }, { name = "mcl_mushroom:warped_nylium" })
local randomg = math.random(1, 400)
if randomg <= 5 then
minetest.set_node({ x = pos.x, y = pos.y + 1, z = pos.z }, { name = "mcl_mushroom:warped_fungus" })
elseif randomg > 5 and randomg <= 15 then
local pos1 = { x = pos.x, y = pos.y + 1, z = pos.z }
generate_warped_tree(pos1)
elseif randomg > 15 and randomg <= 45 then
grow_twisting_vines({ x = pos.x, y = pos.y, z = pos.z } ,math.random(1, 4))
elseif randomg > 45 and randomg <= 50 then
minetest.set_node({ x = pos.x, y = pos.y + 1, z = pos.z }, { name = "mcl_mushroom:crimson_fungus" })
elseif randomg > 50 and randomg <= 150 then
minetest.set_node({ x = pos.x, y = pos.y + 1, z = pos.z }, { name = "mcl_mushroom:nether_sprouts" })
elseif randomg > 150 and randomg <= 250 then
minetest.set_node({ x = pos.x, y = pos.y + 1, z = pos.z }, { name = "mcl_mushroom:warped_roots" })
end
else
minetest.swap_node({ x = pos.x, y = pos.y, z = pos.z }, { name = "mcl_nether:netherrack" })
minetest.swap_node({ x = pos.x, y = pos.y, z = pos.z }, { name = "mcl_nether:netherrack" })
end
end
end
})
@ -297,7 +298,7 @@ minetest.register_abm({
minetest.register_node("mcl_mushroom:crimson_fungus", {
description = S("Crimson Fungus Mushroom"),
description = S("Crimson Fungus Mushroom"),
drawtype = "plantlike",
tiles = { "farming_crimson_fungus.png" },
inventory_image = "farming_crimson_fungus.png",
@ -306,7 +307,6 @@ minetest.register_node("mcl_mushroom:crimson_fungus", {
paramtype = "light",
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, compostability=65},
light_source = 1,
selection_box = {
type = "fixed",
@ -315,23 +315,22 @@ minetest.register_node("mcl_mushroom:crimson_fungus", {
node_placement_prediction = "",
on_rightclick = function(pos, node, pointed_thing, itemstack)
if pointed_thing:get_wielded_item():get_name() == "mcl_dye:white" then
itemstack:take_item()
local nodepos = minetest.get_node({x = pos.x, y = pos.y - 1, z = pos.z})
if nodepos.name == "mcl_mushroom:crimson_nylium" or nodepos.name == "mcl_nether:netherrack" then
local random = math.random(1, 5)
if random == 1 then
generate_crimson_tree(pos)
end
end
itemstack:take_item()
local nodepos = minetest.get_node({x = pos.x, y = pos.y - 1, z = pos.z})
if nodepos.name == "mcl_mushroom:crimson_nylium" or nodepos.name == "mcl_nether:netherrack" then
local random = math.random(1, 5)
if random == 1 then
generate_crimson_tree(pos)
end
end
end
end,
end,
_mcl_blast_resistance = 0,
stack_max = 64,
stack_max = 64,
})
minetest.register_node("mcl_mushroom:crimson_roots", {
description = S("Crimson Roots"),
description = S("Crimson Roots"),
drawtype = "plantlike",
tiles = { "crimson_roots.png" },
inventory_image = "crimson_roots.png",
@ -346,87 +345,90 @@ minetest.register_node("mcl_mushroom:crimson_roots", {
},
node_placement_prediction = "",
_mcl_silk_touch_drop = false,
_mcl_blast_resistance = 0,
stack_max = 64,
_mcl_blast_resistance = 0,
stack_max = 64,
})
minetest.register_node("mcl_mushroom:crimson_hyphae", {
description = S("Crimson Hyphae"),
tiles = {"crimson_hyphae.png",
"crimson_hyphae.png",
"crimson_hyphae_side.png",
"crimson_hyphae_side.png",
"crimson_hyphae_side.png",
"crimson_hyphae_side.png",
},
groups = {handy=5,axey=1, bark=1, building_block=1, material_wood=1,},
paramtype2 = "facedir",
stack_max = 64,
_mcl_hardness = 2,
description = S("Crimson Hyphae"),
tiles = {
"crimson_hyphae.png",
"crimson_hyphae.png",
"crimson_hyphae_side.png",
"crimson_hyphae_side.png",
"crimson_hyphae_side.png",
"crimson_hyphae_side.png",
},
groups = {handy=5,axey=1, bark=1, building_block=1, material_wood=1,},
paramtype2 = "facedir",
stack_max = 64,
_mcl_hardness = 2,
})
minetest.register_node("mcl_mushroom:crimson_hyphae_wood", {
description = S("Crimson Hyphae Wood"),
tiles = {"crimson_hyphae_wood.png"},
groups = {handy=5,axey=1, wood=1,building_block=1, material_wood=1,},
paramtype2 = "facedir",
stack_max = 64,
_mcl_hardness = 2,
description = S("Crimson Hyphae Wood"),
tiles = {"crimson_hyphae_wood.png"},
groups = {handy=5,axey=1, wood=1,building_block=1, material_wood=1,},
paramtype2 = "facedir",
stack_max = 64,
_mcl_hardness = 2,
})
minetest.register_node("mcl_mushroom:crimson_nylium", {
description = S("Crimson Nylium"),
tiles = {"crimson_nylium.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",
},
groups = {pickaxey=1, building_block=1, material_stone=1},
paramtype2 = "facedir",
stack_max = 64,
_mcl_hardness = 0.4,
_mcl_blast_resistance = 0.4,
is_ground_content = true,
drop = "mcl_nether:netherrack",
_mcl_silk_touch_drop = true,
description = S("Crimson Nylium"),
tiles = {
"crimson_nylium.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",
},
groups = {pickaxey=1, building_block=1, material_stone=1},
paramtype2 = "facedir",
stack_max = 64,
_mcl_hardness = 0.4,
_mcl_blast_resistance = 0.4,
is_ground_content = true,
drop = "mcl_nether:netherrack",
_mcl_silk_touch_drop = true,
})
minetest.register_node("mcl_mushroom:crimson_checknode", {
description = S("Crimson Checknode - only to check!"),
tiles = {"mcl_nether_netherrack.png",
"mcl_nether_netherrack.png",
"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",
stack_max = 64,
_mcl_hardness = 0.4,
_mcl_blast_resistance = 0.4,
is_ground_content = true,
drop = "mcl_nether:netherrack"
description = S("Crimson Checknode - only to check!"),
tiles = {
"mcl_nether_netherrack.png",
"mcl_nether_netherrack.png",
"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",
stack_max = 64,
_mcl_hardness = 0.4,
_mcl_blast_resistance = 0.4,
is_ground_content = true,
drop = "mcl_nether:netherrack"
})
minetest.register_craft({
output = "mcl_mushroom:crimson_hyphae_wood 4",
recipe = {
{"mcl_mushroom:crimson_hyphae"},
}
output = "mcl_mushroom:crimson_hyphae_wood 4",
recipe = {
{"mcl_mushroom:crimson_hyphae"},
}
})
minetest.register_craft({
output = "mcl_mushroom:crimson_nylium 2",
recipe = {
{"mcl_nether:nether_wart"},
{"mcl_nether:netherrack"},
}
output = "mcl_mushroom:crimson_nylium 2",
recipe = {
{"mcl_nether:nether_wart"},
{"mcl_nether:netherrack"},
}
})
mcl_stairs.register_stair_and_slab_simple("crimson_hyphae_wood", "mcl_mushroom:crimson_hyphae_wood", "Crimson Stair", "Crimson Slab", "Double Crimson Slab")
mcl_stairs.register_stair_and_slab_simple("crimson_hyphae_wood", "mcl_mushroom:crimson_hyphae_wood", "Crimson Stair", "Crimson Slab", "Double Crimson Slab", "woodlike")
minetest.register_abm({
label = "mcl_mushroom:crimson_fungus",
@ -436,11 +438,11 @@ minetest.register_abm({
action = function(pos)
local nodepos = minetest.get_node({x = pos.x, y = pos.y - 1, z = pos.z})
if nodepos.name == "mcl_mushroom:crimson_nylium" or nodepos.name == "mcl_nether:netherrack" then
if pos.y < -28400 then
generate_crimson_tree(pos)
end
if pos.y < -28400 then
generate_crimson_tree(pos)
end
end
end
end
})
minetest.register_abm({
@ -451,176 +453,204 @@ minetest.register_abm({
action = function(pos)
local nodepos = minetest.get_node({x = pos.x, y = pos.y + 1, z = pos.z})
if nodepos.name == "air" then
minetest.swap_node({ x = pos.x, y = pos.y, z = pos.z }, { name = "mcl_mushroom:crimson_nylium" })
local randomg = math.random(1, 400)
if randomg <= 10 then
minetest.set_node({ x = pos.x, y = pos.y + 1, z = pos.z }, { name = "mcl_mushroom:crimson_fungus" })
elseif randomg > 10 and randomg <= 25 then
local pos1 = { x = pos.x, y = pos.y + 1, z = pos.z }
generate_crimson_tree(pos1)
elseif randomg > 25 and randomg <= 30 then
minetest.set_node({ x = pos.x, y = pos.y + 1, z = pos.z }, { name = "mcl_mushroom:warped_fungus" })
elseif randomg > 30 and randomg <= 130 then
minetest.set_node({ x = pos.x, y = pos.y + 1, z = pos.z }, { name = "mcl_mushroom:crimson_roots" })
end
minetest.swap_node({ x = pos.x, y = pos.y, z = pos.z }, { name = "mcl_mushroom:crimson_nylium" })
local randomg = math.random(1, 400)
if randomg <= 10 then
minetest.set_node({ x = pos.x, y = pos.y + 1, z = pos.z }, { name = "mcl_mushroom:crimson_fungus" })
elseif randomg > 10 and randomg <= 25 then
local pos1 = { x = pos.x, y = pos.y + 1, z = pos.z }
generate_crimson_tree(pos1)
elseif randomg > 25 and randomg <= 30 then
minetest.set_node({ x = pos.x, y = pos.y + 1, z = pos.z }, { name = "mcl_mushroom:warped_fungus" })
elseif randomg > 30 and randomg <= 130 then
minetest.set_node({ x = pos.x, y = pos.y + 1, z = pos.z }, { name = "mcl_mushroom:crimson_roots" })
end
else
minetest.swap_node({ x = pos.x, y = pos.y, z = pos.z }, { name = "mcl_nether:netherrack" })
minetest.swap_node({ x = pos.x, y = pos.y, z = pos.z }, { name = "mcl_nether:netherrack" })
end
end
end
})
function generate_warped_tree(pos)
local breakgrow = false
local breakgrow2 = false
-- Baumgenerator
-- erste und zweite Etage
-- Tree generator
-- first and second layer
for x = pos.x - 2,pos.x + 2 do
for y = pos.y + 3, pos.y + 4 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
end
for y = pos.y + 3, pos.y + 4 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
end
end
end
end
-- dritte und vierte Etage
-- third and fourth layers
for x = pos.x - 1,pos.x + 1 do
for y = pos.y + 5, pos.y + 6 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
end
end
end
for y = pos.y + 5, pos.y + 6 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
end
end
end
-- fünfte Etage
if not (minetest.get_node({x = pos.x, y = pos.y + 7, z = pos.z}).name == "air") then breakgrow = true end
-- fifth layer
if not (minetest.get_node({x = pos.x, y = pos.y + 7, z = pos.z}).name == "air") then
breakgrow = true
end
-- Holz
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_mushroom:warped_fungus") then breakgrow = true end
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
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_mushroom:warped_fungus") then breakgrow2 = true end
if breakgrow == false then
-- Warzen
-- erste und zweite Etage
for x = pos.x - 2,pos.x + 2 do
for y = pos.y + 3, pos.y + 4 do
for z = pos.z - 2, pos.z + 2 do
minetest.set_node({x = x, y = y, z = z}, { name = "mcl_mushroom:warped_wart_block" })
end
end
end
-- Wood
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_mushroom:warped_fungus") then
breakgrow = true
end
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
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_mushroom:warped_fungus") then
breakgrow2 = true
end
if breakgrow == false then
-- Warts
-- first and second layer
for x = pos.x - 2,pos.x + 2 do
for y = pos.y + 3, pos.y + 4 do
for z = pos.z - 2, pos.z + 2 do
minetest.set_node({x = x, y = y, z = z}, { name = "mcl_mushroom:warped_wart_block" })
end
end
end
-- dritte und vierte Etage
for x = pos.x - 1,pos.x + 1 do
for y = pos.y + 5, pos.y + 6 do
for z = pos.z - 1, pos.z + 1 do
minetest.set_node({x = x, y = y, z = z}, { name = "mcl_mushroom:warped_wart_block" })
end
end
end
-- third and fourth layers
for x = pos.x - 1,pos.x + 1 do
for y = pos.y + 5, pos.y + 6 do
for z = pos.z - 1, pos.z + 1 do
minetest.set_node({x = x, y = y, z = z}, { name = "mcl_mushroom:warped_wart_block" })
end
end
end
-- fünfte Etage
minetest.set_node({x = pos.x, y = pos.y + 7, z = pos.z}, { name = "mcl_mushroom:warped_wart_block" })
-- fifth layer
minetest.set_node({x = pos.x, y = pos.y + 7, z = pos.z}, { name = "mcl_mushroom:warped_wart_block" })
-- Pilzlich
local randomgenerate = math.random(1, 2)
if randomgenerate == 1 then
local randomx = math.random(-2, 2)
local randomz = math.random(-2, 2)
minetest.set_node({x = pos.x + randomx, y = pos.y + 3, z = pos.z + randomz}, { name = "mcl_mushroom:shroomlight" })
end
local randomgenerate = math.random(1, 8)
if randomgenerate == 4 then
local randomx = math.random(-2, 2)
local randomz = math.random(-2, 2)
minetest.set_node({x = pos.x + randomx, y = pos.y + 3, z = pos.z + randomz}, { name = "mcl_mushroom:shroomlight" })
end
-- Holz
for y = pos.y, pos.y + 4 do
minetest.set_node({x = pos.x, y = y, z = pos.z}, { name = "mcl_mushroom:warped_hyphae" })
--print("Placed at " .. x .. " " .. y .. " " .. z)
end
else
if breakgrow2 == false then minetest.set_node(pos,{ name = "mcl_mushroom:warped_fungus" }) end
end
-- Fungal
local randomgenerate = math.random(1, 2)
if randomgenerate == 1 then
local randomx = math.random(-2, 2)
local randomz = math.random(-2, 2)
minetest.set_node({x = pos.x + randomx, y = pos.y + 3, z = pos.z + randomz}, { name = "mcl_mushroom:shroomlight" })
end
local randomgenerate = math.random(1, 8)
if randomgenerate == 4 then
local randomx = math.random(-2, 2)
local randomz = math.random(-2, 2)
minetest.set_node({x = pos.x + randomx, y = pos.y + 3, z = pos.z + randomz}, { name = "mcl_mushroom:shroomlight" })
end
-- Wood
for y = pos.y, pos.y + 4 do
minetest.set_node({x = pos.x, y = y, z = pos.z}, { name = "mcl_mushroom:warped_hyphae" })
--print("Placed at " .. x .. " " .. y .. " " .. z)
end
else
if breakgrow2 == false then
minetest.set_node(pos,{ name = "mcl_mushroom:warped_fungus" })
end
end
end
function generate_crimson_tree(pos)
local breakgrow = false
local breakgrow2 = false
-- Baumgenerator
-- erste und zweite Etage
-- Tree generator
-- first and second layer
for x = pos.x - 2,pos.x + 2 do
for y = pos.y + 3, pos.y + 4 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
end
for y = pos.y + 3, pos.y + 4 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
end
end
end
end
-- dritte und vierte Etage
-- third and fourth layers
for x = pos.x - 1,pos.x + 1 do
for y = pos.y + 5, pos.y + 6 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
end
end
end
for y = pos.y + 5, pos.y + 6 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
end
end
end
-- fünfte Etage
if not (minetest.get_node({x = pos.x, y = pos.y + 7, z = pos.z}).name == "air") then breakgrow = true end
-- fifth layer
if not (minetest.get_node({x = pos.x, y = pos.y + 7, z = pos.z}).name == "air") then
breakgrow = true
end
-- Holz
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_mushroom:crimson_fungus") then breakgrow = true end
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
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_mushroom:crimson_fungus") then breakgrow2 = true end
if breakgrow == false then
-- Warzen
-- erste und zweite Etage
for x = pos.x - 2,pos.x + 2 do
for y = pos.y + 3, pos.y + 4 do
for z = pos.z - 2, pos.z + 2 do
minetest.set_node({x = x, y = y, z = z}, { name = "mcl_nether:nether_wart_block" })
end
end
end
-- Wood
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_mushroom:crimson_fungus") then
breakgrow = true
end
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
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_mushroom:crimson_fungus") then
breakgrow2 = true
end
if breakgrow == false then
-- Warts
-- first and second layer
for x = pos.x - 2,pos.x + 2 do
for y = pos.y + 3, pos.y + 4 do
for z = pos.z - 2, pos.z + 2 do
minetest.set_node({x = x, y = y, z = z}, { name = "mcl_nether:nether_wart_block" })
end
end
end
-- dritte und vierte Etage
for x = pos.x - 1,pos.x + 1 do
for y = pos.y + 5, pos.y + 6 do
for z = pos.z - 1, pos.z + 1 do
minetest.set_node({x = x, y = y, z = z}, { name = "mcl_nether:nether_wart_block" })
end
end
end
-- third and fourth layers
for x = pos.x - 1,pos.x + 1 do
for y = pos.y + 5, pos.y + 6 do
for z = pos.z - 1, pos.z + 1 do
minetest.set_node({x = x, y = y, z = z}, { name = "mcl_nether:nether_wart_block" })
end
end
end
-- fünfte Etage
minetest.set_node({x = pos.x, y = pos.y + 7, z = pos.z}, { name = "mcl_nether:nether_wart_block" })
-- fifth layer
minetest.set_node({x = pos.x, y = pos.y + 7, z = pos.z}, { name = "mcl_nether:nether_wart_block" })
-- Pilzlich
local randomgenerate = math.random(1, 2)
if randomgenerate == 1 then
local randomx = math.random(-2, 2)
local randomz = math.random(-2, 2)
minetest.set_node({x = pos.x + randomx, y = pos.y + 3, z = pos.z + randomz}, { name = "mcl_mushroom:shroomlight" })
end
local randomgenerate = math.random(1, 8)
if randomgenerate == 4 then
local randomx = math.random(-2, 2)
local randomz = math.random(-2, 2)
minetest.set_node({x = pos.x + randomx, y = pos.y + 3, z = pos.z + randomz}, { name = "mcl_mushroom:shroomlight" })
end
-- Holz
for y = pos.y, pos.y + 4 do
minetest.set_node({x = pos.x, y = y, z = pos.z}, { name = "mcl_mushroom:crimson_hyphae" })
--print("Placed at " .. x .. " " .. y .. " " .. z)
end
else
if breakgrow2 == false then minetest.set_node(pos,{ name = "mcl_mushroom:crimson_fungus" }) end
end
-- Fungal
local randomgenerate = math.random(1, 2)
if randomgenerate == 1 then
local randomx = math.random(-2, 2)
local randomz = math.random(-2, 2)
minetest.set_node({x = pos.x + randomx, y = pos.y + 3, z = pos.z + randomz}, { name = "mcl_mushroom:shroomlight" })
end
local randomgenerate = math.random(1, 8)
if randomgenerate == 4 then
local randomx = math.random(-2, 2)
local randomz = math.random(-2, 2)
minetest.set_node({x = pos.x + randomx, y = pos.y + 3, z = pos.z + randomz}, { name = "mcl_mushroom:shroomlight" })
end
-- Wood
for y = pos.y, pos.y + 4 do
minetest.set_node({x = pos.x, y = y, z = pos.z}, { name = "mcl_mushroom:crimson_hyphae" })
--print("Placed at " .. x .. " " .. y .. " " .. z)
end
else
if breakgrow2 == false then
minetest.set_node(pos,{ name = "mcl_mushroom:crimson_fungus" })
end
end
end
@ -662,45 +692,45 @@ minetest.register_decoration({
})
]]
minetest.register_ore({
ore_type = "sheet",
ore = "mcl_mushroom:warped_checknode",
-- Note: Stone is included only for v6 mapgen support. Netherrack is not generated naturally
-- in v6, but instead set with the on_generated function in mcl_mapgen_core.
wherein = {"mcl_nether:netherrack", "mcl_core:stone"},
clust_scarcity = 14 * 14 * 14,
clust_size = 10,
y_min = -29065,
y_max = -28940,
noise_threshold = 0.0,
noise_params = {
offset = 0.5,
scale = 0.1,
spread = {x = 8, y = 8, z = 8},
seed = 4996,
octaves = 1,
persist = 0.0
},
ore_type = "sheet",
ore = "mcl_mushroom:warped_checknode",
-- Note: Stone is included only for v6 mapgen support. Netherrack is not generated naturally
-- in v6, but instead set with the on_generated function in mcl_mapgen_core.
wherein = {"mcl_nether:netherrack", "mcl_core:stone"},
clust_scarcity = 14 * 14 * 14,
clust_size = 10,
y_min = -29065,
y_max = -28940,
noise_threshold = 0.0,
noise_params = {
offset = 0.5,
scale = 0.1,
spread = {x = 8, y = 8, z = 8},
seed = 4996,
octaves = 1,
persist = 0.0
},
})
minetest.register_ore({
ore_type = "sheet",
ore = "mcl_mushroom:crimson_checknode",
-- Note: Stone is included only for v6 mapgen support. Netherrack is not generated naturally
-- in v6, but instead set with the on_generated function in mcl_mapgen_core.
wherein = {"mcl_nether:netherrack", "mcl_core:stone"},
clust_scarcity = 10 * 10 * 10,
clust_size = 10,
y_min = -29065,
y_max = -28940,
noise_threshold = 0.0,
noise_params = {
offset = 1,
scale = 0.5,
spread = {x = 12, y = 12, z = 12},
seed = 12948,
octaves = 1,
persist = 0.0
},
ore_type = "sheet",
ore = "mcl_mushroom:crimson_checknode",
-- Note: Stone is included only for v6 mapgen support. Netherrack is not generated naturally
-- in v6, but instead set with the on_generated function in mcl_mapgen_core.
wherein = {"mcl_nether:netherrack", "mcl_core:stone"},
clust_scarcity = 10 * 10 * 10,
clust_size = 10,
y_min = -29065,
y_max = -28940,
noise_threshold = 0.0,
noise_params = {
offset = 1,
scale = 0.5,
spread = {x = 12, y = 12, z = 12},
seed = 12948,
octaves = 1,
persist = 0.0
},
})

View File

@ -235,6 +235,7 @@ function mcl_portals.end_portal_teleport(pos, node)
end
mcl_portals.end_teleport(obj, objpos)
awards.unlock(obj:get_player_name(), "mcl:enterEndPortal")
end
end