0
0
Fork 0

Add blackstone via cp -r & git add * ^^

This commit is contained in:
debian044 2022-04-26 22:13:11 +02:00 committed by cora
parent c71a6d5df7
commit 16d79996c0
32 changed files with 1046 additions and 0 deletions

View File

@ -0,0 +1,13 @@
# Blackstone Mod
This mod is made for the Minetest Subgame Mineclone2.
It adds new Blocks: Blackstone, Basalt, Soul Fire, Soul Torch etc.
## Version:
Its version 1.0.2
## License
CC BY-SA 4.0

View File

@ -0,0 +1,30 @@
# Changelogs
## Blocks
I added the new Polished Basalt Block and salbs and strairs for every kind of Blackstone.
Also new is the Blackstone Wall.
New Soul soil, Soul Fire and Soul Fire Torches/Lanterns.
Added Smooth Basalt.
## Generating
Basalt and Blackstone now generate in the Nether naturaly.
Nether Gold Ore is gernerating in the Nether.
## Bugfixes
I fixed a lot of Bugs.

View File

@ -0,0 +1,7 @@
mcl_core
screwdriver
mcl_stairs
mclx_stairs
mcl_walls
mclx_fences
mcl_torches

View File

@ -0,0 +1,886 @@
local S = minetest.get_translator("mcl_blackstone")
local N = function(s) return s end
local LIGHT_TORCH = 10
stairs = {}
local fire_help, eternal_fire_help
if fire_enabled then
fire_help = S("Fire is a damaging and destructive but short-lived kind of block. It will destroy and spread towards near flammable blocks, but fire will disappear when there is nothing to burn left. It will be extinguished by nearby water and rain. Fire can be destroyed safely by punching it, but it is hurtful if you stand directly in it. If a fire is started above netherrack or a magma block, it will immediately turn into an eternal fire.")
else
fire_help = S("Fire is a damaging but non-destructive short-lived kind of block. It will disappear when there is no flammable block around. Fire does not destroy blocks, at least not in this world. It will be extinguished by nearby water and rain. Fire can be destroyed safely by punching it, but it is hurtful if you stand directly in it. If a fire is started above netherrack or a magma block, it will immediately turn into an eternal fire.")
end
if fire_enabled then
eternal_fire_help = S("Eternal fire is a damaging block that might create more fire. It will create fire around it when flammable blocks are nearby. Eternal fire can be extinguished by punches and nearby water blocks. Other than (normal) fire, eternal fire does not get extinguished on its own and also continues to burn under rain. Punching eternal fire is safe, but it hurts if you stand inside.")
else
eternal_fire_help = S("Eternal fire is a damaging block. Eternal fire can be extinguished by punches and nearby water blocks. Other than (normal) fire, eternal fire does not get extinguished on its own and also continues to burn under rain. Punching eternal fire is safe, but it hurts if you stand inside.")
end
local fire_death_messages = {
N("@1 has been cooked crisp."),
N("@1 felt the burn."),
N("@1 died in the flames."),
N("@1 died in a fire."),
}
--nodes
local mod_screwdriver = minetest.get_modpath("screwdriver") ~= nil
local on_rotate
if mod_screwdriver then
on_rotate = screwdriver.rotate_3way
end
local alldirs = {{x=0,y=0,z=1}, {x=1,y=0,z=0}, {x=0,y=0,z=-1}, {x=-1,y=0,z=0}, {x=0,y=-1,z=0}, {x=0,y=1,z=0}}
--Blocks
minetest.register_node("mcl_blackstone:blackstone", {
description = S("Blackstone"),
tiles = {"mcl_blackstone.png"},
sounds = mcl_sounds.node_sound_stone_defaults(),
is_ground_content = false,
groups = {cracky = 3, pickaxey=2, material_stone=1},
_mcl_blast_resistance = 2,
_mcl_hardness = 2,
})
minetest.register_node("mcl_blackstone:blackstone_gilded", {
description = S("Gilded Blackstone"),
tiles = {"mcl_blackstone.png^mcl_blackstone_gilded_side.png"},
sounds = mcl_sounds.node_sound_stone_defaults(),
is_ground_content = false,
groups = {cracky = 3, pickaxey=2, material_stone=1, xp=1},
drop = {
max_items = 1,
items = {
{items = {'mcl_core:gold_nugget 2'},rarity = 5},
{items = {'mcl_core:gold_nugget 3'},rarity = 5},
{items = {'mcl_core:gold_nugget 4'},rarity = 5},
{items = {'mcl_core:gold_nugget 5'},rarity = 5},
{items = {'mcl_blackstone:blackstone_gilded'}, rarity = 8},
}
},
_mcl_blast_resistance = 2,
_mcl_hardness = 2,
_mcl_silk_touch_drop = true,
_mcl_fortune_drop = mcl_core.fortune_drop_ore,
})
minetest.register_node("mcl_blackstone:nether_gold", {
description = S("Nether Gold Ore"),
tiles = {"mcl_nether_netherrack.png^mcl_blackstone_gilded_side.png"},
sounds = mcl_sounds.node_sound_stone_defaults(),
is_ground_content = false,
groups = {cracky = 3, pickaxey=2, material_stone=1, xp=1},
drop = {
max_items = 1,
items = {
{items = {'mcl_core:gold_nugget 2'},rarity = 5},
{items = {'mcl_core:gold_nugget 3'},rarity = 5},
{items = {'mcl_core:gold_nugget 4'},rarity = 5},
{items = {'mcl_core:gold_nugget 5'},rarity = 5},
{items = {'mcl_blackstone:nether_gold'}, rarity = 8},
}
},
_mcl_blast_resistance = 2,
_mcl_hardness = 2,
_mcl_silk_touch_drop = true,
_mcl_fortune_drop = mcl_core.fortune_drop_ore,
})
minetest.register_node("mcl_blackstone:basalt_polished", {
description = S("Polished Basalt"),
tiles = {"mcl_blackstone_basalt_top_polished.png", "mcl_blackstone_basalt_top_polished.png", "mcl_blackstone_basalt_side_polished.png"},
sounds = mcl_sounds.node_sound_stone_defaults(),
paramtype2 = "facedir",
on_place = mcl_util.rotate_axis,
on_rotate = on_rotate,
is_ground_content = false,
groups = {cracky = 3, pickaxey=2, material_stone=1},
_mcl_blast_resistance = 2,
_mcl_hardness = 2,
})
minetest.register_node("mcl_blackstone:basalt", {
description = S("Basalt"),
tiles = {"mcl_blackstone_basalt_top.png", "mcl_blackstone_basalt_top.png", "mcl_blackstone_basalt_side.png"},
sounds = mcl_sounds.node_sound_stone_defaults(),
paramtype2 = "facedir",
on_place = mcl_util.rotate_axis,
on_rotate = on_rotate,
is_ground_content = false,
groups = {cracky = 3, pickaxey=2, material_stone=1},
_mcl_blast_resistance = 2,
_mcl_hardness = 2,
})
minetest.register_node("mcl_blackstone:blackstone_polished", {
description = S("Polished Blackstone"),
tiles = {"mcl_blackstone_polished.png"},
sounds = mcl_sounds.node_sound_stone_defaults(),
is_ground_content = false,
groups = {cracky = 3, pickaxey=2, material_stone=1},
_mcl_blast_resistance = 2,
_mcl_hardness = 2,
})
minetest.register_node("mcl_blackstone:blackstone_chiseled_polished", {
description = S("Chiseled Polished Blackstone"),
tiles = {"mcl_blackstone_chiseled_polished.png"},
sounds = mcl_sounds.node_sound_stone_defaults(),
is_ground_content = false,
groups = {cracky = 3, pickaxey=2, material_stone=1},
_mcl_blast_resistance = 2,
_mcl_hardness = 2,
})
minetest.register_node("mcl_blackstone:blackstone_brick_polished", {
description = S("Polished Blackstone Bricks"),
tiles = {"mcl_blackstone_polished_bricks.png"},
sounds = mcl_sounds.node_sound_stone_defaults(),
is_ground_content = false,
groups = {cracky = 3, pickaxey=2, material_stone=1},
_mcl_blast_resistance = 2,
_mcl_hardness = 2,
})
minetest.register_node("mcl_blackstone:quartz_brick", {
description = S("Quartz Bricks"),
tiles = {"mcl_backstone_quartz_bricks.png"},
sounds = mcl_sounds.node_sound_stone_defaults(),
is_ground_content = false,
sounds = mcl_sounds.node_sound_stone_defaults(),
groups = {cracky = 3, pickaxey=2, material_stone=1},
_mcl_blast_resistance = 2,
_mcl_hardness = 2,
})
minetest.register_node("mcl_blackstone:soul_soil", {
description = S("Soul Soil"),
tiles = {"mcl_blackstone_soul_soil.png"},
is_ground_content = false,
sounds = mcl_sounds.node_sound_sand_defaults(),
groups = {cracky = 3, handy=1, shovely=1},
_mcl_blast_resistance = 0.5,
_mcl_hardness = 0.5,
})
minetest.register_node("mcl_blackstone:soul_fire", {
description = S("Eternal Soul Fire"),
_doc_items_longdesc = eternal_fire_help,
drawtype = "firelike",
tiles = {
{
name = "soul_fire_basic_flame_animated.png",
animation = {
type = "vertical_frames",
aspect_w = 16,
aspect_h = 16,
length = 1
},
},
},
inventory_image = "soul_fire_basic_flame.png",
paramtype = "light",
light_source = 10,
walkable = false,
buildable_to = true,
sunlight_propagates = true,
damage_per_second = 2,
_mcl_node_death_message = fire_death_messages,
groups = {fire = 1, dig_immediate = 3, not_in_creative_inventory = 1, dig_by_piston = 1, destroys_items = 1, set_on_fire=8},
floodable = true,
on_flood = function(pos, oldnode, newnode)
if minetest.get_item_group(newnode.name, "water") ~= 0 then
minetest.sound_play("fire_extinguish_flame", {pos = pos, gain = 0.25, max_hear_distance = 16}, true)
end
end,
})
--slabs/stairs
mcl_stairs.register_stair_and_slab_simple("blackstone", "mcl_blackstone:blackstone", "Blackstone Stair", "Blackstone Slab", "Double Blackstone Slab")
mcl_stairs.register_stair_and_slab_simple("blackstone_polished", "mcl_blackstone:blackstone_polished", "Polished Blackstone Stair", "Polished Blackstone Slab", "Polished Double Blackstone Slab")
mcl_stairs.register_stair_and_slab_simple("blackstone_chiseled_polished", "mcl_blackstone:blackstone_chiseled_polished", "Polished Chiseled Blackstone Stair", "Chiseled Polished Blackstone Slab", "Double Polished Chiseled Blackstone Slab")
mcl_stairs.register_stair_and_slab_simple("blackstone_brick_polished", "mcl_blackstone:blackstone_brick_polished", "Polished Blackstone Brick Stair", "Polished Blackstone Brick Slab", "Double Polished Blackstone Brick Slab")
--Wall
mcl_walls.register_wall("mcl_blackstone:wall", S("Blackstone Wall"), "mcl_blackstone:blackstone")
--lavacooling
minetest.register_abm({
label = "Lava cooling (basalt)",
nodenames = {"group:lava"},
neighbors = {"mcl_core:ice"},
interval = 1,
chance = 1,
action = function(pos, node, active_object_count, active_object_count_wider)
local water = minetest.find_nodes_in_area({x=pos.x-1, y=pos.y-1, z=pos.z-1}, {x=pos.x+1, y=pos.y+1, z=pos.z+1}, "mcl_core:ice")
local lavatype = minetest.registered_nodes[node.name].liquidtype
for w=1, #water do
local waternode = minetest.get_node(water[w])
local watertype = minetest.registered_nodes[waternode.name].liquidtype
if water[w].y < pos.y and water[w].x == pos.x and water[w].z == pos.z then
minetest.set_node(water[w], {name="mcl_blackstone:basalt"})
elseif lavatype == "flowing" and water[w].y == pos.y and (water[w].x == pos.x or water[w].z == pos.z) then
minetest.set_node(pos, {name="mcl_blackstone:basalt"})
elseif lavatype == "flowing" and water[w].y > pos.y and water[w].x == pos.x and water[w].z == pos.z then
minetest.set_node(pos, {name="mcl_blackstone:basalt"})
end
end
end,
})
minetest.register_abm({
label = "Lava cooling (blackstone)",
nodenames = {"group:lava"},
neighbors = {"mcl_core:packed_ice"},
interval = 1,
chance = 1,
action = function(pos, node, active_object_count, active_object_count_wider)
local water = minetest.find_nodes_in_area({x=pos.x-1, y=pos.y-1, z=pos.z-1}, {x=pos.x+1, y=pos.y+1, z=pos.z+1}, "mcl_core:packed_ice")
local lavatype = minetest.registered_nodes[node.name].liquidtype
for w=1, #water do
local waternode = minetest.get_node(water[w])
local watertype = minetest.registered_nodes[waternode.name].liquidtype
if water[w].y < pos.y and water[w].x == pos.x and water[w].z == pos.z then
minetest.set_node(water[w], {name="mcl_blackstone:blackstone"})
elseif lavatype == "flowing" and water[w].y == pos.y and (water[w].x == pos.x or water[w].z == pos.z) then
minetest.set_node(pos, {name="mcl_blackstone:blackstone"})
elseif lavatype == "flowing" and water[w].y > pos.y and water[w].x == pos.x and water[w].z == pos.z then
minetest.set_node(pos, {name="mcl_blackstone:blackstone"})
end
end
end,
})
--crafting
minetest.register_craft({
output = 'mcl_blackstone:blackstone_polished 4',
recipe = {
{'mcl_blackstone:blackstone','mcl_blackstone:blackstone'},
{'mcl_blackstone:blackstone','mcl_blackstone:blackstone'},
}
})
minetest.register_craft({
output = 'mcl_blackstone:basalt_polished 4',
recipe = {
{'mcl_blackstone:basalt','mcl_blackstone:basalt'},
{'mcl_blackstone:basalt','mcl_blackstone:basalt'},
}
})
minetest.register_craft({
output = 'mcl_blackstone:blackstone_chiseled_polished 2',
recipe = {
{'mcl_blackstone:blackstone_polished'},
{'mcl_blackstone:blackstone_polished'},
}
})
minetest.register_craft({
output = 'mcl_blackstone:blackstone_brick_polished 4',
recipe = {
{'mcl_blackstone:blackstone_polished','mcl_blackstone:blackstone_polished'},
{'mcl_blackstone:blackstone_polished','mcl_blackstone:blackstone_polished'},
}
})
minetest.register_craft({
output = 'mcl_tools:pick_stone',
recipe = {
{'mcl_blackstone:blackstone', 'mcl_blackstone:blackstone', 'mcl_blackstone:blackstone'},
{'', 'mcl_core:stick', ''},
{'', 'mcl_core:stick', ''},
}
})
minetest.register_craft({
output = 'mcl_tools:axe_stone',
recipe = {
{'mcl_blackstone:blackstone', 'mcl_blackstone:blackstone'},
{'mcl_blackstone:blackstone', 'mcl_core:stick'},
{'', 'mcl_core:stick'},
}
})
minetest.register_craft({
output = 'mcl_tools:axe_stone',
recipe = {
{'mcl_blackstone:blackstone', 'mcl_blackstone:blackstone'},
{'mcl_core:stick', 'mcl_blackstone:blackstone'},
{'', 'mcl_core:stick'},
}
})
minetest.register_craft({
output = 'mcl_tools:shovel_stone',
recipe = {
{'mcl_blackstone:blackstone'},
{'mcl_core:stick'},
{'mcl_core:stick'},
}
})
minetest.register_craft({
output = 'mcl_tools:sword_stone',
recipe = {
{'mcl_blackstone:blackstone'},
{'mcl_blackstone:blackstone'},
{'mcl_core:stick'},
}
})
minetest.register_craft({
output = "mcl_farming:hoe_stone",
recipe = {
{"mcl_blackstone:blackstone", "mcl_blackstone:blackstone"},
{"", "mcl_core:stick"},
{"", "mcl_core:stick"}
}
})
minetest.register_craft({
output = "mcl_farming:hoe_stone",
recipe = {
{"mcl_blackstone:blackstone", "mcl_blackstone:blackstone"},
{"mcl_core:stick", ""},
{"mcl_core:stick", ""}
}
})
minetest.register_craft({
output = "mcl_furnaces:furnace",
recipe = {
{"mcl_blackstone:blackstone", "mcl_blackstone:blackstone", "mcl_blackstone:blackstone"},
{"mcl_blackstone:blackstone", "", "mcl_blackstone:blackstone"},
{"mcl_blackstone:blackstone", "mcl_blackstone:blackstone", "mcl_blackstone:blackstone"}
}
})
minetest.register_craft({
output = 'mcl_core:packed_ice',
recipe = {
{'mcl_core:ice','mcl_core:ice'},
{'mcl_core:ice','mcl_core:ice'},
}
})
minetest.register_craft({
output = 'mcl_blackstone:quartz_brick 4',
recipe = {
{'mcl_nether:quartz_block','mcl_nether:quartz_block'},
{'mcl_nether:quartz_block','mcl_nether:quartz_block'},
}
})
minetest.register_craft({
type = "cooking",
output = 'mcl_core:gold_ingot',
recipe = 'mcl_blackstone:nether_gold',
cooktime = 10,
})
minetest.register_craft({
type = "cooking",
output = 'mcl_core:gold_ingot',
recipe = 'mcl_blackstone:blackstone_gilded',
cooktime = 10,
})
minetest.register_craft({
type = "cooking",
output = 'mcl_nether:quartz_smooth',
recipe = 'mcl_nether:quartz_block',
cooktime = 10,
})
--Generating
local specialstones = { "mcl_blackstone:blackstone", "mcl_blackstone:basalt", "mcl_blackstone:soul_soil" }
for s=1, #specialstones do
local node = specialstones[s]
minetest.register_ore({
ore_type = "blob",
ore = node,
wherein = {"mcl_nether:netherrack"},
clust_scarcity = 830,
clust_num_ores = 28,
clust_size = 3,
y_min = mcl_vars.mg_nether_min,
y_max = mcl_vars.mg_nether_max,
})
minetest.register_ore({
ore_type = "blob",
ore = node,
wherein = {"mcl_nether:netherrack"},
clust_scarcity = 8*8*8,
clust_num_ores = 40,
clust_size = 5,
y_min = mcl_vars.mg_nether_min,
y_max = mcl_vars.mg_nether_max,
})
end
minetest.register_ore({
ore_type = "scatter",
ore = "mcl_blackstone:blackstone_gilded",
wherein = "mcl_blackstone:blackstone",
clust_scarcity = 4775,
clust_num_ores = 2,
clust_size = 2,
y_min = mcl_vars.mg_nether_min,
y_max = mcl_vars.mg_nether_max,
})
minetest.register_ore({
ore_type = "scatter",
ore = "mcl_blackstone:nether_gold",
wherein = "mcl_nether:netherrack",
clust_scarcity = 830,
clust_num_ores = 5,
clust_size = 3,
y_min = mcl_vars.mg_nether_min,
y_max = mcl_vars.mg_nether_max,
})
minetest.register_ore({
ore_type = "scatter",
ore = "mcl_blackstone:nether_gold",
wherein = "mcl_nether:netherrack",
clust_scarcity = 1660,
clust_num_ores = 4,
clust_size = 2,
y_min = mcl_vars.mg_nether_min,
y_max = mcl_vars.mg_nether_max,
})
--torches (parts are copied from mineclone2)
local spawn_flames_floor = function(pos)
-- Flames
mcl_particles.add_node_particlespawner(pos, {
amount = 8,
time = 0,
minpos = vector.add(pos, { x = -0.1, y = 0.05, z = -0.1 }),
maxpos = vector.add(pos, { x = 0.1, y = 0.15, z = 0.1 }),
minvel = { x = -0.01, y = 0, z = -0.01 },
maxvel = { x = 0.01, y = 0.1, z = 0.01 },
minexptime = 0.3,
maxexptime = 0.6,
minsize = 0.7,
maxsize = 2,
texture = "mcl_particles_flame.png",
glow = 10,
}, "low")
-- Smoke
mcl_particles.add_node_particlespawner(pos, {
amount = 0.5,
time = 0,
minpos = vector.add(pos, { x = -1/16, y = 0.04, z = -1/16 }),
maxpos = vector.add(pos, { x = -1/16, y = 0.06, z = -1/16 }),
minvel = { x = 0, y = 0.5, z = 0 },
maxvel = { x = 0, y = 0.6, z = 0 },
minexptime = 2.0,
maxexptime = 2.0,
minsize = 1.5,
maxsize = 1.5,
texture = "mcl_particles_smoke_anim.png",
animation = {
type = "vertical_frames",
aspect_w = 8,
aspect_h = 8,
length = 2.05,
},
}, "medium")
end
local spawn_flames_wall = function(pos, param2)
local minrelpos, maxrelpos
local dir = minetest.wallmounted_to_dir(param2)
if dir.x < 0 then
minrelpos = { x = -0.38, y = 0.04, z = -0.1 }
maxrelpos = { x = -0.2, y = 0.14, z = 0.1 }
elseif dir.x > 0 then
minrelpos = { x = 0.2, y = 0.04, z = -0.1 }
maxrelpos = { x = 0.38, y = 0.14, z = 0.1 }
elseif dir.z < 0 then
minrelpos = { x = -0.1, y = 0.04, z = -0.38 }
maxrelpos = { x = 0.1, y = 0.14, z = -0.2 }
elseif dir.z > 0 then
minrelpos = { x = -0.1, y = 0.04, z = 0.2 }
maxrelpos = { x = 0.1, y = 0.14, z = 0.38 }
else
return
end
-- Flames
mcl_particles.add_node_particlespawner(pos, {
amount = 8,
time = 0,
minpos = vector.add(pos, minrelpos),
maxpos = vector.add(pos, maxrelpos),
minvel = { x = -0.01, y = 0, z = -0.01 },
maxvel = { x = 0.01, y = 0.1, z = 0.01 },
minexptime = 0.3,
maxexptime = 0.6,
minsize = 0.7,
maxsize = 2,
texture = "mcl_particles_flame.png",
glow = 10,
}, "low")
-- Smoke
mcl_particles.add_node_particlespawner(pos, {
amount = 0.5,
time = 0,
minpos = vector.add(pos, minrelpos),
maxpos = vector.add(pos, maxrelpos),
minvel = { x = 0, y = 0.5, z = 0 },
maxvel = { x = 0, y = 0.6, z = 0 },
minexptime = 2.0,
maxexptime = 2.0,
minsize = 1.5,
maxsize = 1.5,
texture = "mcl_particles_smoke_anim.png",
animation = {
type = "vertical_frames",
aspect_w = 8,
aspect_h = 8,
length = 2.05,
},
}, "medium")
end
local remove_flames = function(pos)
mcl_particles.delete_node_particlespawners(pos)
end
--
-- 3d torch part
--
-- Check if placement at given node is allowed
local function check_placement_allowed(node, wdir)
-- Torch placement rules: Disallow placement on some nodes. General rule: Solid, opaque, full cube collision box nodes are allowed.
-- Special allowed nodes:
-- * soul sand
-- * mob spawner
-- * chorus flower
-- * glass, barrier, ice
-- * Fence, wall, end portal frame with ender eye: Only on top
-- * Slab, stairs: Only on top if upside down
-- Special forbidden nodes:
-- * Piston, sticky piston
local def = minetest.registered_nodes[node.name]
if not def then
return false
-- No ceiling torches
elseif wdir == 0 then
return false
elseif not def.buildable_to then
if node.name ~= "mcl_core:ice" and node.name ~= "mcl_nether:soul_sand" and node.name ~= "mcl_mobspawners:spawner" and node.name ~= "mcl_core:barrier" and node.name ~= "mcl_end:chorus_flower" and node.name ~= "mcl_end:chorus_flower_dead" and (not def.groups.glass) and
((not def.groups.solid) or (not def.groups.opaque)) then
-- Only allow top placement on these nodes
if node.name == "mcl_end:dragon_egg" or node.name == "mcl_portals:end_portal_frame_eye" or def.groups.fence == 1 or def.groups.wall or def.groups.slab_top == 1 or def.groups.anvil or def.groups.pane or (def.groups.stair == 1 and minetest.facedir_to_dir(node.param2).y ~= 0) then
if wdir ~= 1 then
return false
end
else
return false
end
elseif minetest.get_item_group(node.name, "piston") >= 1 then
return false
end
end
return true
end
mcl_torches = {}
mcl_torches.register_torch = function(substring, description, doc_items_longdesc, doc_items_usagehelp, icon, mesh_floor, mesh_wall, tiles, light, groups, sounds, moredef, moredef_floor, moredef_wall)
local itemstring = minetest.get_current_modname()..":"..substring
local itemstring_wall = minetest.get_current_modname()..":"..substring.."_wall"
if light == nil then light = minetest.LIGHT_MAX end
if mesh_floor == nil then mesh_floor = "mcl_torches_torch_floor.obj" end
if mesh_wall == nil then mesh_wall = "mcl_torches_torch_wall.obj" end
if groups == nil then groups = {} end
groups.attached_node = 1
groups.torch = 1
groups.dig_by_water = 1
groups.destroy_by_lava_flow = 1
groups.dig_by_piston = 1
local floordef = {
description = description,
_doc_items_longdesc = doc_items_longdesc,
_doc_items_usagehelp = doc_items_usagehelp,
drawtype = "mesh",
mesh = mesh_floor,
inventory_image = icon,
wield_image = icon,
tiles = tiles,
paramtype = "light",
paramtype2 = "wallmounted",
sunlight_propagates = true,
is_ground_content = false,
walkable = false,
liquids_pointable = false,
light_source = light,
groups = groups,
drop = itemstring,
selection_box = {
type = "wallmounted",
wall_top = {-1/16, -1/16, -1/16, 1/16, 0.5, 1/16},
wall_bottom = {-1/16, -0.5, -1/16, 1/16, 1/16, 1/16},
},
sounds = sounds,
node_placement_prediction = "",
on_place = function(itemstack, placer, pointed_thing)
if pointed_thing.type ~= "node" then
-- no interaction possible with entities, for now.
return itemstack
end
local under = pointed_thing.under
local node = minetest.get_node(under)
local def = minetest.registered_nodes[node.name]
if not def then return itemstack end
-- Call on_rightclick if the pointed node defines it
if placer and not placer:get_player_control().sneak then
if minetest.registered_nodes[node.name] and minetest.registered_nodes[node.name].on_rightclick then
return minetest.registered_nodes[node.name].on_rightclick(under, node, placer, itemstack) or itemstack
end
end
local above = pointed_thing.above
local wdir = minetest.dir_to_wallmounted({x = under.x - above.x, y = under.y - above.y, z = under.z - above.z})
if check_placement_allowed(node, wdir) == false then
return itemstack
end
local itemstring = itemstack:get_name()
local fakestack = ItemStack(itemstack)
local idef = fakestack:get_definition()
local retval
if wdir == 1 then
retval = fakestack:set_name(itemstring)
else
retval = fakestack:set_name(itemstring_wall)
end
if not retval then
return itemstack
end
local success
itemstack, success = minetest.item_place(fakestack, placer, pointed_thing, wdir)
itemstack:set_name(itemstring)
if success and idef.sounds and idef.sounds.place then
minetest.sound_play(idef.sounds.place, {pos=under, gain=1}, true)
end
return itemstack
end,
on_rotate = false,
}
if moredef ~= nil then
for k,v in pairs(moredef) do
floordef[k] = v
end
end
if moredef_floor ~= nil then
for k,v in pairs(moredef_floor) do
floordef[k] = v
end
end
minetest.register_node(itemstring, floordef)
local groups_wall = table.copy(groups)
groups_wall.torch = 2
local walldef = {
drawtype = "mesh",
mesh = mesh_wall,
tiles = tiles,
paramtype = "light",
paramtype2 = "wallmounted",
sunlight_propagates = true,
is_ground_content = false,
walkable = false,
light_source = light,
groups = groups_wall,
drop = itemstring,
selection_box = {
type = "wallmounted",
wall_top = {-0.1, -0.1, -0.1, 0.1, 0.5, 0.1},
wall_bottom = {-0.1, -0.5, -0.1, 0.1, 0.1, 0.1},
wall_side = {-0.5, -0.5, -0.1, -0.2, 0.1, 0.1},
},
sounds = sounds,
on_rotate = false,
}
if moredef ~= nil then
for k,v in pairs(moredef) do
walldef[k] = v
end
end
if moredef_wall ~= nil then
for k,v in pairs(moredef_wall) do
walldef[k] = v
end
end
minetest.register_node(itemstring_wall, walldef)
-- Add entry alias for the Help
if minetest.get_modpath("doc") then
doc.add_entry_alias("nodes", itemstring, "nodes", itemstring_wall)
end
end
mcl_torches.register_torch("soul_torch",
S("Soul Torch"),
S("Torches are light sources which can be placed at the side or on the top of most blocks."),
nil,
"soul_torch_on_floor.png",
"mcl_torches_torch_floor.obj", "mcl_torches_torch_wall.obj",
{{
name = "soul_torch_on_floor_animated.png",
animation = {type = "vertical_frames", aspect_w = 16, aspect_h = 16, length = 3.3}
}},
LIGHT_TORCH,
{dig_immediate=3, torch=1, deco_block=1},
mcl_sounds.node_sound_wood_defaults(),
{_doc_items_hidden = false,
on_destruct = function(pos)
remove_flames(pos)
end},
{on_construct = function(pos)
spawn_flames_floor(pos)
end},
{on_construct = function(pos)
local node = minetest.get_node(pos)
spawn_flames_wall(pos, node.param2)
end})
minetest.register_craft({
output = "mcl_blackstone:soul_torch 4",
recipe = {
{ "mcl_nether:soul_sand" },
{ "mcl_core:stick" },
}
})
minetest.register_lbm({
label = "Torch flame particles",
name = "mcl_blackstone:flames",
nodenames = {"mcl_blackstone:soul_torch", "mcl_blackstone:soul_torch_wall"},
run_at_every_load = true,
action = function(pos, node)
if node.name == "mcl_blackstone:soul_torch" then
spawn_flames_floor(pos)
elseif node.name == "mcl_blackstone:soul_torch" then
spawn_flames_wall(pos, node.param2)
end
end,
})
minetest.register_node("mcl_blackstone:soul_lantern", {
tiles = {
"lantern_top.png",
"lantern_bottom.png",
"lantern.png",
"lantern.png",
"lantern.png",
"lantern.png",
},
groups = {pickaxey=3},
inventory_image = "lantern.png",
light_source = 10,
description = S("Soul Lantern"),
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
_mcl_hardness = 1,
-- Node box by debiankaios
node_box = {
type = "fixed",
fixed = {
{-0.1875, -0.5000, -0.1875, 0.1875, -0.06250, 0.1875},
{-0.1250, -0.06250, -0.1250, 0.1250, 0.06250, 0.1250},
{-0.06250, 0.1250, -0.006250, 0.06250, 0.1875, 0.006250},
{-0.06250, 0.06250, -0.006250, -0.03125, 0.1250, 0.006250},
{0.03125, 0.06250, -0.006250, 0.06250, 0.1250, 0.006250},
}
},
stack_max = 64,
})
minetest.register_craft({
type = "shaped",
output = "mcl_blackstone:soul_lantern",
recipe = {
{"mcl_core:iron_nugget", "mcl_core:iron_nugget","mcl_core:iron_nugget"},
{"mcl_core:iron_nugget", "mcl_blackstone:soul_torch", "mcl_core:iron_nugget"},
{"mcl_core:iron_nugget", "mcl_core:iron_nugget", "mcl_core:iron_nugget"}
}
})

View File

@ -0,0 +1,28 @@
# textdomain: mcl_blackstone
Blackstone=Schwarzstein
Polished Blackstone=Polierter Schwarzstein
Chieseled Polished Blackstone=Gemeißelter polierter Schwarzstein
Polished Blackstone Bricks=Polierter Schwarzsteinziegel
Basalt=Basalt
Polished Basalt=Polierter Basalt
Blackstone Slab=Schwarzstein Stufe
Polished Blackstone Slab=Polierte Schwarzstein Stufe
Chieseled Polished Blackstone Slab=Gemeißelte Polierte Schwarzstein Stufe
Polished Blackstone Brick Slab=Polierte Schwarzsteinziegel Stufe
Blackstone Stairs=Schwarzstein Treppe
Polished Blackstone Stairs=Polierte Schwarzstein Treppe
Chieseled Polished Blackstone Stairs=Gemeißelte Polierte Schwarzstein Treppe
Polished Blackstone Brick Stairs=Polierte Schwarzsteinziegel Treppe
Quartz Bricks=Quartz Ziegel
Soul Torch=Seelenfakel
Soul Lantern=Seelenlaterne
Soul Soil=Seelenerde
Eternal Soul Fire=Seelenfeuer
Gilded Blackstone=Vergoldeter Schwarzstein
Nether Gold Ore=Nethergolderz
Smooth Basalt=Glatter Basalt
@1 has been cooked crisp.=@1 wurde knusprig gebraten.
@1 felt the burn.=@1 ist völlig verbrannt.
@1 died in the flames.=@1 starb in den Flammen.
@1 died in a fire.=@1 starb in einem Feuer.

View File

@ -0,0 +1,23 @@
# textdomain: mcl_blackstone
Blackstone=
Polished Blackstone=
Chieseled Polished Blackstone=
Polished Blackstone Bricks=
Basalt=
Polished Basalt=
Blackstone Slab=
Polished Blackstone Slab=
Chieseled Polished Blackstone Slab=
Polished Blackstone Brick Slab=
Blackstone Stairs=
Polished Blackstone Stairs=
Chieseled Polished Blackstone Stairs=
Polished Blackstone Brick Stairs=
Quartz Bricks=
Soul Torch=
Soul Lantern=
Soul Soil=
Eternal Soul Fire=
Gilded Blackstone=
Nether Gold Ore=
Smooth Basalt=

View File

@ -0,0 +1 @@
name = mcl_blackstone

View File

@ -0,0 +1,29 @@
# Blender v2.76 (sub 0) OBJ File: 'torch_on_floor_node.blend'
# www.blender.org
o torch_Cube_Cube.001_Cube_Cube.001_Material.001
v 0.062500 0.062500 0.062500
v 0.062500 0.062500 -0.062500
v -0.062500 0.062500 -0.062500
v -0.062500 0.062500 0.062500
v -0.062500 -0.500000 0.062500
v 0.062500 -0.500000 0.062500
v 0.062500 -0.500000 -0.062500
v -0.062500 -0.500000 -0.062500
vt 0.562500 0.500000
vt 0.562500 0.625000
vt 0.437500 0.625000
vt 0.437500 0.500000
vt 0.437500 0.000000
vt 0.562500 0.000000
vt 0.562500 0.125000
vt 0.437500 0.125000
vn 0.000000 1.000000 0.000000
vn 0.000000 0.000000 -1.000000
vn 1.000000 0.000000 0.000000
s 1
f 1/1/1 2/2/1 3/3/1 4/4/1
f 5/5/1 6/6/1 7/7/1 8/8/1
f 1/2/2 6/6/2 5/5/2 4/3/2
f 2/3/3 1/2/3 6/6/3 7/5/3
f 3/2/2 2/3/2 7/5/2 8/6/2
f 4/3/3 5/5/3 8/6/3 3/2/3

View File

@ -0,0 +1,29 @@
# Blender v2.76 (sub 0) OBJ File: 'torch_on_wall_node.blend'
# www.blender.org
o torch_wall_Cube_Cube.001_Cube_Cube.001_Material.001
v 0.062469 -0.303502 0.086070
v 0.062469 -0.195248 0.023570
v -0.062531 -0.195248 0.023570
v -0.062531 -0.303502 0.086070
v -0.062531 -0.584752 -0.401070
v 0.062469 -0.584752 -0.401070
v 0.062469 -0.476498 -0.463570
v -0.062531 -0.476498 -0.463570
vt 0.562500 0.500000
vt 0.562500 0.625000
vt 0.437500 0.625000
vt 0.437500 0.500000
vt 0.437500 0.000000
vt 0.562500 0.000000
vt 0.562500 0.125000
vt 0.437500 0.125000
vn 0.000000 0.500000 0.866000
vn 0.000000 0.866000 -0.500000
vn 1.000000 -0.000000 0.000000
s 1
f 1/1/1 2/2/1 3/3/1 4/4/1
f 5/5/1 6/6/1 7/7/1 8/8/1
f 1/2/2 6/6/2 5/5/2 4/3/2
f 2/3/3 1/2/3 6/6/3 7/5/3
f 3/2/2 2/3/2 7/5/2 8/6/2
f 4/3/3 5/5/3 8/6/3 3/2/3

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB