Merge master into testing

This commit is contained in:
kay27 2022-04-04 03:46:54 +03:00
commit b4bc3e70b3
16 changed files with 664 additions and 483 deletions

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) -- 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 if luaentity.health > 0 then
luaentity.health = luaentity.health - damage luaentity.health = luaentity.health - damage
luaentity.pause_timer = 0.4
end end
return return
end end

View File

@ -246,4 +246,4 @@ water-16,
water) water)
--spawn egg --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_min,
mobs_mc.spawn_height.nether_max) mobs_mc.spawn_height.nether_max)
-- spawn eggs -- spawn eggs
mobs:register_egg("extra_mobs:piglin", S("piglin"), "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) 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:blaze_rod", "mcl:blazeRod")
mcl_item_entity.register_pickup_achievement("mcl_mobitems:leather", "mcl:killCow") 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: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) local function check_pickup_achievements(object, player)
if has_awards then 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. -- Item pickup achievements: These are awarded when picking up a certain item.
-- The achivements are manually given in the mod mcl_item_entity. -- The achivements are manually given in the mod mcl_item_entity.
awards.register_achievement("mcl:diamonds", { awards.register_achievement("mcl:diamonds", {
@ -125,6 +137,24 @@ awards.register_achievement("mcl:mineWood", {
icon = "default_tree.png", 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 -- Smelting achivements: These are awarded when picking up an item from a furnace
-- output. They are given in mcl_furnaces. -- output. They are given in mcl_furnaces.
awards.register_achievement("mcl:acquireIron", { awards.register_achievement("mcl:acquireIron", {
@ -163,6 +193,12 @@ awards.register_achievement("mcl:buildNetherPortal", {
icon = "default_obsidian.png", 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.) -- NON-PC ACHIEVEMENTS (XBox, Pocket Edition, etc.)
if non_pc_achievements then if non_pc_achievements then

View File

@ -5,7 +5,7 @@
minetest.register_node("mcl_beds:respawn_anchor",{ minetest.register_node("mcl_beds:respawn_anchor",{
description="respawn anchor", description="Respawn Anchor",
tiles = { tiles = {
"respawn_anchor_top_off.png", "respawn_anchor_top_off.png",
"respawn_anchor_bottom.png", "respawn_anchor_bottom.png",
@ -36,7 +36,7 @@ minetest.register_node("mcl_beds:respawn_anchor",{
_mcl_hardness = 22.5 _mcl_hardness = 22.5
}) })
minetest.register_node("mcl_beds:respawn_anchor_charged_1",{ minetest.register_node("mcl_beds:respawn_anchor_charged_1",{
description="respawn anchor", description="Respawn Anchor",
tiles = { tiles = {
"portal.png", "portal.png",
"respawn_anchor_bottom.png", "respawn_anchor_bottom.png",
@ -70,7 +70,7 @@ minetest.register_node("mcl_beds:respawn_anchor_charged_1",{
}) })
minetest.register_node("mcl_beds:respawn_anchor_charged_2",{ minetest.register_node("mcl_beds:respawn_anchor_charged_2",{
description="respawn anchor", description="Respawn Anchor",
tiles = { tiles = {
"portal.png", "portal.png",
"respawn_anchor_bottom.png", "respawn_anchor_bottom.png",
@ -104,7 +104,7 @@ minetest.register_node("mcl_beds:respawn_anchor_charged_2",{
}) })
minetest.register_node("mcl_beds:respawn_anchor_charged_3",{ minetest.register_node("mcl_beds:respawn_anchor_charged_3",{
description="respawn anchor", description="Respawn Anchor",
tiles = { tiles = {
"portal.png", "portal.png",
"respawn_anchor_bottom.png", "respawn_anchor_bottom.png",
@ -138,7 +138,7 @@ minetest.register_node("mcl_beds:respawn_anchor_charged_3",{
}) })
minetest.register_node("mcl_beds:respawn_anchor_charged_4",{ minetest.register_node("mcl_beds:respawn_anchor_charged_4",{
description="respawn anchor", description="Respawn Anchor",
tiles = { tiles = {
"portal.png", "portal.png",
"respawn_anchor_bottom.png", "respawn_anchor_bottom.png",
@ -160,6 +160,7 @@ minetest.register_node("mcl_beds:respawn_anchor_charged_4",{
mcl_explosions.explode(pos, 5, {drop_chance = 0, fire = true}) mcl_explosions.explode(pos, 5, {drop_chance = 0, fire = true})
else else
mcl_spawn.set_spawn_pos(player, pos, nil) mcl_spawn.set_spawn_pos(player, pos, nil)
awards.unlock(player:get_player_name(), "mcl:notQuiteNineLives")
end end
end, end,
groups = {pickaxey=1, material_stone=1, not_in_creative_inventory=1}, groups = {pickaxey=1, material_stone=1, not_in_creative_inventory=1},
@ -167,6 +168,9 @@ minetest.register_node("mcl_beds:respawn_anchor_charged_4",{
}) })
minetest.register_craft({ output = "mcl_beds:respawn_anchor", minetest.register_craft({ output = "mcl_beds:respawn_anchor",
recipe = { {"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_nether:glowstone", "mcl_nether:glowstone", "mcl_nether:glowstone"},
{"mcl_core:crying_obsidian", "mcl_core:crying_obsidian", "mcl_core:crying_obsidian"} } }) {"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()) local S = minetest.get_translator(minetest.get_current_modname())
mcl_compass = {} mcl_compass = {}
@ -13,12 +15,16 @@ local random_timer_trigger = 0.5 -- random compass spinning tick in seconds. Inc
local random_frame = math.random(0, compass_frames-1) 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 -- Compasses do not work in certain zones
if mcl_worlds.compass_works(pos) then if mcl_worlds.compass_works(pos) and x ~= nil and y ~= nil and z ~= nil then
local spawn = {x=0,y=0,z=0} 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") local ssp = minetest.setting_get_pos("static_spawnpoint")
if ssp then if ssp and x == 0 and y == 0 and z == 0 then
spawn = ssp spawn = ssp
if type(spawn) ~= "table" or type(spawn.x) ~= "number" or type(spawn.y) ~= "number" or type(spawn.z) ~= "number" then 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} spawn = {x=0,y=0,z=0}
@ -32,6 +38,32 @@ function mcl_compass.get_compass_image(pos, dir)
else else
return random_frame return random_frame
end end
else
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 end
minetest.register_globalstep(function(dtime) minetest.register_globalstep(function(dtime)
@ -52,9 +84,39 @@ minetest.register_globalstep(function(dtime)
end end
if has_compass(player) then if has_compass(player) then
local pos = player:get_pos() 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 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 if minetest.get_item_group(stack:get_name(), "compass") ~= 0 and
minetest.get_item_group(stack:get_name(), "compass")-1 ~= compass_image then minetest.get_item_group(stack:get_name(), "compass")-1 ~= compass_image then
local itemname = "mcl_compass:"..compass_image local itemname = "mcl_compass:"..compass_image
@ -101,6 +163,18 @@ for i,img in ipairs(images) do
groups = {not_in_creative_inventory=inv, compass=i, tool=1, disable_repair=1 } 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 -- Help aliases. Makes sure the lookup tool works correctly
if not use_doc and doc_mod then if not use_doc and doc_mod then
doc.add_entry_alias("craftitems", "mcl_compass:"..(stereotype_frame-1), "craftitems", itemstring) 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) minetest.register_alias("mcl_compass:compass", "mcl_compass:"..stereotype_frame)
-- Export stereotype item for other mods to use -- Export stereotype item for other mods to use
mcl_compass.stereotype = "mcl_compass:"..tostring(stereotype_frame) 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 name = mcl_compass
description = A compass item which points towards the world origin. 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 optional_depends = doc

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

View File

@ -33,7 +33,6 @@ minetest.register_node("mcl_mushroom: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,deco_block=1, compostability=65}, 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, light_source = 1,
selection_box = { selection_box = {
type = "fixed", type = "fixed",
@ -161,7 +160,8 @@ minetest.register_node("mcl_mushroom:shroomlight", {
minetest.register_node("mcl_mushroom:warped_hyphae", { minetest.register_node("mcl_mushroom:warped_hyphae", {
description = S("Warped Hyphae"), description = S("Warped Hyphae"),
tiles = {"warped_hyphae.png", tiles = {
"warped_hyphae.png",
"warped_hyphae.png", "warped_hyphae.png",
"warped_hyphae_side.png", "warped_hyphae_side.png",
"warped_hyphae_side.png", "warped_hyphae_side.png",
@ -176,7 +176,8 @@ minetest.register_node("mcl_mushroom:warped_hyphae", {
minetest.register_node("mcl_mushroom:warped_nylium", { minetest.register_node("mcl_mushroom: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",
@ -195,7 +196,8 @@ minetest.register_node("mcl_mushroom:warped_nylium", {
minetest.register_node("mcl_mushroom:warped_checknode", { minetest.register_node("mcl_mushroom: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", "mcl_nether_netherrack.png",
"mcl_nether_netherrack.png", "mcl_nether_netherrack.png",
"mcl_nether_netherrack.png", "mcl_nether_netherrack.png",
@ -215,12 +217,12 @@ minetest.register_node("mcl_mushroom: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, stack_max = 64,
_mcl_hardness = 2, _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({ minetest.register_craft({
output = "mcl_mushroom:warped_hyphae_wood 4", output = "mcl_mushroom:warped_hyphae_wood 4",
@ -276,7 +278,6 @@ minetest.register_abm({
elseif randomg > 150 and randomg <= 250 then 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" }) minetest.set_node({ x = pos.x, y = pos.y + 1, z = pos.z }, { name = "mcl_mushroom:warped_roots" })
end end
else 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
@ -306,7 +307,6 @@ minetest.register_node("mcl_mushroom: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, compostability=65}, 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, light_source = 1,
selection_box = { selection_box = {
type = "fixed", type = "fixed",
@ -326,7 +326,6 @@ minetest.register_node("mcl_mushroom:crimson_fungus", {
end end
end, end,
_mcl_blast_resistance = 0, _mcl_blast_resistance = 0,
stack_max = 64, stack_max = 64,
}) })
@ -352,7 +351,8 @@ minetest.register_node("mcl_mushroom:crimson_roots", {
minetest.register_node("mcl_mushroom:crimson_hyphae", { minetest.register_node("mcl_mushroom:crimson_hyphae", {
description = S("Crimson Hyphae"), description = S("Crimson Hyphae"),
tiles = {"crimson_hyphae.png", tiles = {
"crimson_hyphae.png",
"crimson_hyphae.png", "crimson_hyphae.png",
"crimson_hyphae_side.png", "crimson_hyphae_side.png",
"crimson_hyphae_side.png", "crimson_hyphae_side.png",
@ -376,7 +376,8 @@ minetest.register_node("mcl_mushroom:crimson_hyphae_wood", {
minetest.register_node("mcl_mushroom:crimson_nylium", { minetest.register_node("mcl_mushroom: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",
@ -395,7 +396,8 @@ minetest.register_node("mcl_mushroom:crimson_nylium", {
minetest.register_node("mcl_mushroom:crimson_checknode", { minetest.register_node("mcl_mushroom: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", "mcl_nether_netherrack.png",
"mcl_nether_netherrack.png", "mcl_nether_netherrack.png",
"mcl_nether_netherrack.png", "mcl_nether_netherrack.png",
@ -426,7 +428,7 @@ minetest.register_craft({
} }
}) })
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({ minetest.register_abm({
label = "mcl_mushroom:crimson_fungus", label = "mcl_mushroom:crimson_fungus",
@ -472,37 +474,49 @@ minetest.register_abm({
function generate_warped_tree(pos) function generate_warped_tree(pos)
local breakgrow = false local breakgrow = false
local breakgrow2 = false local breakgrow2 = false
-- Baumgenerator -- Tree generator
-- erste und zweite Etage -- first and second layer
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({x = x, y = y, z = z}).name == "air") then
breakgrow = true
end
end end
end end
end end
-- dritte und vierte Etage -- third and fourth layers
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({x = x, y = y, z = z}).name == "air") then
breakgrow = true
end
end end
end end
end end
-- fünfte Etage -- fifth layer
if not (minetest.get_node({x = pos.x, y = pos.y + 7, z = pos.z}).name == "air") then breakgrow = true end if not (minetest.get_node({x = pos.x, y = pos.y + 7, z = pos.z}).name == "air") then
breakgrow = true
end
-- Holz -- 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 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 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
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 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 if breakgrow == false then
-- Warzen -- Warts
-- erste und zweite Etage -- first and second layer
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
@ -511,7 +525,7 @@ function generate_warped_tree(pos)
end end
end end
-- dritte und vierte Etage -- third and fourth layers
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
@ -520,10 +534,10 @@ function generate_warped_tree(pos)
end end
end end
-- fünfte Etage -- fifth layer
minetest.set_node({x = pos.x, y = pos.y + 7, z = pos.z}, { name = "mcl_mushroom:warped_wart_block" }) minetest.set_node({x = pos.x, y = pos.y + 7, z = pos.z}, { name = "mcl_mushroom:warped_wart_block" })
-- Pilzlich -- Fungal
local randomgenerate = math.random(1, 2) local randomgenerate = math.random(1, 2)
if randomgenerate == 1 then if randomgenerate == 1 then
local randomx = math.random(-2, 2) local randomx = math.random(-2, 2)
@ -536,50 +550,64 @@ function generate_warped_tree(pos)
local randomz = 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" }) minetest.set_node({x = pos.x + randomx, y = pos.y + 3, z = pos.z + randomz}, { name = "mcl_mushroom:shroomlight" })
end end
-- Holz -- Wood
for y = pos.y, pos.y + 4 do for y = pos.y, pos.y + 4 do
minetest.set_node({x = pos.x, y = y, z = pos.z}, { name = "mcl_mushroom:warped_hyphae" }) minetest.set_node({x = pos.x, y = y, z = pos.z}, { name = "mcl_mushroom:warped_hyphae" })
--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_mushroom:warped_fungus" }) end if breakgrow2 == false then
minetest.set_node(pos,{ name = "mcl_mushroom:warped_fungus" })
end
end end
end end
function generate_crimson_tree(pos) function generate_crimson_tree(pos)
local breakgrow = false local breakgrow = false
local breakgrow2 = false local breakgrow2 = false
-- Baumgenerator -- Tree generator
-- erste und zweite Etage -- first and second layer
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({x = x, y = y, z = z}).name == "air") then
breakgrow = true
end
end end
end end
end end
-- dritte und vierte Etage -- third and fourth layers
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({x = x, y = y, z = z}).name == "air") then
breakgrow = true
end
end end
end end
end end
-- fünfte Etage -- fifth layer
if not (minetest.get_node({x = pos.x, y = pos.y + 7, z = pos.z}).name == "air") then breakgrow = true end if not (minetest.get_node({x = pos.x, y = pos.y + 7, z = pos.z}).name == "air") then
breakgrow = true
end
-- Holz -- 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 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 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
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 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 if breakgrow == false then
-- Warzen -- Warts
-- erste und zweite Etage -- first and second layer
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
@ -588,7 +616,7 @@ function generate_crimson_tree(pos)
end end
end end
-- dritte und vierte Etage -- third and fourth layers
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
@ -597,10 +625,10 @@ function generate_crimson_tree(pos)
end end
end end
-- fünfte Etage -- fifth layer
minetest.set_node({x = pos.x, y = pos.y + 7, z = pos.z}, { name = "mcl_nether:nether_wart_block" }) minetest.set_node({x = pos.x, y = pos.y + 7, z = pos.z}, { name = "mcl_nether:nether_wart_block" })
-- Pilzlich -- Fungal
local randomgenerate = math.random(1, 2) local randomgenerate = math.random(1, 2)
if randomgenerate == 1 then if randomgenerate == 1 then
local randomx = math.random(-2, 2) local randomx = math.random(-2, 2)
@ -613,13 +641,15 @@ function generate_crimson_tree(pos)
local randomz = 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" }) minetest.set_node({x = pos.x + randomx, y = pos.y + 3, z = pos.z + randomz}, { name = "mcl_mushroom:shroomlight" })
end end
-- Holz -- Wood
for y = pos.y, pos.y + 4 do for y = pos.y, pos.y + 4 do
minetest.set_node({x = pos.x, y = y, z = pos.z}, { name = "mcl_mushroom:crimson_hyphae" }) minetest.set_node({x = pos.x, y = y, z = pos.z}, { name = "mcl_mushroom:crimson_hyphae" })
--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_mushroom:crimson_fungus" }) end if breakgrow2 == false then
minetest.set_node(pos,{ name = "mcl_mushroom:crimson_fungus" })
end
end end
end end

View File

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