LeviLamina
Loading...
Searching...
No Matches
PropertyGroup.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/molang/MolangVersion.h"
7#include "mc/world/actor/state/PropertyMetadata.h"
8
9// auto generated forward declare list
10// clang-format off
11class ExpressionNode;
12class HashedString;
13class ListTag;
14class RenderParams;
15namespace Json { class Value; }
16// clang-format on
17
18class PropertyGroup : public ::std::enable_shared_from_this<::PropertyGroup> {
19public:
20 // member variables
21 // NOLINTBEGIN
29 // NOLINTEND
30
31public:
32 // prevent constructor by default
33 PropertyGroup& operator=(PropertyGroup const&);
35
36public:
37 // member functions
38 // NOLINTBEGIN
39 MCNAPI PropertyGroup();
40
41 MCNAPI void _addBoolProperty(::std::string const& name, bool clientSync, bool defaultValue);
42
44 ::std::string const& name,
45 bool clientSync,
46 ::ExpressionNode&& defaultExpression,
47 ::std::vector<::HashedString> const& enumValues
48 );
49
51 ::std::string const& name,
52 bool clientSync,
53 uint64 defaultValue,
54 ::std::vector<::HashedString> const& enumValues
55 );
56
57 MCNAPI void _addFloatProperty(
58 ::std::string const& name,
59 bool clientSync,
60 ::ExpressionNode&& defaultExpression,
61 float rangeMin,
62 float rangeMax
63 );
64
65 MCNAPI void
66 _addFloatProperty(::std::string const& name, bool clientSync, float defaultValue, float rangeMin, float rangeMax);
67
68 MCNAPI void _addIntProperty(
69 ::std::string const& name,
70 bool clientSync,
71 ::ExpressionNode&& defaultExpression,
72 int rangeMin,
73 int rangeMax
74 );
75
76 MCNAPI void
77 _addIntProperty(::std::string const& name, bool clientSync, int defaultValue, int rangeMin, int rangeMax);
78
79 MCNAPI void
80 _addPropertyMetadata(::std::string const& name, bool clientSync, ::PropertyMetadata::ContainedType propertyType);
81
82 MCNAPI ::std::string const& _getFriendlyJsonTypeString(::PropertyMetadata::ContainedType type);
83
85 ::std::string const& name,
86 ::Json::Value const& propertyNode,
87 ::MolangVersion molangVersion,
88 bool clientSync
89 );
90
91 MCNAPI void _reserveSpaceForTypes(::std::vector<uint64> const& typeCounts);
92
93 MCNAPI bool _validateDataType(::Json::Value const& value, ::PropertyMetadata::ContainedType type);
94
95 MCNAPI bool getDefaultBoolValue(uint64 boolArrayIndex, ::RenderParams& renderParams) const;
96
98 uint64 enumIndexArrayIndex,
99 ::RenderParams& renderParams,
100 ::std::string const& propertyName
101 ) const;
102
103 MCNAPI float getDefaultFloatValue(uint64 floatArrayIndex, ::RenderParams& renderParams) const;
104
105 MCNAPI int getDefaultIntValue(uint64 intArrayIndex, ::RenderParams& renderParams) const;
106
108
110 // NOLINTEND
111
112public:
113 // static functions
114 // NOLINTBEGIN
115 MCNAPI static ::PropertyMetadata::ContainedType _getJsonPropertyType(::Json::Value const& typeNode);
116
117 MCNAPI static bool isValidEnumEntry(::std::string const& entryValue);
118
119 MCNAPI static ::std::shared_ptr<::PropertyGroup const>
120 loadPropertiesFromJson(::Json::Value const& root, ::MolangVersion molangVersion);
121 // NOLINTEND
122
123public:
124 // static variables
125 // NOLINTBEGIN
126 MCNAPI static uint64 const& MAX_ENUM_SIZE();
127
128 MCNAPI static uint64 const& MAX_ENUM_VALUE_SIZE();
129 // NOLINTEND
130
131public:
132 // constructor thunks
133 // NOLINTBEGIN
134 MCNAPI void* $ctor();
135 // NOLINTEND
136
137public:
138 // destructor thunk
139 // NOLINTBEGIN
140 MCNAPI void $dtor();
141 // NOLINTEND
142};
Definition ExpressionNode.h:28
Definition HashedString.h:5
Definition Value.h:16
Definition ListTag.h:12
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 ~PropertyGroup()
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 $dtor()
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 PropertyGroup()
MCAPI void _addFloatProperty(::std::string const &name, bool clientSync, float defaultValue, float rangeMin, float rangeMax)
static MCAPI bool isValidEnumEntry(::std::string const &entryValue)
MCAPI void * $ctor()
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
Definition Alias.h:14