MCPcopy Create free account
hub / github.com/DGVPSH/SlackOpen / getJsonObject

Method getJsonObject

src/main/java/net/minecraft/util/JsonUtils.java:221–231  ·  view source on GitHub ↗

Gets the given JsonElement as a JsonObject. Expects the second parameter to be the name of the element's field if an error message needs to be thrown.

(JsonElement p_151210_0_, String p_151210_1_)

Source from the content-addressed store, hash-verified

219 * if an error message needs to be thrown.
220 */
221 public static JsonObject getJsonObject(JsonElement p_151210_0_, String p_151210_1_)
222 {
223 if (p_151210_0_.isJsonObject())
224 {
225 return p_151210_0_.getAsJsonObject();
226 }
227 else
228 {
229 throw new JsonSyntaxException("Expected " + p_151210_1_ + " to be a JsonObject, was " + toString(p_151210_0_));
230 }
231 }
232
233 public static JsonObject getJsonObject(JsonObject base, String key)
234 {

Callers 15

ResourceIndexMethod · 0.95
deserializeMethod · 0.95
parseAnimationFrameMethod · 0.95
deserializeMethod · 0.95
deserializeMethod · 0.95
parseVariantsListMethod · 0.95
deserializeMethod · 0.95
parseRotationMethod · 0.95
parseFacesMethod · 0.95
ShaderManagerMethod · 0.95
parseSamplerMethod · 0.95
parseUniformMethod · 0.95

Calls 2

toStringMethod · 0.95
getMethod · 0.65

Tested by

no test coverage detected