3#include "mc/_HeaderOutputPredefine.h"
6#include "mc/molang/MolangVersion.h"
7#include "mc/platform/brstd/flat_map.h"
8#include "mc/world/actor/state/DefaultPropertyValues.h"
9#include "mc/world/actor/state/PropertyMetadata.h"
17namespace Json {
class Value; }
20class PropertyGroup :
public ::std::enable_shared_from_this<::PropertyGroup> {
24 ::ll::TypedStorage<8, 24, ::std::vector<::PropertyMetadata>> mPropertyMetadata;
29 mPropertyIndexesByHash;
30 ::ll::TypedStorage<8, 64, ::std::unordered_map<::std::string, uint64>> mPropertyIndexesByString;
31 ::ll::TypedStorage<8, 24, ::std::vector<::std::pair<int, int>>> mIntPropertyLimits;
32 ::ll::TypedStorage<8, 24, ::std::vector<::std::pair<float, float>>> mFloatPropertyLimits;
33 ::ll::TypedStorage<8, 24, ::std::vector<::std::vector<::HashedString>>> mStringEnumValues;
34 ::ll::TypedStorage<8, 96, ::DefaultPropertyValues> mDefaultValues;
42 MCNAPI
void _addBoolProperty(::std::string
const& name,
bool clientSync,
bool defaultValue);
45 ::std::string
const& name,
48 ::std::vector<::HashedString>
const& enumValues
52 ::std::string
const& name,
55 ::std::vector<::HashedString>
const& enumValues
59 ::std::string
const& name,
67 _addFloatProperty(::std::string
const& name,
bool clientSync,
float defaultValue,
float rangeMin,
float rangeMax);
70 ::std::string
const& name,
78 _addIntProperty(::std::string
const& name,
bool clientSync,
int defaultValue,
int rangeMin,
int rangeMax);
81 _addPropertyMetadata(::std::string
const& name,
bool clientSync, ::PropertyMetadata::ContainedType propertyType);
84 ::std::string
const& name,
86 ::MolangVersion
const molangVersion,
91 MCNAPI
void _reserveSpaceForTypes(::std::vector<uint64>
const& typeCounts);
97 uint64 enumIndexArrayIndex,
99 ::std::string
const& propertyName
116 MCNAPI static ::std::shared_ptr<::PropertyGroup const>
Definition ExpressionNode.h:35
Definition HashedString.h:5
Definition PropertyGroup.h:20
MCAPI::PropertyMetadata const * getPropertyMetadataByString(::std::string const &propertyName) const
MCAPI void _addBoolProperty(::std::string const &name, bool clientSync, bool defaultValue)
MCAPI void _addFloatProperty(::std::string const &name, bool clientSync, ::ExpressionNode &&defaultExpression, float rangeMin, float rangeMax)
MCAPI void _addIntProperty(::std::string const &name, bool clientSync, int defaultValue, int rangeMin, int rangeMax)
MCAPI float getDefaultFloatValue(uint64 floatArrayIndex, ::RenderParams &renderParams) const
MCAPI::PropertyMetadata const * getPropertyMetadata(uint64 propertyNameHash) const
MCAPI void _addBoolProperty(::std::string const &name, bool clientSync, ::ExpressionNode &&defaultExpression)
MCAPI void _addIntProperty(::std::string const &name, bool clientSync, ::ExpressionNode &&defaultExpression, int rangeMin, int rangeMax)
MCAPI bool getDefaultBoolValue(uint64 boolArrayIndex, ::RenderParams &renderParams) const
MCAPI void _addEnumIndexProperty(::std::string const &name, bool clientSync, ::ExpressionNode &&defaultExpression, ::std::vector<::HashedString > const &enumValues)
MCAPI void _addPropertyMetadata(::std::string const &name, bool clientSync, ::PropertyMetadata::ContainedType propertyType)
static MCAPI ::PropertyMetadata::ContainedType _getJsonPropertyType(::Json::Value const &typeNode)
MCAPI int getDefaultIntValue(uint64 intArrayIndex, ::RenderParams &renderParams) const
MCAPI void _addFloatProperty(::std::string const &name, bool clientSync, float defaultValue, float rangeMin, float rangeMax)
MCAPI bool _loadPropertyFromJson(::std::string const &name, ::Json::Value const &propertyNode, ::MolangVersion const molangVersion, bool clientSync)
MCAPI uint64 getDefaultEnumIndexValue(uint64 enumIndexArrayIndex, ::RenderParams &renderParams, ::std::string const &propertyName) const
MCAPI void _addEnumIndexProperty(::std::string const &name, bool clientSync, uint64 defaultValue, ::std::vector<::HashedString > const &enumValues)
static MCAPI ::std::shared_ptr<::PropertyGroup const > loadPropertiesFromJson(::Json::Value const &root, ::MolangVersion molangVersion)
Definition RenderParams.h:29