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; }
37// clang-format on
38
39namespace JsonUtil {
40// functions
41// NOLINTBEGIN
42MCNAPI void LogMissingChildSchemaOption(
43 ::LogArea area,
44 ::Json::Value const& node,
45 ::std::string const& missingName,
46 ::std::string const& foundNodesStr,
47 ::std::string const& optionsStr
48);
49
50MCNAPI void buildActorDefinitionSchema(
51 ::std::shared_ptr<
53 root
54);
55
56MCNAPI void buildActorGoalSchema(
57 ::std::shared_ptr<::JsonUtil::JsonSchemaObjectNode<
60 ::std::string const&
61);
62
63MCNAPI void buildActorGoalSchema(
64 ::std::shared_ptr<
66 ::std::string const&
67);
68
69MCNAPI void buildActorGoalSchema(
70 ::std::shared_ptr<
72 root,
73 ::std::string const& name
74);
75
76MCNAPI void buildActorGoalSchema(
77 ::std::shared_ptr<
79 root,
80 ::std::string const& name
81);
82
83MCNAPI void buildActorGoalSchema(
84 ::std::shared_ptr<
86 root,
87 ::std::string const& name
88);
89
90MCNAPI void buildActorGoalSchema(
91 ::std::shared_ptr<
93 ::std::string const& name
94);
95
96MCNAPI void buildActorGoalSchema(
97 ::std::shared_ptr<::JsonUtil::JsonSchemaObjectNode<
100 ::std::string const& name
101);
102
103MCNAPI void buildActorGoalSchema(
104 ::std::shared_ptr<
106 root,
107 ::std::string const& name
108);
109
110MCNAPI void buildActorGoalSchema(
111 ::std::shared_ptr<::JsonUtil::JsonSchemaObjectNode<
114 ::std::string const& name
115);
116
117MCNAPI void buildActorGoalSchema(
118 ::std::shared_ptr<::JsonUtil::JsonSchemaObjectNode<
121 ::std::string const& name
122);
123
124MCNAPI void buildActorGoalSchema(
125 ::std::shared_ptr<::JsonUtil::JsonSchemaObjectNode<
128 ::std::string const& name
129);
130
131MCNAPI void buildActorGoalSchema(
132 ::std::shared_ptr<::JsonUtil::JsonSchemaObjectNode<
135 ::std::string const& name
136);
137
138MCNAPI void buildActorGoalSchema(
139 ::std::shared_ptr<
141 root,
142 ::std::string const& name
143);
144
145MCNAPI void buildActorGoalSchema(
146 ::std::shared_ptr<
148 ::std::string const& name
149);
150
151MCNAPI void buildActorGoalSchema(
152 ::std::shared_ptr<::JsonUtil::JsonSchemaObjectNode<
155 ::std::string const& name
156);
157
158MCNAPI void buildActorGoalSchema(
159 ::std::shared_ptr<
161 root,
162 ::std::string const& name
163);
164
165MCNAPI void buildActorGoalSchema(
166 ::std::shared_ptr<
168 root,
169 ::std::string const& name
170);
171
172MCNAPI void eraseSchema(::HashedString const& name, ::SemVersion const& version);
173
174MCNAPI ::Json::Value& getMemberByCaseInsensitiveName(::Json::Value& node, ::std::string_view memberName);
175
176MCNAPI ::Json::Value const&
177getMemberByCaseInsensitiveNameConst(::Json::Value const& node, ::std::string_view memberName);
178
179MCNAPI bool parseBannerBlockType(::BannerBlockType& outType, ::Json::Value const& root);
180
181MCNAPI bool
182parseItem(::std::string& outItemName, ::std::string& outItemNamespace, int& inoutItemAux, ::std::string_view inString);
183
184MCNAPI bool parseItemColor(::ItemColor& outColor, ::Json::Value const& root);
185
186MCNAPI bool parseRange(::Json::Value const& root, int& outMin, int& outMax);
187
188MCNAPI bool parseVec2(::Vec2& outVec, ::Json::Value const& root);
189
190MCNAPI bool parseVec3(::Vec3& outVec, ::Json::Value const& root);
191
192MCNAPI void setDefaultPrettyName(::std::string& destPrettyName, ::HashedString const& sourceName);
193
194MCNAPI void unregisterSchema(::HashedString const& name, ::SemVersion const& version);
195// NOLINTEND
196
197// static variables
198// NOLINTBEGIN
199MCNAPI ::HashedString const& ACTOR_DEFINITION_TRIGGER_TYPE_NAME();
200
201MCNAPI ::HashedString const& ACTOR_FILTER_GROUP_TYPE_NAME();
202
203MCNAPI ::HashedString const& ARRAY_TYPE_NAME();
204
205MCNAPI ::HashedString const& BOOL_TYPE_NAME();
206
207MCNAPI ::HashedString const& ENTITIES_TYPE_NAME();
208
209MCNAPI ::HashedString const& ENUM_TYPE_NAME();
210
211MCNAPI ::HashedString const& FLOAT_RANGE_TYPE_NAME();
212
213MCNAPI ::HashedString const& FLOAT_TYPE_NAME();
214
215MCNAPI ::HashedString const& INT_RANGE_TYPE_NAME();
216
217MCNAPI ::HashedString const& INT_TYPE_NAME();
218
219MCNAPI ::HashedString const& MOLANG_TYPE_NAME();
220
221MCNAPI ::HashedString const& OBJECT_TYPE_NAME();
222
223MCNAPI ::HashedString const& STRING_TYPE_NAME();
224
225MCNAPI ::HashedString const& VEC2_TYPE_NAME();
226
227MCNAPI ::HashedString const& VEC3_TYPE_NAME();
228
229MCNAPI ::HashedString const& VEC4_TYPE_NAME();
230
231MCNAPI ::HashedString const& VERSION_TYPE_NAME();
232// NOLINTEND
233
234} // 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