main #4

Merged
SevenOfAces merged 6 commits from mad-star-studio/Voxelis:main into main 2024-12-13 01:42:20 +00:00
45 changed files with 1359 additions and 1347 deletions
Showing only changes of commit 1708e2d461 - Show all commits

View file

@ -1,2 +1,3 @@
name = ITEMS
description = Meta-modpack containing the items-related mods for Voxelis
description = Meta-modpack containing the items-related mods for Voxelis
depends = vox_colors

View file

@ -1,2 +1,3 @@
name = vox_armor
description = Voxelis - armor: Adds armor to the game.
description = Voxelis - armor: Adds armor to the game.
depends = vox_colors

View file

@ -34,11 +34,6 @@ To register a dyeable item or block, call the `register_dyeable` function in you
```lua
-- List of dyeable things
local dyeable_blocks = {"sand", "terracotta", "marble", "cobblestone", "sandstone"}
-- Register base things their dyeable variants
for _, base_block in ipairs(dyeable_blocks) do
vox_coloring.register_dyeable("vox_worldblocks", base_block)
end
```
Parameters:

View file

@ -1,4 +1,10 @@
-- Vox Coloring System
---------------------------------------------------------------------------
-- Voxelis - Vox Coloring
-- Adds dynamic dyes, registers dyeable blocks/items, and supports customization
---------------------------------------------------------------------------
-- Initialize the global table for this mod
vox_coloring = {}
-- Register dyes dynamically based on vox_colors
for color_name, color_hex in pairs(vox_colors) do
@ -172,8 +178,8 @@ minetest.register_craftitem("vox_coloring:cleaning_solvent", {
minetest.register_craft({
output = "vox_coloring:cleaning_solvent",
recipe = {
{"vox_mats:soap", "bucket:water_bucket", "vox_mats:salt"},
{"vox_mats:ash", "", ""},
{"vox_main:soap", "bucket:water_bucket", "vox_main:salt"},
{"vox_main:ash", "", ""},
},
replacements = {{"bucket:water_bucket", "bucket:bucket"}},
})

View file

@ -1,2 +1,3 @@
name = vox_coloring
description = Voxelis - coloring. Adds dynamic dyes, dynamically adds dyed (fill in the blanks) from mods that call upon the function, adds other things that are helpful.
description = Voxelis - coloring. Adds dynamic dyes, dynamically adds dyed (fill in the blanks) from mods that call upon the function, adds other things that are helpful.
depends = vox_colors

View file

@ -0,0 +1,35 @@
-- Fabric Dying Bench
minetest.register_node("vox_fabric:fabric_dying_bench", {
description = "Fabric Dying Bench",
tiles = {"fabric_dying_bench_top.png", "fabric_dying_bench_side.png"},
groups = {cracky = 2},
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
-- Show the UI for pattern creation
local formspec = "size[8,9]" ..
"label[0.5,0.5;Fabric Dying Bench]" ..
"dropdown[1,1;3;grid_size;16x16,32x32,64x64;2]" ..
"button[4,1;2,1;save;Save Pattern]"
minetest.show_formspec(clicker:get_player_name(), "vox_fabric:dying_bench", formspec)
end,
})
minetest.register_on_player_receive_fields(function(player, formname, fields)
if formname == "vox_fabric:dying_bench" then
if fields.save then
-- Save the pattern
local player_name = player:get_player_name()
local pattern_id = player_name .. "_pattern_" .. os.time()
local pattern_file = minetest.get_worldpath() .. "/vox_fabric_generated/" .. pattern_id .. ".json"
local pattern_data = {
size = fields.grid_size,
colors = {}, -- This would be populated based on the player's interactions
}
minetest.safe_file_write(pattern_file, minetest.serialize(pattern_data))
player:get_inventory():add_item("main", "vox_fabric:pattern_template")
minetest.chat_send_player(player_name, "Pattern saved as: " .. pattern_id)
end
end
end)

View file

@ -0,0 +1,39 @@
-- Fabric Patterns Management
local modpath = minetest.get_modpath("vox_fabric")
local patterns_file = modpath .. "/textures/patterns.json"
local patterns = {}
-- Load predefined patterns
local file = io.open(patterns_file, "r")
if file then
local content = file:read("*a")
file:close()
patterns = minetest.parse_json(content) or {}
end
-- Register predefined patterns as Pattern Template items
for _, pattern in ipairs(patterns.patterns or {}) do
minetest.register_craftitem("vox_fabric:pattern_" .. pattern.id, {
description = "Pattern: " .. (pattern.title or pattern.id),
inventory_image = "patterns/" .. pattern.id .. ".png",
groups = {pattern = 1},
})
end
-- Pattern Template Item
minetest.register_craftitem("vox_fabric:pattern_template", {
description = "Pattern Template",
inventory_image = "pattern_template.png",
groups = {template = 1},
on_use = function(itemstack, user, pointed_thing)
-- Interaction with Pattern Template
local meta = itemstack:get_meta()
local pattern_id = meta:get_string("pattern_id")
if pattern_id and pattern_id ~= "" then
minetest.chat_send_player(user:get_player_name(), "Pattern ID: " .. pattern_id)
else
minetest.chat_send_player(user:get_player_name(), "This template has no pattern.")
end
end,
})

View file

@ -0,0 +1,37 @@
-- Voxelis: vox_fabric
-- Dynamic fabric and pattern system for Minetest
-- Initialize the global table for the mod
vox_fabric = {}
-- Dependencies
local modpath = minetest.get_modpath("vox_fabric")
dofile(modpath .. "/fabric_dying_bench.lua")
dofile(modpath .. "/fabric_patterns.lua")
-- Fabric Registry
local fabric_registry = {}
-- Register a fabric application
function vox_fabric.register_application(modname, base_item, description, base_texture)
fabric_registry[modname] = fabric_registry[modname] or {}
table.insert(fabric_registry[modname], base_item)
minetest.register_node(modname .. ":" .. base_item, {
description = description,
tiles = {base_texture},
groups = {fabric = 1},
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
-- Interaction logic for applying patterns
local meta = itemstack:get_meta()
local pattern_id = meta:get_string("pattern_id")
if pattern_id and pattern_id ~= "" then
local new_texture = "generated_patterns/" .. pattern_id .. ".png"
minetest.swap_node(pos, {name = modname .. ":" .. base_item, tiles = {new_texture}})
minetest.chat_send_player(clicker:get_player_name(), "Applied pattern: " .. pattern_id)
else
minetest.chat_send_player(clicker:get_player_name(), "No pattern found on the template.")
end
end,
})
end

View file

@ -1,2 +1,3 @@
name = vox_fabric
description = Voxelis - Fabric. Allow players to use premade patterns (which can be dyed with vox_coloring), or allow them to make their own.
description = Voxelis - Fabric. Allow players to use premade patterns (which can be dyed with vox_coloring), or allow them to make their own.
depends = vox_colors

View file

@ -0,0 +1,6 @@
{
"patterns": [
{"id": "pattern_1", "title": "Floral Design"},
{"id": "pattern_2", "title": "Geometric Shapes"}
]
}

View file

@ -0,0 +1,232 @@
-- Gems: Diamond, Emerald, Ruby, Sapphire, Topaz, Amethyst, Opal, Onyx, Garnet, Peridot, Aquamarine, Citrine, Tourmaline, Zircon, Tanzanite, Spinel, Lapis Lazuli, Malachite, Azurite, Turquoise, Amber, Moonstone, Sunstone, Bloodstone, Agate, Jasper, Chalcedony, Chrysoprase, Carnelian, Sardonyx, Heliotrope, Alexandrite, Tiger's Eye, Serpentine, Rhodonite
core.register_node("vox_main:diamond_ore", {
description = "Diamond Ore",
tiles = {"vox_diamond_ore.png"},
groups = {cracky = 2}
})
core.register_alias("diamond_ore", "vox_main:diamond_ore")
core.register_alias("default:stone_with_diamond", "vox_main:diamond_ore")
core.register_node("vox_main:emerald_ore", {
description = "Emerald Ore",
tiles = {"vox_emerald_ore.png"},
groups = {cracky = 2}
})
core.register_alias("emerald_ore", "vox_main:emerald_ore")
core.register_alias("default:stone_with_emerald", "vox_main:emerald_ore")
core.register_node("vox_main:ruby_ore", {
description = "Ruby Ore",
tiles = {"vox_ruby_ore.png"},
groups = {cracky = 2}
})
core.register_alias("ruby_ore", "vox_main:ruby_ore")
core.register_alias("default:stone_with_ruby", "vox_main:ruby_ore")
core.register_node("vox_main:sapphire_ore", {
description = "Sapphire Ore",
tiles = {"vox_sapphire_ore.png"},
groups = {cracky = 2}
})
core.register_alias("sapphire_ore", "vox_main:sapphire_ore")
core.register_alias("default:stone_with_sapphire", "vox_main:sapphire_ore")
core.register_node("vox_main:topaz_ore", {
description = "Topaz Ore",
tiles = {"vox_topaz_ore.png"},
groups = {cracky = 2}
})
core.register_alias("topaz_ore", "vox_main:topaz_ore")
core.register_alias("default:stone_with_topaz", "vox_main:topaz_ore")
core.register_node("vox_main:amethyst_ore", {
description = "Amethyst Ore",
tiles = {"vox_amethyst_ore.png"},
groups = {cracky = 2}
})
core.register_alias("amethyst_ore", "vox_main:amethyst_ore")
core.register_alias("default:stone_with_amethyst", "vox_main:amethyst_ore")
core.register_node("vox_main:opal_ore", {
description = "Opal Ore",
tiles = {"vox_opal_ore.png"},
groups = {cracky = 2}
})
core.register_alias("opal_ore", "vox_main:opal_ore")
core.register_alias("default:stone_with_opal", "vox_main:opal_ore")
core.register_node("vox_main:onyx_ore", {
description = "Onyx Ore",
tiles = {"vox_onyx_ore.png"},
groups = {cracky = 2}
})
core.register_alias("onyx_ore", "vox_main:onyx_ore")
core.register_alias("default:stone_with_onyx", "vox_main:onyx_ore")
core.register_node("vox_main:garnet_ore", {
description = "Garnet Ore",
tiles = {"vox_garnet_ore.png"},
groups = {cracky = 2}
})
core.register_alias("garnet_ore", "vox_main:garnet_ore")
core.register_alias("default:stone_with_garnet", "vox_main:garnet_ore")
core.register_node("vox_main:peridot_ore", {
description = "Peridot Ore",
tiles = {"vox_peridot_ore.png"},
groups = {cracky = 2}
})
core.register_alias("peridot_ore", "vox_main:peridot_ore")
core.register_alias("default:stone_with_peridot", "vox_main:peridot_ore")
core.register_node("vox_main:aquamarine_ore", {
description = "Aquamarine Ore",
tiles = {"vox_aquamarine_ore.png"},
groups = {cracky = 2}
})
core.register_alias("aquamarine_ore", "vox_main:aquamarine_ore")
core.register_alias("default:stone_with_aquamarine", "vox_main:aquamarine_ore")
core.register_node("vox_main:citrine_ore", {
description = "Citrine Ore",
tiles = {"vox_citrine_ore.png"},
groups = {cracky = 2}
})
core.register_alias("citrine_ore", "vox_main:citrine_ore")
core.register_alias("default:stone_with_citrine", "vox_main:citrine_ore")
core.register_node("vox_main:tourmaline_ore", {
description = "Tourmaline Ore",
tiles = {"vox_tourmaline_ore.png"},
groups = {cracky = 2}
})
core.register_alias("tourmaline_ore", "vox_main:tourmaline_ore")
core.register_alias("default:stone_with_tourmaline", "vox_main:tourmaline_ore")
core.register_node("vox_main:zircon_ore", {
description = "Zircon Ore",
tiles = {"vox_zircon_ore.png"},
groups = {cracky = 2}
})
core.register_alias("zircon_ore", "vox_main:zircon_ore")
core.register_alias("default:stone_with_zircon", "vox_main:zircon_ore")
core.register_node("vox_main:tanzanite_ore", {
description = "Tanzanite Ore",
tiles = {"vox_tanzanite_ore.png"},
groups = {cracky = 2}
})
core.register_alias("tanzanite_ore", "vox_main:tanzanite_ore")
core.register_alias("default:stone_with_tanzanite", "vox_main:tanzanite_ore")
core.register_node("vox_main:spinel_ore", {
description = "Spinel Ore",
tiles = {"vox_spinel_ore.png"},
groups = {cracky = 2}
})
core.register_alias("spinel_ore", "vox_main:spinel_ore")
core.register_alias("default:stone_with_spinel", "vox_main:spinel_ore")
core.register_node("vox_main:lapis_lazuli_ore", {
description = "Lapis Lazuli Ore",
tiles = {"vox_lapis_lazuli_ore.png"},
groups = {cracky = 2}
})
core.register_alias("lapis_lazuli_ore", "vox_main:lapis_lazuli_ore")
core.register_alias("default:stone_with_lapis_lazuli", "vox_main:lapis_lazuli_ore")
core.register_node("vox_main:malachite_ore", {
description = "Malachite Ore",
tiles = {"vox_malachite_ore.png"},
groups = {cracky = 2}
})
core.register_alias("malachite_ore", "vox_main:malachite_ore")
core.register_alias("default:stone_with_malachite", "vox_main:malachite_ore")
core.register_node("vox_main:azurite_ore", {
description = "Azurite Ore",
tiles = {"vox_azurite_ore.png"},
groups = {cracky = 2}
})
core.register_alias("azurite_ore", "vox_main:azurite_ore")
core.register_alias("default:stone_with_azurite", "vox_main:azurite_ore")
core.register_node("vox_main:turquoise_ore", {
description = "Turquoise Ore",
tiles = {"vox_turquoise_ore.png"},
groups = {cracky = 2}
})
core.register_alias("turquoise_ore", "vox_main:turquoise_ore")
core.register_alias("default:stone_with_turquoise", "vox_main:turquoise_ore")
core.register_node("vox_main:amber_ore", {
description = "Amber Ore",
tiles = {"vox_amber_ore.png"},
groups = {cracky = 2}
})
core.register_alias("amber_ore", "vox_main:amber_ore")
core.register_alias("default:stone_with_amber", "vox_main:amber_ore")
core.register_node("vox_main:moonstone_ore", {
description = "Moonstone Ore",
tiles = {"vox_moonstone_ore.png"},
groups = {cracky = 2}
})
core.register_alias("moonstone_ore", "vox_main:moonstone_ore")
core.register_alias("default:stone_with_moonstone", "vox_main:moonstone_ore")
core.register_node("vox_main:sunstone_ore", {
description = "Sunstone Ore",
tiles = {"vox_sunstone_ore.png"},
groups = {cracky = 2}
})
core.register_alias("sunstone_ore", "vox_main:sunstone_ore")
core.register_alias("default:stone_with_sunstone", "vox_main:sunstone_ore")
core.register_node("vox_main:bloodstone_ore", {
description = "Bloodstone Ore",
tiles = {"vox_bloodstone_ore.png"},
groups = {cracky = 2}
})
core.register_alias("bloodstone_ore", "vox_main:bloodstone_ore")
core.register_alias("default:stone_with_bloodstone", "vox_main:bloodstone_ore")
core.register_node("vox_main:agate_ore", {
description = "Agate Ore",
tiles = {"vox_agate_ore.png"},
groups = {cracky = 2}
})
core.register_alias("agate_ore", "vox_main:agate_ore")
core.register_alias("default:stone_with_agate", "vox_main:agate_ore")
core.register_node("vox_main:jasper_ore", {
description = "Jasper Ore",
tiles = {"vox_jasper_ore.png"},
groups = {cracky = 2}
})
core.register_alias("jasper_ore", "vox_main:jasper_ore")
core.register_alias("default:stone_with_jasper", "vox_main:jasper_ore")
core.register_node("vox_main:chalcedony_ore", {
description = "Chalcedony Ore",
tiles = {"vox_chalcedony_ore.png"},
groups = {cracky = 2}
})
core.register_alias("chalcedony_ore", "vox_main:chalcedony_ore")
core.register_alias("default:stone_with_chalcedony", "vox_main:chalcedony_ore")
core.register_node("vox_main:chrysoprase_ore", {
description = "Chrysoprase Ore",
tiles = {"vox_chrysoprase_ore.png"},
groups = {cracky = 2}
})
core.register_alias("chrysoprase_ore", "vox_main:chrysoprase_ore")
core.register_alias("default:stone_with_chrysoprase", "vox_main:chrysoprase_ore")
core.register_node("vox_main:carnelian_ore", {
description = "Carnelian Ore",
tiles = {"vox_carnelian_ore.png"},
groups = {cracky = 2}
})
core.register_alias("carnelian_ore", "vox_main:carnelian_ore")
core.register_alias("default:stone_with_carnelian", "vox_main:carnelian_ore")

View file

@ -0,0 +1,45 @@
---------------------------------------------------------------------------
-- Voxelis - Voxel survival sandbox for Luanti
-- Copyright (C) 2024 Mad Star Studio LLC
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 3 of the License, or
-- (at your option) any later version.
--
-- You should have received a copy of the GNU General Public License along
-- with this program; if not, see <http://www.gnu.org/licenses/>.
---------------------------------------------------------------------------
-- Load from minerals.lua
dofile(core.get_modpath("vox_main").."/minerals.lua")
-- Load from ores.lua
dofile(core.get_modpath("vox_main").."/ores.lua")
-- Load from gems.lua
dofile(core.get_modpath("vox_main").."/gems.lua")
-- Load from liquids.lua
dofile(core.get_modpath("vox_main").."/liquids.lua")
-- Load from ocean.lua
dofile(core.get_modpath("vox_main").."/ocean.lua")
-- Load from sky_island.lua
dofile(core.get_modpath("vox_main").."/sky_island.lua")
-- Load from mobdrops.lua
dofile(minetest.get_modpath("vox_main").."/mobdrops.lua")
-- Load from mats.lua
dofile(minetest.get_modpath("vox_main").."/mats.lua")
-- Glowing Moss
core.register_node("vox_main:glowing_moss", {
description = "Glowing Moss",
tiles = {"vox_glowing_moss.png"},
light_source = 8,
groups = {crumbly = 1}
})
core.register_alias("glowing_moss", "vox_main:glowing_moss")
-- ---------------------------- Dyeable Nodes -------------------------- --
-- List of dyeable things
local dyeable_blocks = {"sand", "terracotta", "marble", "cobblestone", "sandstone"}

View file

@ -0,0 +1,370 @@
-- -------------------------------------------------------------------------- --
-- Liquids --
-- -------------------------------------------------------------------------- --
-- Water
core.register_node("vox_main:water_source", {
description = "Water Source",
drawtype = "liquid",
tiles = {
{
name = "vox_water.png",
animation = {
type = "vertical_frames",
aspect_w = 16,
aspect_h = 16,
length = 2.0
}
}
},
alpha = 128,
paramtype = "light",
walkable = false,
pointable = false,
diggable = false,
buildable_to = true,
liquidtype = "source",
liquid_alternative_flowing = "vox_main:water_flowing",
liquid_alternative_source = "vox_main:water_source",
liquid_viscosity = 1,
post_effect_color = {a = 103, r = 30, g = 60, b = 90}
})
core.register_alias("water_source", "vox_main:water_source")
core.register_alias("default:river_water", "vox_main:water_source")
core.register_alias("mapgen_water_source", "vox_main:water_source")
core.register_node("vox_main:water_flowing", {
description = "Flowing Water",
drawtype = "flowingliquid",
tiles = {"vox_water.png"},
special_tiles = {
{
name = "vox_water.png",
backface_culling = false,
animation = {
type = "vertical_frames",
aspect_w = 16,
aspect_h = 16,
length = 0.8
}
}
},
alpha = 160,
paramtype = "light",
walkable = false,
pointable = false,
diggable = false,
buildable_to = true,
liquidtype = "flowing",
liquid_alternative_flowing = "vox_main:water_flowing",
liquid_alternative_source = "vox_main:water_source",
liquid_viscosity = 1,
post_effect_color = {a = 103, r = 30, g = 60, b = 90}
})
core.register_alias("water_flowing", "vox_main:water_flowing")
core.register_alias("default:river_water_flowing", "vox_main:water_flowing")
core.register_alias("mapgen_water_flowing", "vox_main:water_flowing")
-- River Water
core.register_node("vox_main:river_water_source", {
description = "River Water Source",
drawtype = "liquid",
tiles = {
{
name = "vox_river_water.png",
animation = {
type = "vertical_frames",
aspect_w = 16,
aspect_h = 16,
length = 2.0
}
}
},
alpha = 128,
paramtype = "light",
walkable = false,
pointable = false,
diggable = false,
buildable_to = true,
liquidtype = "source",
liquid_alternative_flowing = "vox_main:river_water_flowing",
liquid_alternative_source = "vox_main:river_water_source",
liquid_viscosity = 1,
post_effect_color = {a = 103, r = 30, g = 60, b = 90}
})
core.register_alias("river_water_source", "vox_main:river_water_source")
core.register_alias("mapgen_river_water_source", "vox_main:river_water_source")
core.register_alias("default:river_water_source", "vox_main:river_water_source")
core.register_node("vox_main:river_water_flowing", {
description = "Flowing River Water",
drawtype = "flowingliquid",
tiles = {"vox_river_water.png"},
special_tiles = {
{
name = "vox_river_water.png",
backface_culling = false,
animation = {
type = "vertical_frames",
aspect_w = 16,
aspect_h = 16,
length = 0.8
}
}
},
alpha = 160,
paramtype = "light",
walkable = false,
pointable = false,
diggable = false,
buildable_to = true,
liquidtype = "flowing",
liquid_alternative_flowing = "vox_main:river_water_flowing",
liquid_alternative_source = "vox_main:river_water_source",
liquid_viscosity = 1,
post_effect_color = {a = 103, r = 30, g = 60, b = 90}
})
-- Hotspring Water
core.register_node("vox_main:hotspring_water_source", {
description = "Hotspring Water Source",
drawtype = "liquid",
tiles = {
{
name = "vox_hotspring_water.png",
animation = {
type = "vertical_frames",
aspect_w = 16,
aspect_h = 16,
length = 2.0
}
}
},
alpha = 128,
paramtype = "light",
walkable = false,
pointable = false,
diggable = false,
buildable_to = true,
liquidtype = "source",
liquid_alternative_flowing = "vox_main:hotspring_water_flowing",
liquid_alternative_source = "vox_main:hotspring_water_source",
liquid_viscosity = 1,
post_effect_color = {a = 103, r = 30, g = 60, b = 90}
})
core.register_alias("hotspring_water_source", "vox_main:hotspring_water_source")
core.register_alias("mapgen_hotspring_water_source", "vox_main:hotspring_water_source")
core.register_node("vox_main:hotspring_water_flowing", {
description = "Flowing Hotspring Water",
drawtype = "flowingliquid",
tiles = {"vox_hotspring_water.png"},
special_tiles = {
{
name = "vox_hotspring_water.png",
backface_culling = false,
animation = {
type = "vertical_frames",
aspect_w = 16,
aspect_h = 16,
length = 0.8
}
}
},
alpha = 160,
paramtype = "light",
walkable = false,
pointable = false,
diggable = false,
buildable_to = true,
liquidtype = "flowing",
liquid_alternative_flowing = "vox_main:hotspring_water_flowing",
liquid_alternative_source = "vox_main:hotspring_water_source",
liquid_viscosity = 1,
post_effect_color = {a = 103, r = 30, g = 60, b = 90}
})
core.register_alias("hotspring_water_flowing", "vox_main:hotspring_water_flowing")
core.register_alias("mapgen_hotspring_water_flowing", "vox_main:hotspring_water_flowing")
-- Lava
core.register_node("vox_main:lava_source", {
description = "Lava Source",
drawtype = "liquid",
tiles = {
{
name = "vox_lava.png",
animation = {
type = "vertical_frames",
aspect_w = 16,
aspect_h = 16,
length = 2.0
}
}
},
alpha = 255,
paramtype = "light",
walkable = false,
pointable = false,
diggable = false,
buildable_to = true,
liquidtype = "source",
liquid_alternative_flowing = "vox_main:lava_flowing",
liquid_alternative_source = "vox_main:lava_source",
liquid_viscosity = 7,
post_effect_color = {a = 255, r = 255, g = 0, b = 0}
})
core.register_alias("lava_source", "vox_main:lava_source")
core.register_alias("default:lava_source", "vox_main:lava_source")
core.register_alias("mapgen_lava_source", "vox_main:lava_source")
core.register_node("vox_main:lava_flowing", {
description = "Flowing Lava",
drawtype = "flowingliquid",
tiles = {"vox_lava.png"},
special_tiles = {
{
name = "vox_lava.png",
backface_culling = false,
animation = {
type = "vertical_frames",
aspect_w = 16,
aspect_h = 16,
length = 2.0
}
}
},
alpha = 255,
paramtype = "light",
walkable = false,
pointable = false,
diggable = false,
buildable_to = true,
liquidtype = "flowing",
liquid_alternative_flowing = "vox_main:lava_flowing",
liquid_alternative_source = "vox_main:lava_source",
liquid_viscosity = 7,
post_effect_color = {a = 255, r = 255, g = 0, b = 0}
})
core.register_alias("lava_flowing", "vox_main:lava_flowing")
core.register_alias("default:lava_flowing", "vox_main:lava_flowing")
core.register_alias("mapgen_lava_flowing", "vox_main:lava_flowing")
-- Oil
core.register_node("vox_main:oil_source", {
description = "Oil Source",
drawtype = "liquid",
tiles = {
{
name = "vox_oil.png",
animation = {
type = "vertical_frames",
aspect_w = 16,
aspect_h = 16,
length = 2.0
}
}
},
alpha = 255,
paramtype = "light",
walkable = false,
pointable = false,
diggable = false,
buildable_to = true,
liquidtype = "source",
liquid_alternative_flowing = "vox_main:oil_flowing",
liquid_alternative_source = "vox_main:oil_source",
liquid_viscosity = 1,
post_effect_color = {a = 255, r = 0, g = 0, b = 0}
})
core.register_alias("oil_source", "vox_main:oil_source")
core.register_alias("mapgen_oil_source", "vox_main:oil_source")
core.register_node("vox_main:oil_flowing", {
description = "Flowing Oil",
drawtype = "flowingliquid",
tiles = {"vox_oil.png"},
special_tiles = {
{
name = "vox_oil.png",
backface_culling = false,
animation = {
type = "vertical_frames",
aspect_w = 16,
aspect_h = 16,
length = 2.0
}
}
},
alpha = 255,
paramtype = "light",
walkable = false,
pointable = false,
diggable = false,
buildable_to = true,
liquidtype = "flowing",
liquid_alternative_flowing = "vox_main:oil_flowing",
liquid_alternative_source = "vox_main:oil_source",
liquid_viscosity = 1,
post_effect_color = {a = 255, r = 0, g = 0, b = 0}
})
core.register_alias("oil_flowing", "vox_main:oil_flowing")
core.register_alias("mapgen_oil_flowing", "vox_main:oil_flowing")
-- Acid
core.register_node("vox_main:acid_source", {
description = "Acid Source",
drawtype = "liquid",
tiles = {
{
name = "vox_acid.png",
animation = {
type = "vertical_frames",
aspect_w = 16,
aspect_h = 16,
length = 2.0
}
}
},
alpha = 255,
paramtype = "light",
walkable = false,
pointable = false,
diggable = false,
buildable_to = true,
liquidtype = "source",
liquid_alternative_flowing = "vox_main:acid_flowing",
liquid_alternative_source = "vox_main:acid_source",
liquid_viscosity = 1,
post_effect_color = {a = 255, r = 0, g = 255, b = 0}
})
core.register_alias("acid_source", "vox_main:acid_source")
core.register_alias("mapgen_acid_source", "vox_main:acid_source")
core.register_node("vox_main:acid_flowing", {
description = "Flowing Acid",
drawtype = "flowingliquid",
tiles = {"vox_acid.png"},
special_tiles = {
{
name = "vox_acid.png",
backface_culling = false,
animation = {
type = "vertical_frames",
aspect_w = 16,
aspect_h = 16,
length = 2.0
}
}
},
alpha = 255,
paramtype = "light",
walkable = false,
pointable = false,
diggable = false,
buildable_to = true,
liquidtype = "flowing",
liquid_alternative_flowing = "vox_main:acid_flowing",
liquid_alternative_source = "vox_main:acid_source",
liquid_viscosity = 1,
post_effect_color = {a = 255, r = 0, g = 255, b = 0}
})

View file

@ -1,37 +1,37 @@
-- Ash
minetest.register_craftitem("vox_mats:ash", {
minetest.register_craftitem("vox_main:ash", {
description = "Ash",
inventory_image = "ash.png",
groups = {crumbly = 3},
})
-- Salt
minetest.register_craftitem("vox_mats:salt", {
minetest.register_craftitem("vox_main:salt", {
description = "Salt",
inventory_image = "salt.png",
})
-- Lye
minetest.register_craftitem("vox_mats:lye", {
minetest.register_craftitem("vox_main:lye", {
description = "Lye",
inventory_image = "lye.png",
})
minetest.register_craft({
output = "vox_mats:lye",
output = "vox_main:lye",
recipe = {
{"vox_mats:ash", "bucket:water_bucket"},
{"vox_main:ash", "bucket:water_bucket"},
},
replacements = {{"bucket:water_bucket", "bucket:bucket"}},
})
-- Soap
minetest.register_craftitem("vox_mats:soap", {
minetest.register_craftitem("vox_main:soap", {
description = "Soap",
inventory_image = "soap.png",
})
minetest.register_craft({
output = "vox_mats:soap",
output = "vox_main:soap",
recipe = {
{"vox_mobdrops:fat", "vox_mats:lye", "vox_mats:salt"},
{"vox_mobdrops:fat", "vox_main:lye", "vox_main:salt"},
},
})

View file

@ -0,0 +1,265 @@
-- Bedrock
core.register_node("vox_main:bedrock", {
description = "Bedrock",
tiles = {"vox_bedrock.png"},
groups = {cracky = 1}
})
core.register_alias("bedrock", "vox_main:bedrock")
core.register_alias("default:bedrock", "vox_main:bedrock")
-- Dirt
core.register_node("vox_main:dirt", {
description = "Dirt",
tiles = {"vox_dirt.png"},
groups = {crumbly = 3}
})
core.register_alias("dirt", "vox_main:dirt")
core.register_alias("default:dirt", "vox_main:dirt")
-- Grass
core.register_node("vox_main:grass_block", {
description = "Grass Block",
tiles = {"vox_grass_block.png"},
groups = {cracky = 3}
})
core.register_alias("grass_block", "vox_main:grass_block")
core.register_alias("default:dirt_with_grass_block" , "vox_main:grass_block")
-- Snow
core.register_node("vox_main:snow", {
description = "Snow",
tiles = {"vox_snow.png"},
groups = {crumbly = 3}
})
core.register_alias("snow", "vox_main:snow")
core.register_alias("default:snow", "vox_main:snow")
-- Packed Snow
core.register_node("vox_main:packed_snow", {
description = "Packed Snow",
tiles = {"vox_packed_snow.png"},
groups = {crumbly = 2}
})
core.register_alias("packed_snow", "vox_main:packed_snow")
-- Ice
core.register_node("vox_main:ice", {
description = "Ice",
tiles = {"vox_ice.png"},
groups = {crumbly = 3}
})
core.register_alias("ice", "vox_main:ice")
core.register_alias("default:ice", "vox_main:ice")
-- Dirt With Snow
core.register_node("vox_main:dirt_with_snow", {
description = "Dirt With Snow",
tiles = {"vox_dirt_with_snow.png"},
groups = {crumbly = 3}
})
core.register_alias("dirt_with_snow", "vox_main:dirt_with_snow")
-- Permafrost
core.register_node("vox_main:permafrost", {
description = "Permafrost",
tiles = {"vox_permafrost.png"},
groups = {crumbly = 3}
})
core.register_alias("permafrost", "vox_main:permafrost")
-- Bluestone
core.register_node("vox_main:bluestone", {
description = "Bluestone",
tiles = {"vox_bluestone.png"},
groups = {cracky = 2}
})
core.register_alias("bluestone", "vox_main:bluestone")
-- Stone
core.register_node("vox_main:stone", {
description = "Stone",
tiles = {"vox_stone.png"},
groups = {cracky = 2}
})
core.register_alias("stone", "vox_main:stone")
core.register_alias("mapgen_stone", "vox_main:stone")
-- core.register_alias("default:stone", "vox_main:stone")
-- Cobblestone
core.register_node("vox_main:cobblestone", {
description = "Cobblestone",
tiles = {"vox_cobblestone.png"},
groups = {cracky = 2}
})
core.register_alias("cobblestone", "vox_main:cobblestone")
core.register_alias("default:cobble", "vox_main:cobblestone")
-- Mossy Cobblestone
core.register_node("vox_main:mossycobble", {
description = "Mossy Cobblestone",
tiles = {"vox_mossycobble.png"},
groups = {cracky = 2}
})
core.register_alias("mossycobble", "vox_main:mossycobble")
core.register_alias("default:mossycobble", "vox_main:mossycobble")
-- Sand
-- (I don't like sand. It's coarse and rough and irritating and it gets everywhere.)
core.register_node("vox_main:sand", {
description = "Sand",
tiles = {"vox_sand.png"},
groups = {crumbly = 3}
})
core.register_alias("sand", "vox_main:sand")
core.register_alias("default:sand", "vox_main:sand")
-- Sulfur Crust
core.register_node("vox_main:sulfur_crust", {
description = "Sulfur Crust",
tiles = {"vox_sulfur_crust.png"},
groups = {crumbly = 3}
})
core.register_alias("sulfur_crust", "vox_main:sulfur_crust")
-- Ash
minetest.register_node("vox_main:ash_block", {
description = "Ash Block",
tiles = {"vox_ash_block.png"},
groups = {crumbly = 3},
drop = "vox_mats:ash", -- Drops ash when broken
})
-- Gravel
core.register_node("vox_main:gravel", {
description = "Gravel",
tiles = {"vox_gravel.png"},
groups = {crumbly = 2}
})
core.register_alias("gravel", "vox_main:gravel")
core.register_alias("default:gravel", "vox_main:gravel")
-- Sandstone
core.register_node("vox_main:sandstone", {
description = "Sandstone",
tiles = {"vox_sandstone.png"},
groups = {cracky = 2}
})
core.register_alias("sandstone", "vox_main:sandstone")
core.register_alias("default:sandstone", "vox_main:sandstone")
-- Clay
core.register_node("vox_main:clay", {
description = "Clay",
tiles = {"vox_clay.png"},
groups = {crumbly = 3}
})
core.register_alias("clay", "vox_main:clay")
core.register_alias("default:clay", "vox_main:clay")
-- Hardened Clay
core.register_node("vox_main:hardened_clay", {
description = "Hardened Clay",
tiles = {"vox_hardened_clay.png"},
groups = {cracky = 2}
})
core.register_alias("hardened_clay", "vox_main:hardened_clay")
core.register_alias("default:hardened_clay", "vox_main:hardened_clay")
-- Mud
core.register_node("vox_main:mud", {
description = "Mud",
tiles = {"vox_mud.png"},
groups = {crumbly = 3}
})
core.register_alias("mud", "vox_main:mud")
-- Salt Crystal
core.register_node("vox_main:salt_crystal", {
description = "Salt Crystal",
tiles = {"vox_salt_crystal.png"},
groups = {cracky = 2}
})
core.register_alias("salt_crystal", "vox_main:salt_crystal")
-- Volcanic Rock
core.register_node("vox_main:volcanic_rock", {
description = "Volcanic Rock",
tiles = {"vox_volcanic_rock.png"},
groups = {cracky = 3}
})
core.register_alias("volcanic_rock", "vox_main:volcanic_rock")
-- EVEN MORE ROCKS!!!
-- Granite
core.register_node("vox_main:granite", {
description = "Granite",
tiles = {"vox_granite.png"},
groups = {cracky = 2}
})
core.register_alias("granite", "vox_main:granite")
core.register_alias("default:granite", "vox_main:granite")
-- Diorite
core.register_node("vox_main:diorite", {
description = "Diorite",
tiles = {"vox_diorite.png"},
groups = {cracky = 2}
})
core.register_alias("diorite", "vox_main:diorite")
core.register_alias("default:diorite", "vox_main:diorite")
-- Andesite
core.register_node("vox_main:andesite", {
description = "Andesite",
tiles = {"vox_andesite.png"},
groups = {cracky = 2}
})
core.register_alias("andesite", "vox_main:andesite")
core.register_alias("default:andesite", "vox_main:andesite")
-- Basalt
core.register_node("vox_main:basalt", {
description = "Basalt",
tiles = {"vox_basalt.png"},
groups = {cracky = 2}
})
core.register_alias("basalt", "vox_main:basalt")
core.register_alias("default:basalt", "vox_main:basalt")
-- Obsidian
core.register_node("vox_main:obsidian", {
description = "Obsidian",
tiles = {"vox_obsidian.png"},
groups = {cracky = 2}
})
core.register_alias("obsidian", "vox_main:obsidian")
core.register_alias("default:obsidian", "vox_main:obsidian")
-- Marble
core.register_node("vox_main:marble", {
description = "Marble",
tiles = {"vox_marble.png"},
groups = {cracky = 2}
})
core.register_alias("marble", "vox_main:marble")
core.register_alias("default:marble", "vox_main:marble")
-- Chalk
core.register_node("vox_main:chalk", {
description = "Chalk",
tiles = {"vox_chalk.png"},
groups = {cracky = 2}
})
core.register_alias("chalk", "vox_main:chalk")
core.register_alias("default:chalk", "vox_main:chalk")
-- Limestone
core.register_node("vox_main:limestone", {
description = "Limestone",
tiles = {"vox_limestone.png"},
groups = {cracky = 2}
})
core.register_alias("limestone", "vox_main:limestone")
core.register_alias("default:limestone", "vox_main:limestone")

View file

@ -0,0 +1,13 @@
-- We'll register drops from mobs here, but what mobs drop elsewhere.
-- Fat
minetest.register_craftitem("vox_main:fat", {
description = "Fat",
inventory_image = "fat.png",
})
-- Leather
minetest.register_craftitem("vox_main:leather", {
description = "Leather",
inventory_image = "leather.png",
})

View file

@ -0,0 +1,3 @@
name = vox_main
description = Voxelis - Main : Core content
depends = vox_colors

View file

@ -0,0 +1,7 @@
core.register_node("vox_main:coral_red", {
description = "Red Coral",
tiles = {"vox_coral_red.png"},
groups = {crumbly = 1}
})
core.register_alias("coral_red", "vox_main:coral_red")

View file

@ -0,0 +1,153 @@
-- -------------------------------------------------------------------------- --
-- Ores --
-- -------------------------------------------------------------------------- --
-- Fuel: Coal, Uranium, Peat
core.register_node("vox_main:coal_ore", {
description = "Coal Ore",
tiles = {"vox_coal_ore.png"},
groups = {cracky = 2}
})
core.register_alias("coal_ore", "vox_main:coal_ore")
core.register_alias("default:stone_with_coal", "vox_main:coal_ore")
core.register_node("vox_main:uranium_ore", {
description = "Uranium Ore",
tiles = {"vox_uranium_ore.png"},
groups = {cracky = 2}
})
core.register_alias("uranium_ore", "vox_main:uranium_ore")
core.register_alias("default:stone_with_uranium", "vox_main:uranium_ore")
core.register_node("vox_main:peat", {
description = "Peat",
tiles = {"vox_peat.png"},
groups = {crumbly = 2, flammable = 1}
})
core.register_alias("peat", "vox_main:peat")
-- Bone
core.register_node("vox_main:bone_ore", {
description = "Bone Ore",
tiles = {"vox_bone_ore.png"},
groups = {cracky = 2}
})
core.register_alias("bone_ore", "vox_main:bone_ore")
core.register_alias("default:stone_with_bone", "vox_main:bone_ore")
-- Sulfur
core.register_node("vox_main:sulfur_ore", {
description = "Sulfur Ore",
tiles = {"vox_sulfur_ore.png"},
groups = {cracky = 2}
})
core.register_alias("sulfur_ore", "vox_main:sulfur_ore")
core.register_alias("default:stone_with_sulfur", "vox_main:sulfur_ore")
-- Salt
core.register_node("vox_main:salt_ore", {
description = "Salt Ore",
tiles = {"vox_salt_ore.png"},
groups = {crumbly = 2},
drop = "vox_mats:salt"
})
core.register_alias("salt_ore", "vox_main:salt_ore")
core.register_alias("default:stone_with_salt", "vox_main:salt_ore")
-- Metals: Copper, Tin, Iron, Gold, Silver, Platinum, Lead, Zinc, Nickel, Cobalt, Titanium, Tungsten
core.register_node("vox_main:copper_ore", {
description = "Copper Ore",
tiles = {"vox_copper_ore.png"},
groups = {cracky = 2}
})
core.register_alias("copper_ore", "vox_main:copper_ore")
core.register_alias("default:stone_with_copper", "vox_main:copper_ore")
core.register_node("vox_main:tin_ore", {
description = "Tin Ore",
tiles = {"vox_tin_ore.png"},
groups = {cracky = 2}
})
core.register_alias("tin_ore", "vox_main:tin_ore")
core.register_alias("default:stone_with_tin", "vox_main:tin_ore")
core.register_node("vox_main:iron_ore", {
description = "Iron Ore",
tiles = {"vox_iron_ore.png"},
groups = {cracky = 2}
})
core.register_alias("iron_ore", "vox_main:iron_ore")
core.register_alias("default:stone_with_iron", "vox_main:iron_ore")
core.register_node("vox_main:gold_ore", {
description = "Gold Ore",
tiles = {"vox_gold_ore.png"},
groups = {cracky = 2}
})
core.register_alias("gold_ore", "vox_main:gold_ore")
core.register_alias("default:stone_with_gold", "vox_main:gold_ore")
core.register_node("vox_main:silver_ore", {
description = "Silver Ore",
tiles = {"vox_silver_ore.png"},
groups = {cracky = 2}
})
core.register_alias("silver_ore", "vox_main:silver_ore")
core.register_alias("default:stone_with_silver", "vox_main:silver_ore")
core.register_node("vox_main:platinum_ore", {
description = "Platinum Ore",
tiles = {"vox_platinum_ore.png"},
groups = {cracky = 2}
})
core.register_alias("platinum_ore", "vox_main:platinum_ore")
core.register_alias("default:stone_with_platinum", "vox_main:platinum_ore")
core.register_node("vox_main:lead_ore", {
description = "Lead Ore",
tiles = {"vox_lead_ore.png"},
groups = {cracky = 2}
})
core.register_alias("lead_ore", "vox_main:lead_ore")
core.register_alias("default:stone_with_lead", "vox_main:lead_ore")
core.register_node("vox_main:zinc_ore", {
description = "Zinc Ore",
tiles = {"vox_zinc_ore.png"},
groups = {cracky = 2}
})
core.register_alias("zinc_ore", "vox_main:zinc_ore")
core.register_alias("default:stone_with_zinc", "vox_main:zinc_ore")
core.register_node("vox_main:nickel_ore", {
description = "Nickel Ore",
tiles = {"vox_nickel_ore.png"},
groups = {cracky = 2}
})
core.register_alias("nickel_ore", "vox_main:nickel_ore")
core.register_alias("default:stone_with_nickel", "vox_main:nickel_ore")
core.register_node("vox_main:cobalt_ore", {
description = "Cobalt Ore",
tiles = {"vox_cobalt_ore.png"},
groups = {cracky = 2}
})
core.register_alias("cobalt_ore", "vox_main:cobalt_ore")
core.register_alias("default:stone_with_cobalt", "vox_main:cobalt_ore")
core.register_node("vox_main:titanium_ore", {
description = "Titanium Ore",
tiles = {"vox_titanium_ore.png"},
groups = {cracky = 2}
})
core.register_alias("titanium_ore", "vox_main:titanium_ore")
core.register_alias("default:stone_with_titanium", "vox_main:titanium_ore")
core.register_node("vox_main:tungsten_ore", {
description = "Tungsten Ore",
tiles = {"vox_tungsten_ore.png"},
groups = {cracky = 2}
})
core.register_alias("tungsten_ore", "vox_main:tungsten_ore")
core.register_alias("default:stone_with_tungsten", "vox_main:tungsten_ore")

View file

@ -0,0 +1,10 @@
-- ------------------------------ Sky Island ------------------------- --
-- Cloud Block - Only pegasus can walk on it :)
-- Players may stand on it, but sink partway through. If multiple blocks are
-- stacked, you fall to the lowest block and still don't fall through.
core.register_node("vox_main:cloud", {
description = "Cloud",
tiles = {"vox_cloud.png"},
groups = {crumbly = 1}
})
core.register_alias("cloud", "vox_main:cloud")

View file

@ -0,0 +1,29 @@
-- ---------------------------- Dyeable Nodes -------------------------- --
-- List of dyeable things
local dyeable_craftitem = {"wool, carpet"}
-- ---------------------------- Basics -------------------------- --
-- "We've got wool and wool accessories.
-- String
minetest.register_craftitem("vox_main:string", {
description = "String",
inventory_image = "vox_main_string.png"
})
-- Wool
minetest.register_node("vox_main:wool", {
description = "Wool",
tiles = {"vox_textiles_wool.png"},
groups = {snappy=2, choppy=2, oddly_breakable_by_hand=3},
sounds = default.node_sound_defaults(),
})
-- Carpet
-- These are made from wool and can be dyed
minetest.register_node("vox_main:carpet", {
description = "Carpet",
tiles = {"vox_textiles_carpet.png"},
groups = {snappy=2, choppy=2, oddly_breakable_by_hand=3},
sounds = default.node_sound_defaults(),
})

View file

Before

Width:  |  Height:  |  Size: 216 B

After

Width:  |  Height:  |  Size: 216 B

View file

Before

Width:  |  Height:  |  Size: 132 B

After

Width:  |  Height:  |  Size: 619 B

View file

Before

Width:  |  Height:  |  Size: 149 B

After

Width:  |  Height:  |  Size: 149 B

View file

Before

Width:  |  Height:  |  Size: 590 B

After

Width:  |  Height:  |  Size: 590 B

View file

Before

Width:  |  Height:  |  Size: 119 B

After

Width:  |  Height:  |  Size: 119 B

View file

Before

Width:  |  Height:  |  Size: 123 B

After

Width:  |  Height:  |  Size: 123 B

View file

Before

Width:  |  Height:  |  Size: 590 B

After

Width:  |  Height:  |  Size: 590 B

View file

@ -1,14 +0,0 @@
---------------------------------------------------------------------------
-- Voxelis - Voxel survival sandbox for Luanti
-- Copyright (C) 2024 Mad Star Studio LLC
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 3 of the License, or
-- (at your option) any later version.
--
-- You should have received a copy of the GNU General Public License along
-- with this program; if not, see <http://www.gnu.org/licenses/>.
---------------------------------------------------------------------------
vox_materials = { }

View file

@ -1,2 +0,0 @@
name = vox_materials
description = Voxelis - materials: Adds materials to the game.

View file

@ -1,2 +0,0 @@
name = vox_mats
description = Voxelis - mats. in general maps that dont need to be categorized (yet)

View file

@ -1,15 +0,0 @@
-- Fat
minetest.register_craftitem("vox_mobdrops:fat", {
description = "Fat",
inventory_image = "fat.png",
})
-- Add fat drops from mobs
minetest.register_on_dieplayer(function(player)
local inventory = player:get_inventory()
if math.random(1, 5) == 1 then
inventory:add_item("main", "vox_mobdrops:fat")
end
end)
-- Leather

View file

@ -1,2 +0,0 @@
name = vox_mobdrops
description = Voxelis - mob drops

View file

@ -1,4 +1,5 @@
-- Vox Structural System
vox_structural = {} -- Initialize the global table for the mod
local structural_shapes = {}
@ -14,10 +15,16 @@ function vox_structural.register_block_with_shapes(modname, base_block, options)
local shape_node_name = modname .. ":" .. base_block .. "_" .. shape_name
-- Create the new node definition
local new_node_def = table.copy(minetest.registered_nodes[base_node_name])
new_node_def.description = new_node_def.description .. " (" .. shape_name:gsub("_", " ") .. ")"
new_node_def.tiles = shape_def.tiles or new_node_def.tiles
new_node_def.groups = table.copy(new_node_def.groups or {})
local base_def = minetest.registered_nodes[base_node_name]
if not base_def then
minetest.log("error", "[vox_structural] Base node not found: " .. base_node_name)
return
end
local new_node_def = table.copy(base_def)
new_node_def.description = base_def.description .. " (" .. shape_name:gsub("_", " ") .. ")"
new_node_def.tiles = shape_def.tiles or base_def.tiles
new_node_def.groups = table.copy(base_def.groups or {})
new_node_def.groups.shape = 1 -- Add a "shape" group
-- Apply shape-specific overrides
@ -75,13 +82,7 @@ vox_structural.register_shape("pressure_plate", {
},
})
-- Button
-- Post
-- ------------------
-- Register door shapes with variants
-- ---------------------------- Doors and Variants -------------------------- --
vox_structural.register_shape("door_flush", {
override = {
drawtype = "mesh",

View file

@ -1,2 +1,3 @@
name = vox_structural
description = Voxelis - structural. Adds dynamic structure pieces and assign textures to them.
description = Voxelis - structural. Adds dynamic structure pieces and assign textures to them.
depends = vox_colors

View file

@ -1,20 +0,0 @@
-- ---------------------------- Dyeable Nodes -------------------------- --
-- List of dyeable things
local dyeable_blocks = {"wool, carpet"}
-- Register base things their dyeable variants
for _, base_block in ipairs(dyeable_blocks) do
vox_coloring.register_dyeable("vox_worldblocks", base_block)
end
-- ---------------------------- Basics -------------------------- --
-- "We've got wool and wool accessories.
-- String
-- Wool
-- Carpet
-- These are made from wool or from fabric

View file

@ -1,905 +0,0 @@
---------------------------------------------------------------------------
-- Voxelis - Voxel survival sandbox for Luanti
-- Copyright (C) 2024 Mad Star Studio LLC
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 3 of the License, or
-- (at your option) any later version.
--
-- You should have received a copy of the GNU General Public License along
-- with this program; if not, see <http://www.gnu.org/licenses/>.
---------------------------------------------------------------------------
-- -------------------------------------------------------------------------- --
-- Blocks --
-- -------------------------------------------------------------------------- --
-- ----------------------------- Terrain Surface ---------------------------- --
-- Grass
core.register_node("vox_worldblocks:grass", {
description = "Grass Block",
tiles = {"vox_grass.png"},
groups = {cracky = 3}
})
core.register_alias("grass", "vox_worldblocks:grass")
core.register_alias("default:dirt_with_grass" , "vox_worldblocks:grass")
-- Dirt
core.register_node("vox_worldblocks:dirt", {
description = "Dirt",
tiles = {"vox_dirt.png"},
groups = {crumbly = 3}
})
core.register_alias("dirt", "vox_worldblocks:dirt")
core.register_alias("default:dirt", "vox_worldblocks:dirt")
-- Sand
-- (I don't like sand. It's coarse and rough and irritating and it gets everywhere.)
core.register_node("vox_worldblocks:sand", {
description = "Sand",
tiles = {"vox_sand.png"},
groups = {crumbly = 3}
})
core.register_alias("sand", "vox_worldblocks:sand")
core.register_alias("default:sand", "vox_worldblocks:sand")
-- Snow
core.register_node("vox_worldblocks:snow", {
description = "Snow",
tiles = {"vox_snow.png"},
groups = {crumbly = 3}
})
core.register_alias("snow", "vox_worldblocks:snow")
core.register_alias("default:snow", "vox_worldblocks:snow")
-- Packed Snow
core.register_node("vox_worldblocks:packed_snow", {
description = "Packed Snow",
tiles = {"vox_packed_snow.png"},
groups = {crumbly = 2}
})
core.register_alias("packed_snow", "vox_worldblocks:packed_snow")
-- Ice
core.register_node("vox_worldblocks:ice", {
description = "Ice",
tiles = {"vox_ice.png"},
groups = {crumbly = 3}
})
core.register_alias("ice", "vox_worldblocks:ice")
core.register_alias("default:ice", "vox_worldblocks:ice")
-- Sulfur Crust
core.register_node("vox_worldblocks:sulfur_crust", {
description = "Sulfur Crust",
tiles = {"vox_sulfur_crust.png"},
groups = {crumbly = 3}
})
core.register_alias("sulfur_crust", "vox_worldblocks:sulfur_crust")
-- ---------------------------- Terrain Subsurface --------------------------- --
-- Bedrock
core.register_node("vox_worldblocks:bedrock", {
description = "Bedrock",
tiles = {"vox_bedrock.png"},
groups = {cracky = 1}
})
core.register_alias("bedrock", "vox_worldblocks:bedrock")
core.register_alias("default:bedrock", "vox_worldblocks:bedrock")
-- Ash
minetest.register_node("vox_worldblocks:ash_block", {
description = "Ash Block",
tiles = {"vox_ash_block.png"},
groups = {crumbly = 3},
drop = "vox_mats:ash", -- Drops ash when broken
})
-- Gravel
core.register_node("vox_worldblocks:gravel", {
description = "Gravel",
tiles = {"vox_gravel.png"},
groups = {crumbly = 2}
})
core.register_alias("gravel", "vox_worldblocks:gravel")
core.register_alias("default:gravel", "vox_worldblocks:gravel")
-- Stone
core.register_node("vox_worldblocks:stone", {
description = "Stone",
tiles = {"vox_stone.png"},
groups = {cracky = 2}
})
core.register_alias("stone", "vox_worldblocks:stone")
core.register_alias("mapgen_stone", "vox_worldblocks:stone")
-- core.register_alias("default:stone", "vox_worldblocks:stone")
-- Cobblestone
core.register_node("vox_worldblocks:cobblestone", {
description = "Cobblestone",
tiles = {"vox_cobblestone.png"},
groups = {cracky = 2}
})
core.register_alias("cobblestone", "vox_worldblocks:cobblestone")
core.register_alias("default:cobble", "vox_worldblocks:cobblestone")
-- Sandstone
core.register_node("vox_worldblocks:sandstone", {
description = "Sandstone",
tiles = {"vox_sandstone.png"},
groups = {cracky = 2}
})
core.register_alias("sandstone", "vox_worldblocks:sandstone")
core.register_alias("default:sandstone", "vox_worldblocks:sandstone")
-- Clay
core.register_node("vox_worldblocks:clay", {
description = "Clay",
tiles = {"vox_clay.png"},
groups = {crumbly = 3}
})
core.register_alias("clay", "vox_worldblocks:clay")
core.register_alias("default:clay", "vox_worldblocks:clay")
-- Hardened Clay
core.register_node("vox_worldblocks:hardened_clay", {
description = "Hardened Clay",
tiles = {"vox_hardened_clay.png"},
groups = {cracky = 2}
})
core.register_alias("hardened_clay", "vox_worldblocks:hardened_clay")
core.register_alias("default:hardened_clay", "vox_worldblocks:hardened_clay")
-- Mud
core.register_node("vox_worldblocks:mud", {
description = "Mud",
tiles = {"vox_mud.png"},
groups = {crumbly = 3}
})
core.register_alias("mud", "vox_worldblocks:mud")
-- Granite
core.register_node("vox_worldblocks:granite", {
description = "Granite",
tiles = {"vox_granite.png"},
groups = {cracky = 2}
})
core.register_alias("granite", "vox_worldblocks:granite")
core.register_alias("default:granite", "vox_worldblocks:granite")
-- Diorite
core.register_node("vox_worldblocks:diorite", {
description = "Diorite",
tiles = {"vox_diorite.png"},
groups = {cracky = 2}
})
core.register_alias("diorite", "vox_worldblocks:diorite")
core.register_alias("default:diorite", "vox_worldblocks:diorite")
-- Andesite
core.register_node("vox_worldblocks:andesite", {
description = "Andesite",
tiles = {"vox_andesite.png"},
groups = {cracky = 2}
})
core.register_alias("andesite", "vox_worldblocks:andesite")
core.register_alias("default:andesite", "vox_worldblocks:andesite")
-- Basalt
core.register_node("vox_worldblocks:basalt", {
description = "Basalt",
tiles = {"vox_basalt.png"},
groups = {cracky = 2}
})
core.register_alias("basalt", "vox_worldblocks:basalt")
core.register_alias("default:basalt", "vox_worldblocks:basalt")
-- Obsidian
core.register_node("vox_worldblocks:obsidian", {
description = "Obsidian",
tiles = {"vox_obsidian.png"},
groups = {cracky = 2}
})
core.register_alias("obsidian", "vox_worldblocks:obsidian")
core.register_alias("default:obsidian", "vox_worldblocks:obsidian")
-- Marble
core.register_node("vox_worldblocks:marble", {
description = "Marble",
tiles = {"vox_marble.png"},
groups = {cracky = 2}
})
core.register_alias("marble", "vox_worldblocks:marble")
core.register_alias("default:marble", "vox_worldblocks:marble")
-- Chalk
core.register_node("vox_worldblocks:chalk", {
description = "Chalk",
tiles = {"vox_chalk.png"},
groups = {cracky = 2}
})
core.register_alias("chalk", "vox_worldblocks:chalk")
core.register_alias("default:chalk", "vox_worldblocks:chalk")
-- Limestone
core.register_node("vox_worldblocks:limestone", {
description = "Limestone",
tiles = {"vox_limestone.png"},
groups = {cracky = 2}
})
core.register_alias("limestone", "vox_worldblocks:limestone")
core.register_alias("default:limestone", "vox_worldblocks:limestone")
-- Glowing Moss
core.register_node("vox_worldblocks:glowing_moss", {
description = "Glowing Moss",
tiles = {"vox_glowing_moss.png"},
light_source = 8,
groups = {crumbly = 1}
})
core.register_alias("glowing_moss", "vox_worldblocks:glowing_moss")
core.register_node("vox_worldblocks:salt_crystal", {
description = "Salt Crystal",
tiles = {"vox_salt_crystal.png"},
groups = {cracky = 2}
})
core.register_alias("salt_crystal", "vox_worldblocks:salt_crystal")
core.register_node("vox_worldblocks:volcanic_rock", {
description = "Volcanic Rock",
tiles = {"vox_volcanic_rock.png"},
groups = {cracky = 3}
})
core.register_alias("volcanic_rock", "vox_worldblocks:volcanic_rock")
core.register_node("vox_worldblocks:hot_spring_stone", {
description = "Hot Spring Stone",
tiles = {"vox_hot_spring_stone.png"},
groups = {cracky = 2}
})
core.register_alias("hot_spring_stone", "vox_worldblocks:hot_spring_stone")
-- ------------------------------ Ocean ------------------------- --
--
core.register_node("vox_worldblocks:coral_red", {
description = "Red Coral",
tiles = {"vox_coral_red.png"},
groups = {crumbly = 1}
})
core.register_alias("coral_red", "vox_worldblocks:coral_red")
-- ------------------------------ Sky Island ------------------------- --
-- Cloud Block - Only pegasus can walk on it :)
-- Players may stand on it, but sink partway through. If multiple blocks are
-- stacked, you fall to the lowest block and still don't fall through.
core.register_node("vox_worldblocks:cloud", {
description = "Cloud",
tiles = {"vox_cloud.png"},
groups = {crumbly = 1}
})
core.register_alias("cloud", "vox_worldblocks:cloud")
-- -------------------------------------------------------------------------- --
-- Liquids --
-- -------------------------------------------------------------------------- --
-- Water
core.register_node("vox_worldblocks:water_source", {
description = "Water Source",
drawtype = "liquid",
tiles = {
{
name = "vox_water.png",
animation = {
type = "vertical_frames",
aspect_w = 16,
aspect_h = 16,
length = 2.0
}
}
},
alpha = 128,
paramtype = "light",
walkable = false,
pointable = false,
diggable = false,
buildable_to = true,
liquidtype = "source",
liquid_alternative_flowing = "vox_worldblocks:water_flowing",
liquid_alternative_source = "vox_worldblocks:water_source",
liquid_viscosity = 1,
post_effect_color = {a = 103, r = 30, g = 60, b = 90}
})
core.register_alias("water_source", "vox_worldblocks:water_source")
core.register_alias("default:river_water", "vox_worldblocks:water_source")
core.register_alias("mapgen_water_source", "vox_worldblocks:water_source")
core.register_node("vox_worldblocks:water_flowing", {
description = "Flowing Water",
drawtype = "flowingliquid",
tiles = {"vox_water.png"},
special_tiles = {
{
name = "vox_water.png",
backface_culling = false,
animation = {
type = "vertical_frames",
aspect_w = 16,
aspect_h = 16,
length = 0.8
}
}
},
alpha = 160,
paramtype = "light",
walkable = false,
pointable = false,
diggable = false,
buildable_to = true,
liquidtype = "flowing",
liquid_alternative_flowing = "vox_worldblocks:water_flowing",
liquid_alternative_source = "vox_worldblocks:water_source",
liquid_viscosity = 1,
post_effect_color = {a = 103, r = 30, g = 60, b = 90}
})
core.register_alias("water_flowing", "vox_worldblocks:water_flowing")
core.register_alias("default:river_water_flowing", "vox_worldblocks:water_flowing")
core.register_alias("mapgen_water_flowing", "vox_worldblocks:water_flowing")
-- Hotspring Water
core.register_node("vox_worldblocks:hotspring_water_source", {
description = "Hotspring Water Source",
drawtype = "liquid",
tiles = {
{
name = "vox_hotspring_water.png",
animation = {
type = "vertical_frames",
aspect_w = 16,
aspect_h = 16,
length = 2.0
}
}
},
alpha = 128,
paramtype = "light",
walkable = false,
pointable = false,
diggable = false,
buildable_to = true,
liquidtype = "source",
liquid_alternative_flowing = "vox_worldblocks:hotspring_water_flowing",
liquid_alternative_source = "vox_worldblocks:hotspring_water_source",
liquid_viscosity = 1,
post_effect_color = {a = 103, r = 30, g = 60, b = 90}
})
core.register_alias("hotspring_water_source", "vox_worldblocks:hotspring_water_source")
core.register_alias("mapgen_hotspring_water_source", "vox_worldblocks:hotspring_water_source")
core.register_node("vox_worldblocks:hotspring_water_flowing", {
description = "Flowing Hotspring Water",
drawtype = "flowingliquid",
tiles = {"vox_hotspring_water.png"},
special_tiles = {
{
name = "vox_hotspring_water.png",
backface_culling = false,
animation = {
type = "vertical_frames",
aspect_w = 16,
aspect_h = 16,
length = 0.8
}
}
},
alpha = 160,
paramtype = "light",
walkable = false,
pointable = false,
diggable = false,
buildable_to = true,
liquidtype = "flowing",
liquid_alternative_flowing = "vox_worldblocks:hotspring_water_flowing",
liquid_alternative_source = "vox_worldblocks:hotspring_water_source",
liquid_viscosity = 1,
post_effect_color = {a = 103, r = 30, g = 60, b = 90}
})
core.register_alias("hotspring_water_flowing", "vox_worldblocks:hotspring_water_flowing")
core.register_alias("mapgen_hotspring_water_flowing", "vox_worldblocks:hotspring_water_flowing")
-- Lava
core.register_node("vox_worldblocks:lava_source", {
description = "Lava Source",
drawtype = "liquid",
tiles = {
{
name = "vox_lava.png",
animation = {
type = "vertical_frames",
aspect_w = 16,
aspect_h = 16,
length = 2.0
}
}
},
alpha = 255,
paramtype = "light",
walkable = false,
pointable = false,
diggable = false,
buildable_to = true,
liquidtype = "source",
liquid_alternative_flowing = "vox_worldblocks:lava_flowing",
liquid_alternative_source = "vox_worldblocks:lava_source",
liquid_viscosity = 7,
post_effect_color = {a = 255, r = 255, g = 0, b = 0}
})
core.register_alias("lava_source", "vox_worldblocks:lava_source")
core.register_alias("default:lava_source", "vox_worldblocks:lava_source")
core.register_alias("mapgen_lava_source", "vox_worldblocks:lava_source")
core.register_node("vox_worldblocks:lava_flowing", {
description = "Flowing Lava",
drawtype = "flowingliquid",
tiles = {"vox_lava.png"},
special_tiles = {
{
name = "vox_lava.png",
backface_culling = false,
animation = {
type = "vertical_frames",
aspect_w = 16,
aspect_h = 16,
length = 2.0
}
}
},
alpha = 255,
paramtype = "light",
walkable = false,
pointable = false,
diggable = false,
buildable_to = true,
liquidtype = "flowing",
liquid_alternative_flowing = "vox_worldblocks:lava_flowing",
liquid_alternative_source = "vox_worldblocks:lava_source",
liquid_viscosity = 7,
post_effect_color = {a = 255, r = 255, g = 0, b = 0}
})
core.register_alias("lava_flowing", "vox_worldblocks:lava_flowing")
core.register_alias("default:lava_flowing", "vox_worldblocks:lava_flowing")
core.register_alias("mapgen_lava_flowing", "vox_worldblocks:lava_flowing")
-- -------------------------------------------------------------------------- --
-- Ores --
-- -------------------------------------------------------------------------- --
-- Fuel: Coal, Uranium, Peat
core.register_node("vox_worldblocks:coal_ore", {
description = "Coal Ore",
tiles = {"vox_coal_ore.png"},
groups = {cracky = 2}
})
core.register_alias("coal_ore", "vox_worldblocks:coal_ore")
core.register_alias("default:stone_with_coal", "vox_worldblocks:coal_ore")
core.register_node("vox_worldblocks:uranium_ore", {
description = "Uranium Ore",
tiles = {"vox_uranium_ore.png"},
groups = {cracky = 2}
})
core.register_alias("uranium_ore", "vox_worldblocks:uranium_ore")
core.register_alias("default:stone_with_uranium", "vox_worldblocks:uranium_ore")
core.register_node("vox_worldblocks:peat", {
description = "Peat",
tiles = {"vox_peat.png"},
groups = {crumbly = 2, flammable = 1}
})
core.register_alias("peat", "vox_worldblocks:peat")
-- Bone
core.register_node("vox_worldblocks:bone_ore", {
description = "Bone Ore",
tiles = {"vox_bone_ore.png"},
groups = {cracky = 2}
})
core.register_alias("bone_ore", "vox_worldblocks:bone_ore")
core.register_alias("default:stone_with_bone", "vox_worldblocks:bone_ore")
-- Sulfur
core.register_node("vox_worldblocks:sulfur_ore", {
description = "Sulfur Ore",
tiles = {"vox_sulfur_ore.png"},
groups = {cracky = 2}
})
core.register_alias("sulfur_ore", "vox_worldblocks:sulfur_ore")
core.register_alias("default:stone_with_sulfur", "vox_worldblocks:sulfur_ore")
-- Salt
core.register_node("vox_worldblocks:salt_ore", {
description = "Salt Ore",
tiles = {"vox_salt_ore.png"},
groups = {crumbly = 2},
drop = "vox_mats:salt"
})
core.register_alias("salt_ore", "vox_worldblocks:salt_ore")
core.register_alias("default:stone_with_salt", "vox_worldblocks:salt_ore")
-- Metals: Copper, Tin, Iron, Gold, Silver, Platinum, Lead, Zinc, Nickel, Cobalt, Titanium, Tungsten
core.register_node("vox_worldblocks:copper_ore", {
description = "Copper Ore",
tiles = {"vox_copper_ore.png"},
groups = {cracky = 2}
})
core.register_alias("copper_ore", "vox_worldblocks:copper_ore")
core.register_alias("default:stone_with_copper", "vox_worldblocks:copper_ore")
core.register_node("vox_worldblocks:tin_ore", {
description = "Tin Ore",
tiles = {"vox_tin_ore.png"},
groups = {cracky = 2}
})
core.register_alias("tin_ore", "vox_worldblocks:tin_ore")
core.register_alias("default:stone_with_tin", "vox_worldblocks:tin_ore")
core.register_node("vox_worldblocks:iron_ore", {
description = "Iron Ore",
tiles = {"vox_iron_ore.png"},
groups = {cracky = 2}
})
core.register_alias("iron_ore", "vox_worldblocks:iron_ore")
core.register_alias("default:stone_with_iron", "vox_worldblocks:iron_ore")
core.register_node("vox_worldblocks:gold_ore", {
description = "Gold Ore",
tiles = {"vox_gold_ore.png"},
groups = {cracky = 2}
})
core.register_alias("gold_ore", "vox_worldblocks:gold_ore")
core.register_alias("default:stone_with_gold", "vox_worldblocks:gold_ore")
core.register_node("vox_worldblocks:silver_ore", {
description = "Silver Ore",
tiles = {"vox_silver_ore.png"},
groups = {cracky = 2}
})
core.register_alias("silver_ore", "vox_worldblocks:silver_ore")
core.register_alias("default:stone_with_silver", "vox_worldblocks:silver_ore")
core.register_node("vox_worldblocks:platinum_ore", {
description = "Platinum Ore",
tiles = {"vox_platinum_ore.png"},
groups = {cracky = 2}
})
core.register_alias("platinum_ore", "vox_worldblocks:platinum_ore")
core.register_alias("default:stone_with_platinum", "vox_worldblocks:platinum_ore")
core.register_node("vox_worldblocks:lead_ore", {
description = "Lead Ore",
tiles = {"vox_lead_ore.png"},
groups = {cracky = 2}
})
core.register_alias("lead_ore", "vox_worldblocks:lead_ore")
core.register_alias("default:stone_with_lead", "vox_worldblocks:lead_ore")
core.register_node("vox_worldblocks:zinc_ore", {
description = "Zinc Ore",
tiles = {"vox_zinc_ore.png"},
groups = {cracky = 2}
})
core.register_alias("zinc_ore", "vox_worldblocks:zinc_ore")
core.register_alias("default:stone_with_zinc", "vox_worldblocks:zinc_ore")
core.register_node("vox_worldblocks:nickel_ore", {
description = "Nickel Ore",
tiles = {"vox_nickel_ore.png"},
groups = {cracky = 2}
})
core.register_alias("nickel_ore", "vox_worldblocks:nickel_ore")
core.register_alias("default:stone_with_nickel", "vox_worldblocks:nickel_ore")
core.register_node("vox_worldblocks:cobalt_ore", {
description = "Cobalt Ore",
tiles = {"vox_cobalt_ore.png"},
groups = {cracky = 2}
})
core.register_alias("cobalt_ore", "vox_worldblocks:cobalt_ore")
core.register_alias("default:stone_with_cobalt", "vox_worldblocks:cobalt_ore")
core.register_node("vox_worldblocks:titanium_ore", {
description = "Titanium Ore",
tiles = {"vox_titanium_ore.png"},
groups = {cracky = 2}
})
core.register_alias("titanium_ore", "vox_worldblocks:titanium_ore")
core.register_alias("default:stone_with_titanium", "vox_worldblocks:titanium_ore")
core.register_node("vox_worldblocks:tungsten_ore", {
description = "Tungsten Ore",
tiles = {"vox_tungsten_ore.png"},
groups = {cracky = 2}
})
core.register_alias("tungsten_ore", "vox_worldblocks:tungsten_ore")
core.register_alias("default:stone_with_tungsten", "vox_worldblocks:tungsten_ore")
-- Gems: Diamond, Emerald, Ruby, Sapphire, Topaz, Amethyst, Opal, Onyx, Garnet, Peridot, Aquamarine, Citrine, Tourmaline, Zircon, Tanzanite, Spinel, Lapis Lazuli, Malachite, Azurite, Turquoise, Amber, Moonstone, Sunstone, Bloodstone, Agate, Jasper, Chalcedony, Chrysoprase, Carnelian, Sardonyx, Heliotrope, Alexandrite, Tiger's Eye, Serpentine, Rhodonite
core.register_node("vox_worldblocks:diamond_ore", {
description = "Diamond Ore",
tiles = {"vox_diamond_ore.png"},
groups = {cracky = 2}
})
core.register_alias("diamond_ore", "vox_worldblocks:diamond_ore")
core.register_alias("default:stone_with_diamond", "vox_worldblocks:diamond_ore")
core.register_node("vox_worldblocks:emerald_ore", {
description = "Emerald Ore",
tiles = {"vox_emerald_ore.png"},
groups = {cracky = 2}
})
core.register_alias("emerald_ore", "vox_worldblocks:emerald_ore")
core.register_alias("default:stone_with_emerald", "vox_worldblocks:emerald_ore")
core.register_node("vox_worldblocks:ruby_ore", {
description = "Ruby Ore",
tiles = {"vox_ruby_ore.png"},
groups = {cracky = 2}
})
core.register_alias("ruby_ore", "vox_worldblocks:ruby_ore")
core.register_alias("default:stone_with_ruby", "vox_worldblocks:ruby_ore")
core.register_node("vox_worldblocks:sapphire_ore", {
description = "Sapphire Ore",
tiles = {"vox_sapphire_ore.png"},
groups = {cracky = 2}
})
core.register_alias("sapphire_ore", "vox_worldblocks:sapphire_ore")
core.register_alias("default:stone_with_sapphire", "vox_worldblocks:sapphire_ore")
core.register_node("vox_worldblocks:topaz_ore", {
description = "Topaz Ore",
tiles = {"vox_topaz_ore.png"},
groups = {cracky = 2}
})
core.register_alias("topaz_ore", "vox_worldblocks:topaz_ore")
core.register_alias("default:stone_with_topaz", "vox_worldblocks:topaz_ore")
core.register_node("vox_worldblocks:amethyst_ore", {
description = "Amethyst Ore",
tiles = {"vox_amethyst_ore.png"},
groups = {cracky = 2}
})
core.register_alias("amethyst_ore", "vox_worldblocks:amethyst_ore")
core.register_alias("default:stone_with_amethyst", "vox_worldblocks:amethyst_ore")
core.register_node("vox_worldblocks:opal_ore", {
description = "Opal Ore",
tiles = {"vox_opal_ore.png"},
groups = {cracky = 2}
})
core.register_alias("opal_ore", "vox_worldblocks:opal_ore")
core.register_alias("default:stone_with_opal", "vox_worldblocks:opal_ore")
core.register_node("vox_worldblocks:onyx_ore", {
description = "Onyx Ore",
tiles = {"vox_onyx_ore.png"},
groups = {cracky = 2}
})
core.register_alias("onyx_ore", "vox_worldblocks:onyx_ore")
core.register_alias("default:stone_with_onyx", "vox_worldblocks:onyx_ore")
core.register_node("vox_worldblocks:garnet_ore", {
description = "Garnet Ore",
tiles = {"vox_garnet_ore.png"},
groups = {cracky = 2}
})
core.register_alias("garnet_ore", "vox_worldblocks:garnet_ore")
core.register_alias("default:stone_with_garnet", "vox_worldblocks:garnet_ore")
core.register_node("vox_worldblocks:peridot_ore", {
description = "Peridot Ore",
tiles = {"vox_peridot_ore.png"},
groups = {cracky = 2}
})
core.register_alias("peridot_ore", "vox_worldblocks:peridot_ore")
core.register_alias("default:stone_with_peridot", "vox_worldblocks:peridot_ore")
core.register_node("vox_worldblocks:aquamarine_ore", {
description = "Aquamarine Ore",
tiles = {"vox_aquamarine_ore.png"},
groups = {cracky = 2}
})
core.register_alias("aquamarine_ore", "vox_worldblocks:aquamarine_ore")
core.register_alias("default:stone_with_aquamarine", "vox_worldblocks:aquamarine_ore")
core.register_node("vox_worldblocks:citrine_ore", {
description = "Citrine Ore",
tiles = {"vox_citrine_ore.png"},
groups = {cracky = 2}
})
core.register_alias("citrine_ore", "vox_worldblocks:citrine_ore")
core.register_alias("default:stone_with_citrine", "vox_worldblocks:citrine_ore")
core.register_node("vox_worldblocks:tourmaline_ore", {
description = "Tourmaline Ore",
tiles = {"vox_tourmaline_ore.png"},
groups = {cracky = 2}
})
core.register_alias("tourmaline_ore", "vox_worldblocks:tourmaline_ore")
core.register_alias("default:stone_with_tourmaline", "vox_worldblocks:tourmaline_ore")
core.register_node("vox_worldblocks:zircon_ore", {
description = "Zircon Ore",
tiles = {"vox_zircon_ore.png"},
groups = {cracky = 2}
})
core.register_alias("zircon_ore", "vox_worldblocks:zircon_ore")
core.register_alias("default:stone_with_zircon", "vox_worldblocks:zircon_ore")
core.register_node("vox_worldblocks:tanzanite_ore", {
description = "Tanzanite Ore",
tiles = {"vox_tanzanite_ore.png"},
groups = {cracky = 2}
})
core.register_alias("tanzanite_ore", "vox_worldblocks:tanzanite_ore")
core.register_alias("default:stone_with_tanzanite", "vox_worldblocks:tanzanite_ore")
core.register_node("vox_worldblocks:spinel_ore", {
description = "Spinel Ore",
tiles = {"vox_spinel_ore.png"},
groups = {cracky = 2}
})
core.register_alias("spinel_ore", "vox_worldblocks:spinel_ore")
core.register_alias("default:stone_with_spinel", "vox_worldblocks:spinel_ore")
core.register_node("vox_worldblocks:lapis_lazuli_ore", {
description = "Lapis Lazuli Ore",
tiles = {"vox_lapis_lazuli_ore.png"},
groups = {cracky = 2}
})
core.register_alias("lapis_lazuli_ore", "vox_worldblocks:lapis_lazuli_ore")
core.register_alias("default:stone_with_lapis_lazuli", "vox_worldblocks:lapis_lazuli_ore")
core.register_node("vox_worldblocks:malachite_ore", {
description = "Malachite Ore",
tiles = {"vox_malachite_ore.png"},
groups = {cracky = 2}
})
core.register_alias("malachite_ore", "vox_worldblocks:malachite_ore")
core.register_alias("default:stone_with_malachite", "vox_worldblocks:malachite_ore")
core.register_node("vox_worldblocks:azurite_ore", {
description = "Azurite Ore",
tiles = {"vox_azurite_ore.png"},
groups = {cracky = 2}
})
core.register_alias("azurite_ore", "vox_worldblocks:azurite_ore")
core.register_alias("default:stone_with_azurite", "vox_worldblocks:azurite_ore")
core.register_node("vox_worldblocks:turquoise_ore", {
description = "Turquoise Ore",
tiles = {"vox_turquoise_ore.png"},
groups = {cracky = 2}
})
core.register_alias("turquoise_ore", "vox_worldblocks:turquoise_ore")
core.register_alias("default:stone_with_turquoise", "vox_worldblocks:turquoise_ore")
core.register_node("vox_worldblocks:amber_ore", {
description = "Amber Ore",
tiles = {"vox_amber_ore.png"},
groups = {cracky = 2}
})
core.register_alias("amber_ore", "vox_worldblocks:amber_ore")
core.register_alias("default:stone_with_amber", "vox_worldblocks:amber_ore")
core.register_node("vox_worldblocks:moonstone_ore", {
description = "Moonstone Ore",
tiles = {"vox_moonstone_ore.png"},
groups = {cracky = 2}
})
core.register_alias("moonstone_ore", "vox_worldblocks:moonstone_ore")
core.register_alias("default:stone_with_moonstone", "vox_worldblocks:moonstone_ore")
core.register_node("vox_worldblocks:sunstone_ore", {
description = "Sunstone Ore",
tiles = {"vox_sunstone_ore.png"},
groups = {cracky = 2}
})
core.register_alias("sunstone_ore", "vox_worldblocks:sunstone_ore")
core.register_alias("default:stone_with_sunstone", "vox_worldblocks:sunstone_ore")
core.register_node("vox_worldblocks:bloodstone_ore", {
description = "Bloodstone Ore",
tiles = {"vox_bloodstone_ore.png"},
groups = {cracky = 2}
})
core.register_alias("bloodstone_ore", "vox_worldblocks:bloodstone_ore")
core.register_alias("default:stone_with_bloodstone", "vox_worldblocks:bloodstone_ore")
core.register_node("vox_worldblocks:agate_ore", {
description = "Agate Ore",
tiles = {"vox_agate_ore.png"},
groups = {cracky = 2}
})
core.register_alias("agate_ore", "vox_worldblocks:agate_ore")
core.register_alias("default:stone_with_agate", "vox_worldblocks:agate_ore")
core.register_node("vox_worldblocks:jasper_ore", {
description = "Jasper Ore",
tiles = {"vox_jasper_ore.png"},
groups = {cracky = 2}
})
core.register_alias("jasper_ore", "vox_worldblocks:jasper_ore")
core.register_alias("default:stone_with_jasper", "vox_worldblocks:jasper_ore")
core.register_node("vox_worldblocks:chalcedony_ore", {
description = "Chalcedony Ore",
tiles = {"vox_chalcedony_ore.png"},
groups = {cracky = 2}
})
core.register_alias("chalcedony_ore", "vox_worldblocks:chalcedony_ore")
core.register_alias("default:stone_with_chalcedony", "vox_worldblocks:chalcedony_ore")
core.register_node("vox_worldblocks:chrysoprase_ore", {
description = "Chrysoprase Ore",
tiles = {"vox_chrysoprase_ore.png"},
groups = {cracky = 2}
})
core.register_alias("chrysoprase_ore", "vox_worldblocks:chrysoprase_ore")
core.register_alias("default:stone_with_chrysoprase", "vox_worldblocks:chrysoprase_ore")
core.register_node("vox_worldblocks:carnelian_ore", {
description = "Carnelian Ore",
tiles = {"vox_carnelian_ore.png"},
groups = {cracky = 2}
})
core.register_alias("carnelian_ore", "vox_worldblocks:carnelian_ore")
core.register_alias("default:stone_with_carnelian", "vox_worldblocks:carnelian_ore")
-- ---------------------------- Blocks with Multiple Colors -------------------------- --
-- Register colored (fill in the blank) dynamically
for color_name, color_hex in pairs(vox_colors) do
-- Skip any non-color functions or keys
if type(color_hex) == "string" and vox_colors.validate(color_hex) then
-- Register Colored Stone variant
core.register_node("vox_worldblocks:stone_" .. color_name:lower(), {
description = color_name .. " Stone",
tiles = {"vox_stone_colorize.png^[multiply:" .. color_hex},
groups = {cracky = 2},
})
core.register_alias("stone_" .. color_name:lower(), "vox_worldblocks:stone_" .. color_name:lower())
-- Register Terracotta variant
core.register_node("vox_worldblocks:terracotta_" .. color_name:lower(), {
description = color_name .. " Terracotta",
tiles = {"vox_terracotta_colorize.png^[multiply:" .. color_hex},
groups = {cracky = 2},
})
core.register_alias("terracotta_" .. color_name:lower(), "vox_worldblocks:terracotta_" .. color_name:lower())
end
end
-- ---------------------------- Dyeable Nodes -------------------------- --
-- List of dyeable things
local dyeable_blocks = {"sand", "terracotta", "marble", "cobblestone", "sandstone"}
-- Debug: Check if dyeable_blocks is defined correctly
assert(type(dyeable_blocks) == "table", "[vox_worldblocks] 'dyeable_blocks' must be a table!")
-- Register base things and their dyeable variants
for _, base_block in pairs(dyeable_blocks) do
if type(base_block) == "string" then
vox_coloring.register_dyeable("vox_worldblocks", base_block)
else
minetest.log("error", "[vox_worldblocks] Invalid block name in dyeable_blocks: " .. tostring(base_block))
end
end

View file

@ -1,2 +0,0 @@
name = vox_worldblocks
description = Voxelis - worldblocks: General Overworld blocks

View file

@ -1,155 +0,0 @@
---------------------------------------------------------------------------
-- Voxelis - Voxel survival sandbox for Luanti
-- Copyright (C) 2024 Mad Star Studio LLC
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 3 of the License, or
-- (at your option) any later version.
--
-- You should have received a copy of the GNU General Public License along
-- with this program; if not, see <http://www.gnu.org/licenses/>.
---------------------------------------------------------------------------
vox_mapgen_core = {}
-- -------------------------------------------------------------- --
-- Configuration: Noise Parameters
-- -------------------------------------------------------------- --
local noise_heat = {
offset = 50,
scale = 50,
spread = {x = 1000, y = 1000, z = 1000},
seed = 1234,
octaves = 3,
persistence = 0.5,
lacunarity = 2.0,
}
local noise_humidity = {
offset = 50,
scale = 50,
spread = {x = 1000, y = 1000, z = 1000},
seed = 5678,
octaves = 3,
persistence = 0.5,
lacunarity = 2.0,
}
local noise_altitude = {
offset = 50,
scale = 50,
spread = {x = 1000, y = 1000, z = 1000},
seed = 91011,
octaves = 3,
persistence = 0.5,
lacunarity = 2.0,
}
local biome_size_noise = {
offset = 0,
scale = 10,
spread = {x = 2000, y = 2000, z = 2000},
seed = 78910,
octaves = 2,
persistence = 0.4,
lacunarity = 2.0,
}
-- Apply noise parameters to the map generator
minetest.register_on_mapgen_init(function(mapgen_params)
minetest.set_mapgen_setting_noiseparams("heat", noise_heat, true)
minetest.set_mapgen_setting_noiseparams("humidity", noise_humidity, true)
minetest.set_mapgen_setting_noiseparams("altitude", noise_altitude, true)
end)
-- -------------------------------------------------------------- --
-- Biome Assignment Logic
-- -------------------------------------------------------------- --
local function get_biome(heat, humidity, altitude)
if heat > 70 and humidity < 30 then
return "desert"
elseif heat > 70 and humidity > 50 then
if altitude > 100 then
return "volcanic_fields"
end
return "savannah"
elseif heat > 50 and humidity > 70 then
return "tropical_rainforest"
elseif heat < 30 and humidity > 60 then
return "boreal_forest"
elseif heat < 10 and humidity > 40 then
return "frozen_tundra"
elseif altitude > 256 then
return "jade_cliffs"
else
return "grassland" -- Default biome
end
end
local function blend_biomes(current_biome, neighbor_biome, distance)
if distance < 10 and math.random() < 0.5 then
return neighbor_biome
end
return current_biome
end
-- -------------------------------------------------------------- --
-- Map Generation Logic
-- -------------------------------------------------------------- --
minetest.register_on_generated(function(minp, maxp, seed)
local vm, emin, emax = minetest.get_mapgen_object("voxelmanip")
local area = VoxelArea:new{MinEdge = emin, MaxEdge = emax}
local data = vm:get_data()
-- Generate noise maps
local heat_map = minetest.get_perlin_map(noise_heat, {x = maxp.x - minp.x + 1, y = maxp.z - minp.z + 1})
local humidity_map = minetest.get_perlin_map(noise_humidity, {x = maxp.x - minp.x + 1, y = maxp.z - minp.z + 1})
local altitude_map = minetest.get_perlin_map(noise_altitude, {x = maxp.x - minp.x + 1, y = maxp.z - minp.z + 1})
local biome_size_map = minetest.get_perlin_map(biome_size_noise, {x = maxp.x - minp.x + 1, y = maxp.z - minp.z + 1})
local heat = heat_map:get_2d_map_flat({x = minp.x, y = minp.z})
local humidity = humidity_map:get_2d_map_flat({x = minp.x, y = minp.z})
local altitude = altitude_map:get_2d_map_flat({x = minp.x, y = minp.z})
local biome_sizes = biome_size_map:get_2d_map_flat({x = minp.x, y = minp.z})
for z = minp.z, maxp.z do
for x = minp.x, maxp.x do
local index2d = (z - minp.z) * (maxp.x - minp.x + 1) + (x - minp.x + 1)
local h = heat[index2d]
local hum = humidity[index2d]
local alt = altitude[index2d]
local biome_size = biome_sizes[index2d]
local current_biome = get_biome(h, hum, alt)
local neighbor_biome = get_biome(h + 5, hum + 5, alt)
current_biome = blend_biomes(current_biome, neighbor_biome, biome_size)
-- Fetch biome properties
local node_top = core.get_biome_top_node(current_biome) or "vox_worldblocks:grass"
local node_filler = core.get_biome_filler_node(current_biome) or "vox_worldblocks:dirt"
local depth_top = core.get_biome_depth_top(current_biome) or 1
local depth_filler = core.get_biome_depth_filler(current_biome) or 3
for y = minp.y, maxp.y do
local vi = area:index(x, y, z)
if y == minp.y then
data[vi] = minetest.get_content_id("vox_worldblocks:bedrock")
elseif y < -10001 then
data[vi] = minetest.get_content_id("air")
elseif y <= minp.y + depth_top then
data[vi] = minetest.get_content_id(node_top)
elseif y <= minp.y + depth_top + depth_filler then
data[vi] = minetest.get_content_id(node_filler)
else
data[vi] = minetest.get_content_id("air")
end
end
end
end
vm:set_data(data)
vm:write_to_map()
end)

View file

@ -1,2 +0,0 @@
name = vox_mapgen_core
description = Voxelis - MapGen Core

View file

@ -1,7 +0,0 @@
-- Clay
minetest.register_ore({
ore_type = "blob",
ore = "vox"
})

View file

@ -13,7 +13,4 @@
vox_overworld = {}
dofile(core.get_modpath(core.get_current_modname()) .. "/registry.lua")
-- Ensure vox_mapgen_core is loaded
--local mapgen_core = assert(vox_mapgen_core, "vox_mapgen_core must be loaded before vox_overworld")
--dofile(core.get_modpath(core.get_current_modname()) .. "/registry.lua")

View file

@ -10,182 +10,88 @@
-- BIOMES
-- -------------------------------------------------------------- --
-- Helper Function: Register Default Biome Properties
local function register_biome(params)
-- Set defaults for biome parameters
params.node_river_water = params.node_river_water or "vox_worldblocks:water_source"
params.depth_riverbed = params.depth_riverbed or 2
params.height_min = params.height_min or 1
params.height_max = params.height_max or 256
params.node_stone = params.node_stone or "vox_worldblocks:stone"
core.register_biome(params)
end
-- Grasslands
register_biome({
-- Grassland
-- Typical Blocks: Grass Block, Dirt, Stone
core.register_biome({
name = "grassland",
node_top = "vox_worldblocks:grass",
--node_dust = "vox_main:dirt",
-- Node dropped onto upper surface after all else is generated
node_top = "vox_main:grass_block",
depth_top = 1,
node_filler = "vox_worldblocks:dirt",
-- Node forming surface layer of biome and thickness of this layer
node_filler = "vox_main:dirt",
depth_filler = 3,
heat_point = 35,
humidity_point = 50,
})
-- Node forming lower layer of biome and thickness of this layer
-- Desert
register_biome({
name = "desert",
node_top = "vox_worldblocks:sand",
depth_top = 2,
node_filler = "vox_worldblocks:sandstone",
depth_filler = 5,
heat_point = 80,
humidity_point = 20,
})
node_stone = "vox_main:stone",
-- Node that replaces all stone nodes between roughly y_min and y_max.
-- Boreal Forest
register_biome({
name = "boreal_forest",
node_top = "vox_worldblocks:grass",
depth_top = 1,
node_filler = "vox_worldblocks:dirt",
depth_filler = 4,
heat_point = 20,
humidity_point = 60,
})
node_water_top = "vox_main:sand",
depth_water_top = 10,
-- Node forming a surface layer in seawater with the defined thickness
-- Frozen Tundra
register_biome({
name = "frozen_tundra",
node_top = "vox_worldblocks:snow",
depth_top = 1,
node_filler = "vox_worldblocks:packed_snow",
depth_filler = 3,
node_riverbed = "vox_worldblocks:ice",
heat_point = 5,
humidity_point = 40,
height_max = 150,
})
node_water = "",
-- Node that replaces all seawater nodes not in the surface layer
node_river_water = "vox_main:sand",
-- Node that replaces river water in mapgens that use
-- vox_main:river_water
node_riverbed = "vox_main:gravel",
depth_riverbed = 2,
-- Node placed under river water and thickness of this layer
node_cave_liquid = "vox_main:lava_source",
node_cave_liquid = {"vox_main:water_source", "vox_main:lava_source"},
-- Nodes placed inside 50% of the medium size caves.
-- Multiple nodes can be specified, each cave will use a randomly
-- chosen node from the list.
-- If this field is left out or 'nil', cave liquids fall back to
-- classic behavior of lava and water distributed using 3D noise.
-- For no cave liquid, specify "air".
node_dungeon = "vox_main:cobblestone",
-- Node used for primary dungeon structure.
-- If absent, dungeon nodes fall back to the 'mapgen_cobble' mapgen
-- alias, if that is also absent, dungeon nodes fall back to the biome
-- 'node_stone'.
-- If present, the following two nodes are also used.
node_dungeon_alt = "vox_main:mossycobble",
-- Node used for randomly-distributed alternative structure nodes.
-- If alternative structure nodes are not wanted leave this absent.
node_dungeon_stair = "vox_structural:cobblestone_stairs",
-- Node used for dungeon stairs.
-- If absent, stairs fall back to 'node_dungeon'.
y_max = 31000,
y_min = 1,
-- Upper and lower limits for biome.
-- Alternatively you can use xyz limits as shown below.
max_pos = {x = 31000, y = 128, z = 31000},
min_pos = {x = -31000, y = 9, z = -31000},
-- xyz limits for biome, an alternative to using 'y_min' and 'y_max'.
-- Biome is limited to a cuboid defined by these positions.
-- Any x, y or z field left undefined defaults to -31000 in 'min_pos' or
-- 31000 in 'max_pos'.
vertical_blend = 8,
-- Rocky Badlands
register_biome({
name = "rocky_badlands",
node_top = "vox_worldblocks:stone",
depth_top = 2,
node_filler = "vox_worldblocks:gravel",
depth_filler = 4,
heat_point = 50,
humidity_point = 30,
height_min = 50,
height_max = 180,
})
-- Savannah
register_biome({
name = "savannah",
node_top = "vox_worldblocks:grass",
depth_top = 1,
node_filler = "vox_worldblocks:dirt",
depth_filler = 3,
heat_point = 70,
humidity_point = 30,
height_max = 512,
})
-- Mangrove Forest
register_biome({
name = "mangrove_forest",
node_top = "vox_worldblocks:grass",
depth_top = 1,
node_filler = "vox_worldblocks:mud",
depth_filler = 3,
node_riverbed = "vox_worldblocks:mud",
heat_point = 75,
humidity_point = 80,
height_min = -5,
height_max = 100,
})
-- Volcanic Fields
register_biome({
name = "volcanic_fields",
node_top = "vox_worldblocks:volcanic_rock",
depth_top = 1,
node_filler = "vox_worldblocks:basalt",
depth_filler = 5,
node_riverbed = "vox_worldblocks:lava_source",
node_river_water = "vox_worldblocks:lava_source",
heat_point = 90,
humidity_point = 10,
height_min = 50,
height_max = 512,
})
-- Salt Flats
register_biome({
name = "salt_flats",
node_top = "vox_worldblocks:salt_crystal",
depth_top = 2,
node_filler = "vox_worldblocks:sand",
depth_filler = 3,
heat_point = 80,
humidity_point = 20,
height_max = 100,
})
-- Jade Cliffs
register_biome({
name = "jade_cliffs",
node_top = "vox_worldblocks:grass",
depth_top = 1,
node_filler = "vox_worldblocks:stone",
depth_filler = 5,
node_stone = "vox_worldblocks:granite",
node_riverbed = "vox_worldblocks:gravel",
heat_point = 55,
humidity_point = 65,
height_min = 128,
height_max = 1024,
})
-- Painted Canyons
register_biome({
name = "painted_canyons",
node_top = "vox_worldblocks:terracotta_red",
depth_top = 1,
node_filler = "vox_worldblocks:terracotta_orange",
depth_filler = 4,
node_riverbed = "vox_worldblocks:terracotta_yellow",
heat_point = 65,
humidity_point = 25,
height_min = 10,
height_max = 256,
})
-- Iceberg Fields
register_biome({
name = "iceberg_fields",
node_top = "vox_worldblocks:ice",
depth_top = 1,
node_filler = "vox_worldblocks:snow",
depth_filler = 3,
node_riverbed = "vox_worldblocks:ice",
heat_point = -10,
humidity_point = 50,
height_min = -100,
height_max = 100,
})
-- Characteristic temperature and humidity for the biome.
-- These values create 'biome points' on a voronoi diagram with heat and
-- humidity as axes. The resulting voronoi cells determine the
-- distribution of the biomes.
-- Heat and humidity have average values of 50, vary mostly between
-- 0 and 100 but can exceed these values.
-- Black Sand Beach
register_biome({
name = "black_sand_beach",
node_top = "vox_worldblocks:basalt",
depth_top = 2,
node_filler = "vox_worldblocks:sand",
depth_filler = 3,
heat_point = 65,
humidity_point = 80,
height_min = -5,
height_max = 5,
})
weight = 1.0,
-- Relative weight of the biome in the Voronoi diagram.
-- A value of 0 (or less) is ignored and equivalent to 1.0.
});

View file

@ -1,14 +0,0 @@
---------------------------------------------------------------------------
-- Voxelis - Voxel survival sandbox for Luanti
-- Copyright (C) 2024 Mad Star Studio LLC
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 3 of the License, or
-- (at your option) any later version.
--
-- You should have received a copy of the GNU General Public License along
-- with this program; if not, see <http://www.gnu.org/licenses/>.
---------------------------------------------------------------------------
vox_terrain_features = { }

View file

@ -1,2 +0,0 @@
name = vox_terrain_features
description = Voxelis - Terrain Features