add block particles property
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user