3#include "mc/_HeaderOutputPredefine.h"
6#include "mc/molang/MolangVersion.h"
7#include "mc/world/actor/state/PropertyMetadata.h"
16namespace Json {
class Value; }
19class PropertyGroup :
public ::std::enable_shared_from_this<::PropertyGroup> {
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);
86 ::std::string
const& name,
88 ::MolangVersion molangVersion,
99 uint64 enumIndexArrayIndex,
101 ::std::string
const& propertyName
125 MCNAPI static ::std::shared_ptr<::PropertyGroup const>
Definition ExpressionNode.h:27
Definition HashedString.h:5
Definition PropertyGroup.h:19
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 bool _validateDataType(::Json::Value const &value, ::PropertyMetadata::ContainedType type)
MCAPI::PropertyMetadata const * getPropertyMetadata(uint64 propertyNameHash) const
static MCAPI uint64 const & MAX_ENUM_SIZE()
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
static MCAPI bool _tryGetClientSync(::std::string const &propertyName, ::Json::Value const &propertyNode, bool &clientSyncOut)
MCAPI void _addFloatProperty(::std::string const &name, bool clientSync, float defaultValue, float rangeMin, float rangeMax)
static MCAPI bool isValidEnumEntry(::std::string const &entryValue)
MCAPI::ListTag getNetworkSyncPropertyDescriptionsAsListTag() const
MCAPI uint64 getDefaultEnumIndexValue(uint64 enumIndexArrayIndex, ::RenderParams &renderParams, ::std::string const &propertyName) const
MCAPI void _reserveSpaceForTypes(::std::vector< uint64 > const &typeCounts)
MCAPI::std::string const & _getFriendlyJsonTypeString(::PropertyMetadata::ContainedType type)
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)
static MCAPI uint64 const & MAX_ENUM_VALUE_SIZE()
MCAPI bool _loadPropertyFromJson(::std::string const &name, ::Json::Value const &propertyNode, ::MolangVersion molangVersion, bool clientSync)
Definition RenderParams.h:30