3#include "mc/_HeaderOutputPredefine.h"
6#include "mc/molang/MolangVersion.h"
7#include "mc/world/actor/state/PropertyMetadata.h"
15namespace Json {
class Value; }
18class PropertyGroup :
public ::std::enable_shared_from_this<::PropertyGroup> {
41 MCNAPI
void _addBoolProperty(::std::string
const& name,
bool clientSync,
bool defaultValue);
44 ::std::string
const& name,
47 ::std::vector<::HashedString>
const& enumValues
51 ::std::string
const& name,
54 ::std::vector<::HashedString>
const& enumValues
58 ::std::string
const& name,
66 _addFloatProperty(::std::string
const& name,
bool clientSync,
float defaultValue,
float rangeMin,
float rangeMax);
69 ::std::string
const& name,
77 _addIntProperty(::std::string
const& name,
bool clientSync,
int defaultValue,
int rangeMin,
int rangeMax);
80 _addPropertyMetadata(::std::string
const& name,
bool clientSync, ::PropertyMetadata::ContainedType propertyType);
85 ::std::string
const& name,
87 ::MolangVersion molangVersion,
98 uint64 enumIndexArrayIndex,
100 ::std::string
const& propertyName
119 MCNAPI static ::std::shared_ptr<::PropertyGroup const>
Definition ExpressionNode.h:28
Definition HashedString.h:5
Definition PropertyGroup.h:18
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)
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
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