add block particles property

This commit is contained in:
MihailRis
2024-11-04 22:48:39 +03:00
parent 24af455bf0
commit 0eeb6b6eb2
11 changed files with 180 additions and 23 deletions
+6
View File
@@ -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;
}