From 8a40bf4fcd1c9696f91b65cea25216db1e942257 Mon Sep 17 00:00:00 2001 From: MihailRis Date: Tue, 28 Jul 2026 23:10:47 +0300 Subject: [PATCH 1/3] feat: auto-focus search textbox in content menu --- res/layouts/pages/content.xml.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/res/layouts/pages/content.xml.lua b/res/layouts/pages/content.xml.lua index 2937542f4..cb63a96c7 100644 --- a/res/layouts/pages/content.xml.lua +++ b/res/layouts/pages/content.xml.lua @@ -3,6 +3,7 @@ function on_open(params) mode = params.mode end refresh() + document.search_textbox.focused = true end -- add - packs to be added to the world (after apply) From 383dcde2e77cdb7ca672203c8bb21b5806a6d155 Mon Sep 17 00:00:00 2001 From: MihailRis Date: Tue, 28 Jul 2026 23:18:41 +0300 Subject: [PATCH 2/3] move default block material name to defaults.toml --- res/content/base/config/defaults.toml | 1 + src/content/ContentBuilder.cpp | 3 +++ src/voxels/Block.hpp | 4 +--- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/res/content/base/config/defaults.toml b/res/content/base/config/defaults.toml index 650c24d74..d2c5142cc 100644 --- a/res/content/base/config/defaults.toml +++ b/res/content/base/config/defaults.toml @@ -1,3 +1,4 @@ generator = "base:demo" player-entity = "base:player" hand-skeleton = "base:hand" +block-material = "base:stone" diff --git a/src/content/ContentBuilder.cpp b/src/content/ContentBuilder.cpp index 25029963b..97498b497 100644 --- a/src/content/ContentBuilder.cpp +++ b/src/content/ContentBuilder.cpp @@ -39,6 +39,9 @@ std::unique_ptr ContentBuilder::build() { } else { def.defaults.rt.solid = isSolid(def.defaults) || def.explictlySolid; } + if (def.material.empty()) { + defaults.at("block-material").get(def.material); + } const float EPSILON = 0.01f; def.rt.solid = diff --git a/src/voxels/Block.hpp b/src/voxels/Block.hpp index 5ba3bb267..ded51244e 100644 --- a/src/voxels/Block.hpp +++ b/src/voxels/Block.hpp @@ -37,8 +37,6 @@ inline constexpr size_t MAX_USER_BLOCK_FIELDS_SIZE = 240; inline constexpr int BLOCK_MAX_VARIANTS = 16; -inline std::string DEFAULT_MATERIAL = "base:stone"; - struct BlockFuncsSet { bool init : 1; bool update : 1; @@ -206,7 +204,7 @@ public: dv::value properties = nullptr; /// @brief id of used BlockMaterial, may specify non-existing material - std::string material = DEFAULT_MATERIAL; + std::string material; /// @brief Light emission R, G, B, S (sky lights: sun, moon, radioactive /// clouds) From d9631467fc3c8006ebdadedf6f2bd724287591d6 Mon Sep 17 00:00:00 2001 From: MihailRis Date: Tue, 28 Jul 2026 23:28:01 +0300 Subject: [PATCH 3/3] update doc/*/block-properties.md --- doc/en/block-properties.md | 14 +++++++++++++- doc/ru/block-properties.md | 7 ++++++- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/doc/en/block-properties.md b/doc/en/block-properties.md index f3137dd60..d98a8cac5 100644 --- a/doc/en/block-properties.md +++ b/doc/en/block-properties.md @@ -1,6 +1,6 @@ # Block properties -## Visual +## Visual & Audio ### *texture* @@ -70,6 +70,18 @@ Rotation profile (set of available block rotations and behaviour of placing bloc - "pane" - panels, doors, signs - "stairs" - "pane" + flipped variants +### *particles* + +Particles are specified as a JSON object. Property names can be found [in the particles section](particles.md). + +When camera is near to the block, the engine will create an emitter that will run +until the block is destroyed or the camera moves away a certain distance. + +### Material - *material* + +Defines the name of the block's material in the format `pack:material_name`, which affects the selection of block interaction sounds. +Material definitions are located in /block_materials. + ## Variants Some properties can vary dynamically, depending on the variant number stored in the user bits of the block. diff --git a/doc/ru/block-properties.md b/doc/ru/block-properties.md index 50bd7f023..e139f635d 100644 --- a/doc/ru/block-properties.md +++ b/doc/ru/block-properties.md @@ -1,6 +1,6 @@ # Свойства блоков -## Вид +## Вид & Звук ### Текстура - *texture* @@ -78,6 +78,11 @@ При приближении к блоку движок создаст эмиттер, который будет работать до разрушения блока или отдаления камеры на некоторое расстояние. +### Материал - *material* + +Определяет имя материала блока в формате `пак:имя_материала`, что влияет на выбор звуков взаимодействия с блоком. +Определения материалов расположены в /block_materials. + ## Варианты Некоторые свойства могут варьироваться динамически, в зависимости от номера варианта, хранимого в пользовательских битах блока.