LeviLamina
Loading...
Searching...
No Matches
JsonUtil.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/core/debug/log/LogArea.h"
7#include "mc/util/json_util/JsonSchemaObjectNode.h"
8#include "mc/world/item/ItemColor.h"
9#include "mc/world/level/block/BannerBlockType.h"
10
11// auto generated forward declare list
12// clang-format off
13class HashedString;
14class SemVersion;
15class Vec2;
16class Vec3;
17namespace Json { class Value; }
18namespace JsonUtil { class EmptyClass; }
19namespace SharedTypes::v1_21_100 { struct ChargeAttackGoalDefinition; }
20namespace SharedTypes::v1_21_100 { struct CircleAroundAnchorGoalDefinition; }
21namespace SharedTypes::v1_21_100 { struct ControlledByPlayerGoalDefinition; }
22namespace SharedTypes::v1_21_100 { struct DragonFlamingGoalDefinition; }
23namespace SharedTypes::v1_21_100 { struct EatMobGoalDefinition; }
24namespace SharedTypes::v1_21_110 { struct ExperienceRewardDefinition; }
25namespace SharedTypes::v1_21_110 { struct RoarGoalDefinition; }
26namespace SharedTypes::v1_21_110 { struct SlimeAttackGoalDefinition; }
27namespace SharedTypes::v1_21_110 { struct SlimeFloatGoalDefinition; }
28namespace SharedTypes::v1_21_110 { struct SlimeKeepOnJumpingGoalDefinition; }
29namespace SharedTypes::v1_21_110 { struct SlimeRandomDirectionGoalDefinition; }
30namespace SharedTypes::v1_21_110 { struct SniffGoalDefinition; }
31namespace SharedTypes::v1_21_110 { struct SonicBoomGoalDefinition; }
32namespace SharedTypes::v1_21_110 { struct StayNearNoteblockGoalDefinition; }
33namespace SharedTypes::v1_21_110 { struct SwimIdleGoalDefinition; }
34namespace SharedTypes::v1_21_110 { struct SwimUpForBreathGoalDefinition; }
35namespace SharedTypes::v1_21_110 { struct SwimWanderGoalDefinition; }
36namespace SharedTypes::v1_21_110 { struct SwoopAttackGoalDefinition; }
37namespace SharedTypes::v1_21_120 { struct AvoidBlockGoalDefinition; }
38namespace SharedTypes::v1_21_120 { struct AvoidMobTypeGoalDefinition; }
39namespace SharedTypes::v1_21_120 { struct DigGoalDefinition; }
40namespace SharedTypes::v1_21_120 { struct DrinkMilkGoalDefinition; }
41// clang-format on
42
43namespace JsonUtil {
44// functions
45// NOLINTBEGIN
46MCNAPI void LogMissingChildSchemaOption(
47 ::LogArea area,
48 ::Json::Value const& node,
49 ::std::string const& missingName,
50 ::std::string const& foundNodesStr,
51 ::std::string const& optionsStr
52);
53
54MCNAPI void buildActorDefinitionSchema(
55 ::std::shared_ptr<
57 root
58);
59
60MCNAPI void buildActorGoalSchema(
61 ::std::shared_ptr<::JsonUtil::JsonSchemaObjectNode<
64 ::std::string const&
65);
66
67MCNAPI void buildActorGoalSchema(
68 ::std::shared_ptr<
70 ::std::string const&
71);
72
73MCNAPI void buildActorGoalSchema(
74 ::std::shared_ptr<
76 ::std::string const&
77);
78
79MCNAPI void buildActorGoalSchema(
80 ::std::shared_ptr<
82 root,
83 ::std::string const&
84);
85
86MCNAPI void buildActorGoalSchema(
87 ::std::shared_ptr<
89 root,
90 ::std::string const&
91);
92
93MCNAPI void buildActorGoalSchema(
94 ::std::shared_ptr<
96 root,
97 ::std::string const&
98);
99
100MCNAPI void buildActorGoalSchema(
101 ::std::shared_ptr<
103 root,
104 ::std::string const& name
105);
106
107MCNAPI void buildActorGoalSchema(
108 ::std::shared_ptr<
110 root,
111 ::std::string const& name
112);
113
114MCNAPI void buildActorGoalSchema(
115 ::std::shared_ptr<
117 root,
118 ::std::string const& name
119);
120
121MCNAPI void buildActorGoalSchema(
122 ::std::shared_ptr<
124 ::std::string const& name
125);
126
127MCNAPI void buildActorGoalSchema(
128 ::std::shared_ptr<::JsonUtil::JsonSchemaObjectNode<
131 ::std::string const& name
132);
133
134MCNAPI void buildActorGoalSchema(
135 ::std::shared_ptr<
137 root,
138 ::std::string const& name
139);
140
141MCNAPI void buildActorGoalSchema(
142 ::std::shared_ptr<::JsonUtil::JsonSchemaObjectNode<
145 ::std::string const& name
146);
147
148MCNAPI void buildActorGoalSchema(
149 ::std::shared_ptr<::JsonUtil::JsonSchemaObjectNode<
152 ::std::string const& name
153);
154
155MCNAPI void buildActorGoalSchema(
156 ::std::shared_ptr<::JsonUtil::JsonSchemaObjectNode<
159 ::std::string const& name
160);
161
162MCNAPI void buildActorGoalSchema(
163 ::std::shared_ptr<::JsonUtil::JsonSchemaObjectNode<
166 ::std::string const& name
167);
168
169MCNAPI void buildActorGoalSchema(
170 ::std::shared_ptr<
172 root,
173 ::std::string const& name
174);
175
176MCNAPI void buildActorGoalSchema(
177 ::std::shared_ptr<
179 ::std::string const& name
180);
181
182MCNAPI void buildActorGoalSchema(
183 ::std::shared_ptr<::JsonUtil::JsonSchemaObjectNode<
186 ::std::string const& name
187);
188
189MCNAPI void buildActorGoalSchema(
190 ::std::shared_ptr<
192 root,
193 ::std::string const& name
194);
195
196MCNAPI void buildActorGoalSchema(
197 ::std::shared_ptr<
199 root,
200 ::std::string const& name
201);
202
203MCNAPI void eraseSchema(::HashedString const& name, ::SemVersion const& version);
204
205MCNAPI ::Json::Value& getMemberByCaseInsensitiveName(::Json::Value& node, ::std::string_view memberName);
206
207MCNAPI ::Json::Value const&
208getMemberByCaseInsensitiveNameConst(::Json::Value const& node, ::std::string_view memberName);
209
210MCNAPI bool parseBannerBlockType(::BannerBlockType& outType, ::Json::Value const& root);
211
212MCNAPI bool
213parseItem(::std::string& outItemName, ::std::string& outItemNamespace, int& inoutItemAux, ::std::string_view inString);
214
215MCNAPI bool parseItemColor(::ItemColor& outColor, ::Json::Value const& root);
216
217MCNAPI bool parseRange(::Json::Value const& root, int& outMin, int& outMax);
218
219MCNAPI bool parseVec2(::Vec2& outVec, ::Json::Value const& root);
220
221MCNAPI bool parseVec3(::Vec3& outVec, ::Json::Value const& root);
222
223MCNAPI void setDefaultPrettyName(::std::string& destPrettyName, ::HashedString const& sourceName);
224
225MCNAPI void unregisterSchema(::HashedString const& name, ::SemVersion const& version);
226// NOLINTEND
227
228// static variables
229// NOLINTBEGIN
230MCNAPI ::HashedString const& ACTOR_DEFINITION_TRIGGER_TYPE_NAME();
231
232MCNAPI ::HashedString const& ACTOR_FILTER_GROUP_TYPE_NAME();
233
234MCNAPI ::HashedString const& ARRAY_TYPE_NAME();
235
236MCNAPI ::HashedString const& BOOL_TYPE_NAME();
237
238MCNAPI ::HashedString const& ENTITIES_TYPE_NAME();
239
240MCNAPI ::HashedString const& ENUM_TYPE_NAME();
241
242MCNAPI ::HashedString const& FLOAT_RANGE_TYPE_NAME();
243
244MCNAPI ::HashedString const& FLOAT_TYPE_NAME();
245
246MCNAPI ::HashedString const& INT_RANGE_TYPE_NAME();
247
248MCNAPI ::HashedString const& INT_TYPE_NAME();
249
250MCNAPI ::HashedString const& MOLANG_TYPE_NAME();
251
252MCNAPI ::HashedString const& OBJECT_TYPE_NAME();
253
254MCNAPI ::HashedString const& STRING_TYPE_NAME();
255
256MCNAPI ::HashedString const& VEC2_TYPE_NAME();
257
258MCNAPI ::HashedString const& VEC3_TYPE_NAME();
259
260MCNAPI ::HashedString const& VEC4_TYPE_NAME();
261
262MCNAPI ::HashedString const& VERSION_TYPE_NAME();
263// NOLINTEND
264
265} // namespace JsonUtil
Definition HashedString.h:5
Definition EmptyClass.h:7
Definition JsonSchemaObjectNode.h:8
Definition Value.h:16
Definition SemVersion.h:16
Definition Vec2.h:5
Definition Vec3.h:10
Definition CircleAroundAnchorGoalDefinition.h:15
Definition ControlledByPlayerGoalDefinition.h:15
Definition DragonFlamingGoalDefinition.h:15
Definition SlimeKeepOnJumpingGoalDefinition.h:15
Definition SlimeRandomDirectionGoalDefinition.h:15
Definition StayNearNoteblockGoalDefinition.h:15
Definition SwimUpForBreathGoalDefinition.h:15