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;
40 MCAPI
void _addBoolProperty(::std::string
const& name,
bool clientSync,
::ExpressionNode&& defaultExpression);
42 MCAPI
void _addBoolProperty(::std::string
const& name,
bool clientSync,
bool defaultValue);
44 MCAPI
void _addEnumIndexProperty(
45 ::std::string
const& name,
48 ::std::vector<::HashedString>
const& enumValues
51 MCAPI
void _addEnumIndexProperty(
52 ::std::string
const& name,
55 ::std::vector<::HashedString>
const& enumValues
58 MCAPI
void _addFloatProperty(
59 ::std::string
const& name,
67 _addFloatProperty(::std::string
const& name,
bool clientSync,
float defaultValue,
float rangeMin,
float rangeMax);
69 MCAPI
void _addIntProperty(
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);
83 MCAPI
bool _loadPropertyFromJson(
84 ::std::string
const& name,
86 ::MolangVersion
const molangVersion,
91 MCAPI
void _reserveSpaceForTypes(::std::vector<uint64>
const& typeCounts);
94 MCAPI
bool getDefaultBoolValue(uint64 boolArrayIndex,
::RenderParams& renderParams)
const;
96 MCAPI uint64 getDefaultEnumIndexValue(
97 uint64 enumIndexArrayIndex,
99 ::std::string
const& propertyName
102 MCAPI
float getDefaultFloatValue(uint64 floatArrayIndex,
::RenderParams& renderParams)
const;
104 MCAPI
int getDefaultIntValue(uint64 intArrayIndex,
::RenderParams& renderParams)
const;
106 MCAPI ::PropertyMetadata
const* getPropertyMetadata(uint64 propertyNameHash)
const;
108 MCAPI ::PropertyMetadata
const* getPropertyMetadataByString(::std::string
const& propertyName)
const;
114 MCAPI static ::PropertyMetadata::ContainedType _getJsonPropertyType(
::Json::Value const& typeNode);
116 MCAPI static ::std::shared_ptr<::PropertyGroup const>
117 loadPropertiesFromJson(
::Json::Value const& root, ::MolangVersion molangVersion);