1
0
Fork 0

Compare commits

...

7 Commits

Author SHA1 Message Date
José Douglas da Silva Souza d6b329d657 Global definition removed 2024-03-08 22:38:03 +00:00
José Douglas da Silva Souza e2bbc9df5c Global definition removed 2024-03-08 22:36:16 +00:00
José Douglas da Silva Souza 4eecab501d Global definition removed 2024-03-08 22:34:31 +00:00
JoseDouglas26 2e2c2da6fa Merge branch 'hollow_logs' of https://git.minetest.land/JoseDouglas26/MineClone2 into hollow_logs 2024-03-07 21:10:40 -03:00
JoseDouglas26 671438e802 Some updates in the code 2024-03-07 21:08:25 -03:00
JoseDouglas26 88cad892d5 New hollow log blocks 2024-03-04 15:51:45 +00:00
JoseDouglas26 97d5865d13 New hollow log blocks 2024-03-04 12:07:53 -03:00
42 changed files with 485 additions and 0 deletions

View File

@ -0,0 +1,144 @@
local modpath = minetest.get_modpath(minetest.get_current_modname())
local S = minetest.get_translator(minetest.get_current_modname())
mcl_hollow_logs.logs = {
{"acaciatree", "Hollow Acacia Log", "Stripped Hollow Acacia Log"},
{"birchtree", "Hollow Birch Log", "Stripped Hollow Birch Log"},
{"darktree", "Hollow Dark Oak Log", "Stripped Hollow Dark Oak Log"},
{"jungletree", "Hollow Jungle Log", "Stripped Hollow Jungle Log"},
{"sprucetree", "Hollow Spruce Log", "Stripped Hollow Spruce Log"},
{"tree", "Hollow Oak Log", "Stripped Hollow Oak Log"}
}
if minetest.get_modpath("mcl_cherry_blossom") then
table.insert(mcl_hollow_logs.logs, {"cherrytree", "Hollow Cherry Log", "Stripped Hollow Cherry Log"})
end
if minetest.get_modpath("mcl_mangrove") then
table.insert(mcl_hollow_logs.logs, {"mangrove_tree", "Hollow Mangrove Log", "Stripped Hollow Mangrove Log"})
end
local collisionbox = {
type = "fixed",
fixed = {
{-0.5, -0.5, -0.5, 0.5, 0.5, -0.375},
{-0.5, -0.5, -0.5, -0.375, 0.5, 0.5},
{0.375, -0.5, -0.5, 0.5, 0.5, 0.5},
{-0.5, -0.5, 0.375, 0.5, 0.5, 0.5},
}
}
for i = 1, #mcl_hollow_logs.logs do
local name = mcl_hollow_logs.logs[i][1]
local normal_desc = mcl_hollow_logs.logs[i][2]
local stripped_desc = mcl_hollow_logs.logs[i][3]
minetest.register_node("mcl_hollow_logs:"..name.."_hollow", {
collision_box = collisionbox,
description = S(normal_desc),
drawtype = "mesh",
groups = {
axey = 1, building_block = 1, fire_encouragement = 5, fire_flammability = 5, flammable = 2,
handy = 1, hollow_log = 1
},
mesh = "mcl_hollow_logs_log.obj",
on_place = mcl_util.rotate_axis,
paramtype = "light",
paramtype2 = "facedir",
sounds = mcl_sounds.node_sound_wood_defaults(),
sunlight_propagates = true,
tiles = {"mcl_hollow_logs_"..name..".png"},
_mcl_blast_resistance = 2,
_mcl_hardness = 2,
_mcl_stripped_variant = "mcl_hollow_logs:stripped_"..name.."_hollow"
})
minetest.register_node("mcl_hollow_logs:stripped_"..name.."_hollow", {
collision_box = collisionbox,
description = S(stripped_desc),
drawtype = "mesh",
groups = {
axey = 1, building_block = 1, fire_encouragement = 5, fire_flammability = 5, flammable = 2,
handy = 1, hollow_log = 1
},
mesh = "mcl_hollow_logs_log.obj",
on_place = mcl_util.rotate_axis,
paramtype = "light",
paramtype2 = "facedir",
sounds = mcl_sounds.node_sound_wood_defaults(),
sunlight_propagates = true,
tiles = {"mcl_hollow_logs_stripped_"..name..".png"},
_mcl_blast_resistance = 2,
_mcl_hardness = 2
})
end
if minetest.get_modpath("mcl_crimson") then
minetest.register_node("mcl_hollow_logs:crimson_hyphae_hollow", {
collision_box = collisionbox,
description = S("Hollow Crimson Stem"),
drawtype = "mesh",
groups = {axey = 1, building_block = 1, handy = 1, hollow_stem = 1},
mesh = "mcl_hollow_logs_log.obj",
on_place = mcl_util.rotate_axis,
paramtype = "light",
paramtype2 = "facedir",
sounds = mcl_sounds.node_sound_wood_defaults(),
sunlight_propagates = true,
tiles = {"mcl_hollow_logs_crimson.png"},
_mcl_blast_resistance = 2,
_mcl_hardness = 2,
_mcl_stripped_variant = "mcl_hollow_logs:stripped_crimson_hyphae_hollow"
})
minetest.register_node("mcl_hollow_logs:stripped_crimson_hyphae_hollow", {
collision_box = collisionbox,
description = S("Stripped Hollow Crimson Stem"),
drawtype = "mesh",
groups = {axey = 1, building_block = 1, handy = 1, hollow_stem = 1},
mesh = "mcl_hollow_logs_log.obj",
on_place = mcl_util.rotate_axis,
paramtype = "light",
paramtype2 = "facedir",
sounds = mcl_sounds.node_sound_wood_defaults(),
sunlight_propagates = true,
tiles = {"mcl_hollow_logs_stripped_crimson.png"},
_mcl_blast_resistance = 2,
_mcl_hardness = 2
})
minetest.register_node("mcl_hollow_logs:warped_hyphae_hollow", {
collision_box = collisionbox,
description = S("Hollow Warped Stem"),
drawtype = "mesh",
groups = {axey = 1, building_block = 1, handy = 1, hollow_stem = 1},
mesh = "mcl_hollow_logs_log.obj",
on_place = mcl_util.rotate_axis,
paramtype = "light",
paramtype2 = "facedir",
sounds = mcl_sounds.node_sound_wood_defaults(),
sunlight_propagates = true,
tiles = {"mcl_hollow_logs_warped.png"},
_mcl_blast_resistance = 2,
_mcl_hardness = 2,
_mcl_stripped_variant = "mcl_hollow_logs:stripped_warped_hyphae_hollow"
})
minetest.register_node("mcl_hollow_logs:stripped_warped_hyphae_hollow", {
collision_box = collisionbox,
description = S("Stripped Hollow Warped Stem"),
drawtype = "mesh",
groups = {axey = 1, building_block = 1, handy = 1, hollow_stem = 1},
mesh = "mcl_hollow_logs_log.obj",
on_place = mcl_util.rotate_axis,
paramtype = "light",
paramtype2 = "facedir",
sounds = mcl_sounds.node_sound_wood_defaults(),
sunlight_propagates = true,
tiles = {"mcl_hollow_logs_stripped_warped.png"},
_mcl_blast_resistance = 2,
_mcl_hardness = 2
})
end
dofile(modpath.."/recipes.lua")

View File

@ -0,0 +1,21 @@
# textdomain: mcl_hollow_logs
Hollow Acacia Log=Tronco de Acácia Oco
Hollow Birch Log=Tronco de Bétula Oco
Hollow Cherry Log=Tronco de Cerejeira Oco
Hollow Dark Oak Log=Tronco de Carvalho Escuro Oco
Hollow Jungle Log=Tronco da Selva Oco
Hollow Mangrove Log=Tronco de Mangue Oco
Hollow Oak Log=Tronco de Carvalho Oco
Hollow Spruce Log=Tronco de Pinheiro Oco
Hollow Crimson Stem=Caule Carmesim Oco
Hollow Warped Stem=Caule Distorcido Oco
Stripped Hollow Acacia Log=Tronco de Acácia Oco Descascado
Stripped Hollow Birch Log=Tronco de Bétula Oco Descascado
Stripped Hollow Cherry Log=Tronco de Cerejeira Oco Descascado
Stripped Hollow Dark Oak Log=Tronco de Carvalho Escuro Oco Descascado
Stripped Hollow Jungle Log=Tronco da Selva Oco Descascado
Stripped Hollow Mangrove Log=Tronco de Mangue Oco Descascado
Stripped Hollow Oak Log=Tronco de Carvalho Oco Descascado
Stripped Hollow Spruce Log=Tronco de Pinheiro Oco Descascado
Stripped Hollow Crimson Stem=Caule Carmesim Oco Descascado
Stripped Hollow Warped Stem=Caule Distorcido Oco Descascado

View File

@ -0,0 +1,21 @@
# textdomain: mcl_hollow_logs
Hollow Acacia Log=
Hollow Birch Log=
Hollow Cherry Log=
Hollow Dark Oak Log=
Hollow Jungle Log=
Hollow Mangrove Log=
Hollow Oak Log=
Hollow Spruce Log=
Hollow Crimson Stem=
Hollow Warped Stem=
Stripped Hollow Acacia Log=
Stripped Hollow Birch Log=
Stripped Hollow Cherry Log=
Stripped Hollow Dark Oak Log=
Stripped Hollow Jungle Log=
Stripped Hollow Mangrove Log=
Stripped Hollow Oak Log=
Stripped Hollow Spruce Log=
Stripped Hollow Crimson Stem=
Stripped Hollow Warped Stem=

View File

@ -0,0 +1,4 @@
name = mcl_hollow_logs
depends = mcl_core, mcl_sounds, mcl_util
optional_depends = mcl_cherry_blossom, mcl_crimson, mcl_mangrove
author = JoseDouglas26

View File

@ -0,0 +1,207 @@
# Blender 3.6.4
# www.blender.org
mtllib mcl_hollowed_logs_log.mtl
o Cubo.006
v 0.312500 -0.500000 0.312500
v 0.312500 0.500000 0.312500
v 0.312500 -0.500000 0.500000
v 0.312500 0.500000 0.500000
v -0.312500 -0.500000 0.312500
v -0.312500 0.500000 0.312500
v -0.312500 -0.500000 0.500000
v -0.312500 0.500000 0.500000
v -0.312500 -0.500000 0.312500
v -0.312500 0.500000 0.312500
v -0.312500 -0.500000 0.500000
v -0.312500 0.500000 0.500000
v -0.500000 -0.500000 0.312500
v -0.500000 0.500000 0.312500
v -0.500000 -0.500000 0.500000
v -0.500000 0.500000 0.500000
v 0.500000 -0.500000 -0.500000
v 0.500000 0.500000 -0.500000
v 0.500000 -0.500000 -0.312500
v 0.500000 0.500000 -0.312500
v 0.312500 -0.500000 -0.500000
v 0.312500 0.500000 -0.500000
v 0.312500 -0.500000 -0.312500
v 0.312500 0.500000 -0.312500
v -0.312500 -0.500000 -0.500000
v -0.312500 0.500000 -0.500000
v -0.312500 -0.500000 -0.312500
v -0.312500 0.500000 -0.312500
v -0.500000 -0.500000 -0.500000
v -0.500000 0.500000 -0.500000
v -0.500000 -0.500000 -0.312500
v -0.500000 0.500000 -0.312500
v 0.500000 -0.500000 0.312500
v 0.500000 0.500000 0.312500
v 0.500000 -0.500000 0.500000
v 0.500000 0.500000 0.500000
v 0.312500 -0.500000 0.312500
v 0.312500 0.500000 0.312500
v 0.312500 -0.500000 0.500000
v 0.312500 0.500000 0.500000
v -0.312500 -0.500000 -0.312500
v -0.312500 0.500000 -0.312500
v -0.312500 -0.500000 0.312500
v -0.312500 0.500000 0.312500
v -0.500000 -0.500000 -0.312500
v -0.500000 0.500000 -0.312500
v -0.500000 -0.500000 0.312500
v -0.500000 0.500000 0.312500
v 0.500000 -0.500000 -0.312500
v 0.500000 0.500000 -0.312500
v 0.500000 -0.500000 0.312500
v 0.500000 0.500000 0.312500
v 0.312500 -0.500000 -0.312500
v 0.312500 0.500000 -0.312500
v 0.312500 -0.500000 0.312500
v 0.312500 0.500000 0.312500
v 0.312500 -0.500000 -0.500000
v 0.312500 0.500000 -0.500000
v 0.312500 -0.500000 -0.312500
v 0.312500 0.500000 -0.312500
v -0.312500 -0.500000 -0.500000
v -0.312500 0.500000 -0.500000
v -0.312500 -0.500000 -0.312500
v -0.312500 0.500000 -0.312500
vn 1.0000 -0.0000 -0.0000
vn -0.0000 -0.0000 1.0000
vn -1.0000 -0.0000 -0.0000
vn -0.0000 -0.0000 -1.0000
vn -0.0000 -1.0000 -0.0000
vn -0.0000 1.0000 -0.0000
vt 0.375000 0.000000
vt 0.625000 0.000000
vt 0.625000 0.250000
vt 0.375000 0.250000
vt 0.135417 0.500000
vt 0.135417 1.000000
vt 0.031250 1.000000
vt 0.031250 0.500000
vt 0.375000 0.500000
vt 0.625000 0.500000
vt 0.625000 0.750000
vt 0.375000 0.750000
vt 0.135417 0.000000
vt 0.031250 0.000000
vt 0.635417 1.000000
vt 0.531250 1.000000
vt 0.531250 0.906250
vt 0.635417 0.906250
vt 0.468750 1.000000
vt 0.364583 1.000000
vt 0.364583 0.906250
vt 0.468750 0.906250
vt 0.000000 1.000000
vt 0.000000 0.500000
vt 1.000000 0.500000
vt 1.000000 1.000000
vt 0.968750 1.000000
vt 0.968750 0.500000
vt 0.625000 1.000000
vt 0.375000 1.000000
vt 0.666667 0.906250
vt 0.666667 1.000000
vt 0.500000 1.000000
vt 0.500000 0.906250
vt 0.333333 0.500000
vt 0.333333 1.000000
vt 0.302083 1.000000
vt 0.302083 0.500000
vt 0.697917 0.500000
vt 0.697917 1.000000
vt 0.666667 0.500000
vt 0.666667 0.593750
vt 0.635417 0.593750
vt 0.635417 0.500000
vt 0.364583 0.593750
vt 0.333333 0.593750
vt 0.364583 0.500000
vt 0.864583 0.500000
vt 0.864583 1.000000
vt 0.833333 1.000000
vt 0.833333 0.500000
vt 0.802083 1.000000
vt 0.802083 0.500000
vt 0.531250 0.593750
vt 0.500000 0.593750
vt 0.500000 0.500000
vt 0.531250 0.500000
vt 0.468750 0.593750
vt 0.468750 0.500000
vt 0.500000 0.500000
vt 0.197917 0.500000
vt 0.197917 1.000000
vt 0.166667 1.000000
vt 0.166667 0.500000
vt 0.166667 0.500000
vt 0.166667 1.000000
vt 0.135417 1.000000
vt 0.135417 0.500000
vt 0.333333 0.906250
vt 0.968750 0.000000
vt 0.864583 0.000000
vt 0.197917 1.000000
vt 0.197917 0.500000
vt 0.302083 0.000000
vt 0.197917 0.500000
vt 0.197917 0.000000
vt 0.364583 0.906250
vt 0.333333 0.906250
vt 0.802083 0.000000
vt 0.697917 0.000000
vt 0.364583 0.593750
vt 0.364583 0.500000
vt 0.468750 0.500000
s 0
usemtl Materiais
f 1/1/1 2/2/1 4/3/1 3/4/1
f 3/5/2 4/6/2 8/7/2 7/8/2
f 7/9/3 8/10/3 6/11/3 5/12/3
f 5/13/4 6/5/4 2/8/4 1/14/4
f 3/15/5 7/16/5 5/17/5 1/18/5
f 8/19/6 4/20/6 2/21/6 6/22/6
f 9/1/1 10/2/1 12/3/1 11/4/1
f 11/8/2 12/7/2 16/23/2 15/24/2
f 15/25/3 16/26/3 14/27/3 13/28/3
f 13/12/4 14/11/4 10/29/4 9/30/4
f 11/31/5 15/32/5 13/15/5 9/18/5
f 16/33/6 12/19/6 10/22/6 14/34/6
f 17/35/1 18/36/1 20/37/1 19/38/1
f 19/4/2 20/3/2 24/10/2 23/9/2
f 23/9/3 24/10/3 22/11/3 21/12/3
f 21/39/4 22/40/4 18/32/4 17/41/4
f 19/42/5 23/43/5 21/44/5 17/41/5
f 24/45/6 20/46/6 18/35/6 22/47/6
f 25/1/1 26/2/1 28/3/1 27/4/1
f 27/4/2 28/3/2 32/10/2 31/9/2
f 31/48/3 32/49/3 30/50/3 29/51/3
f 29/51/4 30/50/4 26/52/4 25/53/4
f 27/54/5 31/55/5 29/56/5 25/57/5
f 32/55/6 28/58/6 26/59/6 30/60/6
f 33/61/1 34/62/1 36/63/1 35/64/1
f 35/65/2 36/66/2 40/67/2 39/68/2
f 39/9/3 40/10/3 38/11/3 37/12/3
f 37/12/4 38/11/4 34/29/4 33/30/4
f 35/33/5 39/34/5 37/17/5 33/16/5
f 40/20/6 36/36/6 34/69/6 38/21/6
f 41/70/1 42/28/1 44/48/1 43/71/1
f 43/4/2 44/3/2 48/10/2 47/9/2
f 47/28/3 48/27/3 46/49/3 45/48/3
f 45/12/4 46/11/4 42/29/4 41/30/4
f 43/17/5 47/34/5 45/55/5 41/54/5
f 48/34/6 44/22/6 42/58/6 46/55/6
f 49/38/1 50/37/1 52/72/1 51/73/1
f 51/4/2 52/3/2 56/10/2 55/9/2
f 55/74/3 56/38/3 54/75/3 53/76/3
f 53/12/4 54/11/4 50/29/4 49/30/4
f 51/31/5 55/18/5 53/43/5 49/42/5
f 56/77/6 52/78/6 50/46/6 54/45/6
f 57/1/1 58/2/1 60/3/1 59/4/1
f 59/79/2 60/53/2 64/39/2 63/80/2
f 63/9/3 64/10/3 62/11/3 61/12/3
f 61/53/4 62/52/4 58/40/4 57/39/4
f 59/43/5 63/54/5 61/57/5 57/44/5
f 64/58/6 60/81/6 58/82/6 62/83/6

View File

@ -0,0 +1,88 @@
for i = 1, #mcl_hollow_logs.logs do
local mod, material, stripped_material
local name = mcl_hollow_logs.logs[i][1]
if name:find("cherry") then
mod = "mcl_cherry_blossom:"
elseif name:find("mangrove") then
mod = "mcl_mangrove:"
else
mod = "mcl_core:"
end
material = mod..name
stripped_material = mod.."stripped_"..name
if name:find("mangrove") then
stripped_material = "mcl_mangrove:mangrove_stripped"
end
minetest.register_craft({
output = "mcl_hollow_logs:"..name.."_hollow 4",
recipe = {
{"", material, ""},
{material, "", material},
{"", material, ""}
}
})
minetest.register_craft({
output = "mcl_hollow_logs:stripped_"..name.."_hollow 4",
recipe = {
{"", stripped_material, ""},
{stripped_material, "", stripped_material},
{"", stripped_material, ""}
}
})
end
if minetest.get_modpath("mcl_crimson") then
minetest.register_craft({
output = "mcl_crimson:crimson_hyphae_hollow 4",
recipe = {
{"", "mcl_crimson:crimson_hyphae", ""},
{"mcl_crimson:crimson_hyphae", "", "mcl_crimson:crimson_hyphae"},
{"", "mcl_crimson:crimson_hyphae", ""}
}
})
minetest.register_craft({
output = "mcl_crimson:stripped_crimson_hyphae_hollow 4",
recipe = {
{"", "mcl_crimson:stripped_crimson_hyphae", ""},
{"mcl_crimson:stripped_crimson_hyphae", "", "mcl_crimson:stripped_crimson_hyphae"},
{"", "mcl_crimson:stripped_crimson_hyphae", ""}
}
})
minetest.register_craft({
output = "mcl_crimson:warped_hyphae_hollow 4",
recipe = {
{"", "mcl_crimson:warped_hyphae", ""},
{"mcl_crimson:warped_hyphae", "", "mcl_crimson:warped_hyphae"},
{"", "mcl_crimson:warped_hyphae", ""}
}
})
minetest.register_craft({
output = "mcl_crimson:stripped_warped_hyphae_hollow 4",
recipe = {
{"", "mcl_crimson:stripped_warped_hyphae", ""},
{"mcl_crimson:stripped_warped_hyphae", "", "mcl_crimson:stripped_warped_hyphae"},
{"", "mcl_crimson:stripped_warped_hyphae", ""}
}
})
end
minetest.register_craft({
burntime = 10,
recipe = "group:hollow_log",
type = "fuel",
})
minetest.register_craft({
cooktime = 5,
output = "mcl_core:charcoal_lump",
recipe = "group:hollow_log",
type = "cooking"
})

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.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 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: 1.6 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.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 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.7 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: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 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.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB