21class PropertyGroup :
public ::std::enable_shared_from_this<::PropertyGroup> {
25 ::ll::TypedStorage<8, 24, ::std::vector<::PropertyMetadata>> mPropertyMetadata;
30 mPropertyIndexesByHash;
31 ::ll::TypedStorage<8, 64, ::std::unordered_map<::std::string, uint64>> mPropertyIndexesByString;
32 ::ll::TypedStorage<8, 24, ::std::vector<::std::pair<int, int>>> mIntPropertyLimits;
33 ::ll::TypedStorage<8, 24, ::std::vector<::std::pair<float, float>>> mFloatPropertyLimits;
34 ::ll::TypedStorage<8, 24, ::std::vector<::std::vector<::HashedString>>> mStringEnumValues;
35 ::ll::TypedStorage<8, 96, ::DefaultPropertyValues> mDefaultValues;
43 MCAPI
void _addBoolProperty(::std::string
const& name,
bool clientSync,
bool defaultValue);
45 MCAPI
void _addEnumIndexProperty(
46 ::std::string
const& name,
49 ::std::vector<::HashedString>
const& enumValues
52 MCAPI
void _addEnumIndexProperty(
53 ::std::string
const& name,
56 ::std::vector<::HashedString>
const& enumValues
59 MCAPI
void _addFloatProperty(
60 ::std::string
const& name,
68 _addFloatProperty(::std::string
const& name,
bool clientSync,
float defaultValue,
float rangeMin,
float rangeMax);
70 MCAPI
void _addIntProperty(
71 ::std::string
const& name,
79 _addIntProperty(::std::string
const& name,
bool clientSync,
int defaultValue,
int rangeMin,
int rangeMax);
82 _addPropertyMetadata(::std::string
const& name,
bool clientSync, ::PropertyMetadata::ContainedType propertyType);
84 MCAPI ::std::string
const& _getFriendlyJsonTypeString(::PropertyMetadata::ContainedType type);
86 MCAPI
bool _loadPropertyFromJson(
87 ::std::string
const& name,
89 ::MolangVersion molangVersion,
93 MCAPI
void _reserveSpaceForTypes(::std::vector<uint64>
const& typeCounts);
95 MCAPI
bool _validateDataType(
::Json::Value const& value, ::PropertyMetadata::ContainedType type);
97 MCAPI
bool getDefaultBoolValue(uint64 boolArrayIndex,
::RenderParams& renderParams)
const;
99 MCAPI uint64 getDefaultEnumIndexValue(
100 uint64 enumIndexArrayIndex,
102 ::std::string
const& propertyName
105 MCAPI
float getDefaultFloatValue(uint64 floatArrayIndex,
::RenderParams& renderParams)
const;
107 MCAPI
int getDefaultIntValue(uint64 intArrayIndex,
::RenderParams& renderParams)
const;
109 MCAPI ::ListTag getNetworkSyncPropertyDescriptionsAsListTag()
const;
117 MCAPI static ::PropertyMetadata::ContainedType _getJsonPropertyType(
::Json::Value const& typeNode);
119 MCAPI
static bool isValidEnumEntry(::std::string
const& entryValue);
121 MCAPI static ::std::shared_ptr<::PropertyGroup const>
122 loadPropertiesFromJson(
::Json::Value const& root, ::MolangVersion molangVersion);
128 MCAPI
static uint64
const& MAX_ENUM_SIZE();
130 MCAPI
static uint64
const& MAX_ENUM_VALUE_SIZE();