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

Method getBoolean

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

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

(JsonElement p_151216_0_, String p_151216_1_)

Source from the content-addressed store, hash-verified

99 * field if an error message needs to be thrown.
100 */
101 public static boolean getBoolean(JsonElement p_151216_0_, String p_151216_1_)
102 {
103 if (p_151216_0_.isJsonPrimitive())
104 {
105 return p_151216_0_.getAsBoolean();
106 }
107 else
108 {
109 throw new JsonSyntaxException("Expected " + p_151216_1_ + " to be a Boolean, was " + toString(p_151216_0_));
110 }
111 }
112
113 /**
114 * Gets the boolean value of the field on the JsonObject with the given name.

Callers 15

deserializeMethod · 0.95
deserializeMethod · 0.95
deserializeMethod · 0.95
parseUvLockMethod · 0.95
deserializeMethod · 0.95
parseRotationMethod · 0.95
ShaderManagerMethod · 0.95
parsePassMethod · 0.95
deserializeMethod · 0.95
deserializeMethod · 0.95

Calls 3

toStringMethod · 0.95
isJsonPrimitiveMethod · 0.80
getMethod · 0.65

Tested by

no test coverage detected