mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
Merge pull request #895 from MihailRis/other-suggestions
Other suggestions
This commit is contained in:
commit
8ade2ab5da
6 changed files with 25 additions and 5 deletions
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
# Свойства блоков
|
||||
|
||||
## Вид
|
||||
## Вид & Звук
|
||||
|
||||
### Текстура - *texture*
|
||||
|
||||
|
|
@ -78,6 +78,11 @@
|
|||
При приближении к блоку движок создаст эмиттер, который будет работать
|
||||
до разрушения блока или отдаления камеры на некоторое расстояние.
|
||||
|
||||
### Материал - *material*
|
||||
|
||||
Определяет имя материала блока в формате `пак:имя_материала`, что влияет на выбор звуков взаимодействия с блоком.
|
||||
Определения материалов расположены в /block_materials.
|
||||
|
||||
## Варианты
|
||||
|
||||
Некоторые свойства могут варьироваться динамически, в зависимости от номера варианта, хранимого в пользовательских битах блока.
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
generator = "base:demo"
|
||||
player-entity = "base:player"
|
||||
hand-skeleton = "base:hand"
|
||||
block-material = "base:stone"
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -39,6 +39,9 @@ std::unique_ptr<Content> 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 =
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue