mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
add block particles property
This commit is contained in:
parent
24af455bf0
commit
0eeb6b6eb2
11 changed files with 180 additions and 23 deletions
|
|
@ -22,6 +22,7 @@
|
|||
#include "voxels/Block.hpp"
|
||||
#include "data/dv_util.hpp"
|
||||
#include "data/StructLayout.hpp"
|
||||
#include "presets/ParticlesPreset.hpp"
|
||||
|
||||
namespace fs = std::filesystem;
|
||||
using namespace data;
|
||||
|
|
@ -335,6 +336,11 @@ void ContentLoader::loadBlock(
|
|||
perform_user_block_fields(def.name, *def.dataStruct);
|
||||
}
|
||||
|
||||
if (root.has("particles")) {
|
||||
def.particles = std::make_unique<ParticlesPreset>();
|
||||
def.particles->deserialize(root["particles"]);
|
||||
}
|
||||
|
||||
if (def.tickInterval == 0) {
|
||||
def.tickInterval = 1;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue