Merge pull request 'Add crying obsidian' (#2378) from crying_obsidian into master

Reviewed-on: MineClone2/MineClone2#2378
This commit is contained in:
cora 2022-06-30 12:01:40 +00:00
commit 3286330b26
7 changed files with 57 additions and 3 deletions

View File

@ -88,11 +88,11 @@ for i=0,4 do
end
minetest.register_craft({ --TODO: Please change this crafting recipe once crying obsidian is implemented!
minetest.register_craft({
output = "mcl_beds:respawn_anchor",
recipe = {
{"mcl_core:obsidian", "mcl_core:obsidian", "mcl_core:obsidian"},
{"mcl_core:crying_obsidian", "mcl_core:crying_obsidian", "mcl_core:crying_obsidian"},
{"mcl_nether:glowstone", "mcl_nether:glowstone", "mcl_nether:glowstone"},
{"mcl_core:obsidian", "mcl_core:obsidian", "mcl_core:obsidian"}
{"mcl_core:crying_obsidian", "mcl_core:crying_obsidian", "mcl_core:crying_obsidian"}
}
})

View File

@ -1698,3 +1698,44 @@ function mcl_core.after_snow_destruct(pos)
local node = minetest.get_node(npos)
mcl_core.clear_snow_dirt(npos, node)
end
-- Obsidian crying
local crying_obsidian_tears = {
"mcl_core_crying_obsidian_tear.png",
"mcl_core_crying_obsidian_tear2.png",
"mcl_core_crying_obsidian_tear3.png"
}
local psdef = {
amount = 10,
time = 0.9, --everything longer than 1 is a coord exploit
minvel = vector.new(0,-0.15,0),
maxvel = vector.new(0,-0.001,0),
minacc = vector.new(0,-0.1,0),
maxacc = vector.new(0,-0.001,0),
minexptime = 1,
maxexptime = 6,
minsize = 0.1,
maxsize = 0.25,
collisiondetection = true,
collision_removal = true,
object_collision = true,
vertical = true,
}
minetest.register_abm({
label = "Obsidian cries",
nodenames = {"mcl_core:crying_obsidian"},
interval = 60,
chance = 10,
action = function(pos, node)
psdef.minpos = vector.offset(pos,-0.6,-0.51,-0.6)
psdef.maxpos = vector.offset(pos,0.6,-0.51,0.6)
for _,t in pairs(crying_obsidian_tears) do
psdef.texture = t
minetest.add_particlespawner(psdef)
end
end
})

View File

@ -831,6 +831,19 @@ minetest.register_node("mcl_core:obsidian", {
end,
})
minetest.register_node("mcl_core:crying_obsidian", {
description = S("Crying Obsidian"),
_doc_items_longdesc = S("Crying obsidian is a luminous obsidian that can generate as part of ruined portals."),
tiles = {"default_obsidian.png^mcl_core_crying_obsidian.png"},
is_ground_content = false,
light_source = 10,
sounds = mcl_sounds.node_sound_stone_defaults(),
stack_max = 64,
groups = {pickaxey=5, building_block=1, material_stone=1},
_mcl_blast_resistance = 1200,
_mcl_hardness = 50,
})
minetest.register_node("mcl_core:ice", {
description = S("Ice"),
_doc_items_longdesc = S("Ice is a solid block usually found in cold areas. It melts near block light sources at a light level of 12 or higher. When it melts or is broken while resting on top of another block, it will turn into a water source."),

Binary file not shown.

After

Width:  |  Height:  |  Size: 250 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 91 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 83 B