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

Method getJsonArray

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

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

(JsonElement p_151207_0_, String p_151207_1_)

Source from the content-addressed store, hash-verified

256 * an error message needs to be thrown.
257 */
258 public static JsonArray getJsonArray(JsonElement p_151207_0_, String p_151207_1_)
259 {
260 if (p_151207_0_.isJsonArray())
261 {
262 return p_151207_0_.getAsJsonArray();
263 }
264 else
265 {
266 throw new JsonSyntaxException("Expected " + p_151207_1_ + " to be a JsonArray, was " + toString(p_151207_0_));
267 }
268 }
269
270 /**
271 * Gets the JsonArray field on the JsonObject with the given name.

Callers 11

deserializeMethod · 0.95
parseUVMethod · 0.95
getModelElementsMethod · 0.95
parsePositionMethod · 0.95
parseVector3fMethod · 0.95
ShaderManagerMethod · 0.95
parseUniformMethod · 0.95
parsePassMethod · 0.95
initUniformMethod · 0.95
deserializeMethod · 0.95
deserializeMethod · 0.95

Calls 3

toStringMethod · 0.95
isJsonArrayMethod · 0.80
getMethod · 0.65

Tested by

no test coverage detected