Package net.minecraft.util
Class JsonHelper
java.lang.Object
net.minecraft.util.JsonHelper
- Mappings:
Namespace Name official ohintermediary net/minecraft/class_2145named net/minecraft/util/JsonHelper
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic JsonArrayasArray(JsonElement element, String name) static booleanasBoolean(JsonElement element, String name) static floatasFloat(JsonElement element, String name) static intasInt(JsonElement element, String name) static JsonObjectasObject(JsonElement element, String name) static StringasString(JsonElement element, String name) static JsonArraygetArray(JsonObject object, String element) static JsonArraygetArray(JsonObject object, String name, JsonArray defaultArray) static booleangetBoolean(JsonObject object, String element) static booleangetBoolean(JsonObject object, String element, boolean defaultBoolean) static floatgetFloat(JsonObject object, String element) static floatgetFloat(JsonObject object, String element, float defaultFloat) static intgetInt(JsonObject object, String element) static intgetInt(JsonObject object, String element, int defaultInt) static JsonObjectgetObject(JsonObject object, String element, JsonObject defaultObject) static StringgetString(JsonObject object, String element) static StringgetString(JsonObject object, String element, String defaultStr) static StringgetType(JsonElement element) static booleanhasArray(JsonObject object, String element) static booleanhasElement(JsonObject object, String lement) static booleanhasPrimitive(JsonObject object, String element) static booleanhasString(JsonObject object, String element) static booleanisString(JsonElement element)
-
Constructor Details
-
JsonHelper
public JsonHelper()
-
-
Method Details
-
hasString
- Mappings:
Namespace Name Mixin selector official aLoh;a(Lcom/google/gson/JsonObject;Ljava/lang/String;)Zintermediary method_8307Lnet/minecraft/class_2145;method_8307(Lcom/google/gson/JsonObject;Ljava/lang/String;)Znamed hasStringLnet/minecraft/util/JsonHelper;hasString(Lcom/google/gson/JsonObject;Ljava/lang/String;)Z
-
isString
- Mappings:
Namespace Name Mixin selector official aLoh;a(Lcom/google/gson/JsonElement;)Zintermediary method_8305Lnet/minecraft/class_2145;method_8305(Lcom/google/gson/JsonElement;)Znamed isStringLnet/minecraft/util/JsonHelper;isString(Lcom/google/gson/JsonElement;)Z
-
hasArray
- Mappings:
Namespace Name Mixin selector official dLoh;d(Lcom/google/gson/JsonObject;Ljava/lang/String;)Zintermediary method_8317Lnet/minecraft/class_2145;method_8317(Lcom/google/gson/JsonObject;Ljava/lang/String;)Znamed hasArrayLnet/minecraft/util/JsonHelper;hasArray(Lcom/google/gson/JsonObject;Ljava/lang/String;)Z
-
hasPrimitive
- Mappings:
Namespace Name Mixin selector official fLoh;f(Lcom/google/gson/JsonObject;Ljava/lang/String;)Zintermediary method_8319Lnet/minecraft/class_2145;method_8319(Lcom/google/gson/JsonObject;Ljava/lang/String;)Znamed hasPrimitiveLnet/minecraft/util/JsonHelper;hasPrimitive(Lcom/google/gson/JsonObject;Ljava/lang/String;)Z
-
hasElement
- Mappings:
Namespace Name Mixin selector official gLoh;g(Lcom/google/gson/JsonObject;Ljava/lang/String;)Zintermediary method_8320Lnet/minecraft/class_2145;method_8320(Lcom/google/gson/JsonObject;Ljava/lang/String;)Znamed hasElementLnet/minecraft/util/JsonHelper;hasElement(Lcom/google/gson/JsonObject;Ljava/lang/String;)Z
-
asString
- Mappings:
Namespace Name Mixin selector official aLoh;a(Lcom/google/gson/JsonElement;Ljava/lang/String;)Ljava/lang/String;intermediary method_8306Lnet/minecraft/class_2145;method_8306(Lcom/google/gson/JsonElement;Ljava/lang/String;)Ljava/lang/String;named asStringLnet/minecraft/util/JsonHelper;asString(Lcom/google/gson/JsonElement;Ljava/lang/String;)Ljava/lang/String;
-
getString
- Mappings:
Namespace Name Mixin selector official hLoh;h(Lcom/google/gson/JsonObject;Ljava/lang/String;)Ljava/lang/String;intermediary method_8321Lnet/minecraft/class_2145;method_8321(Lcom/google/gson/JsonObject;Ljava/lang/String;)Ljava/lang/String;named getStringLnet/minecraft/util/JsonHelper;getString(Lcom/google/gson/JsonObject;Ljava/lang/String;)Ljava/lang/String;
-
getString
@Environment(CLIENT) public static String getString(JsonObject object, String element, String defaultStr) - Mappings:
Namespace Name Mixin selector official aLoh;a(Lcom/google/gson/JsonObject;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;intermediary method_8312Lnet/minecraft/class_2145;method_8312(Lcom/google/gson/JsonObject;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;named getStringLnet/minecraft/util/JsonHelper;getString(Lcom/google/gson/JsonObject;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
-
asBoolean
- Mappings:
Namespace Name Mixin selector official bLoh;b(Lcom/google/gson/JsonElement;Ljava/lang/String;)Zintermediary method_8314Lnet/minecraft/class_2145;method_8314(Lcom/google/gson/JsonElement;Ljava/lang/String;)Znamed asBooleanLnet/minecraft/util/JsonHelper;asBoolean(Lcom/google/gson/JsonElement;Ljava/lang/String;)Z
-
getBoolean
- Mappings:
Namespace Name Mixin selector official iLoh;i(Lcom/google/gson/JsonObject;Ljava/lang/String;)Zintermediary method_8322Lnet/minecraft/class_2145;method_8322(Lcom/google/gson/JsonObject;Ljava/lang/String;)Znamed getBooleanLnet/minecraft/util/JsonHelper;getBoolean(Lcom/google/gson/JsonObject;Ljava/lang/String;)Z
-
getBoolean
@Environment(CLIENT) public static boolean getBoolean(JsonObject object, String element, boolean defaultBoolean) - Mappings:
Namespace Name Mixin selector official aLoh;a(Lcom/google/gson/JsonObject;Ljava/lang/String;Z)Zintermediary method_8313Lnet/minecraft/class_2145;method_8313(Lcom/google/gson/JsonObject;Ljava/lang/String;Z)Znamed getBooleanLnet/minecraft/util/JsonHelper;getBoolean(Lcom/google/gson/JsonObject;Ljava/lang/String;Z)Z
-
asFloat
- Mappings:
Namespace Name Mixin selector official dLoh;d(Lcom/google/gson/JsonElement;Ljava/lang/String;)Fintermediary method_8316Lnet/minecraft/class_2145;method_8316(Lcom/google/gson/JsonElement;Ljava/lang/String;)Fnamed asFloatLnet/minecraft/util/JsonHelper;asFloat(Lcom/google/gson/JsonElement;Ljava/lang/String;)F
-
getFloat
- Mappings:
Namespace Name Mixin selector official kLoh;k(Lcom/google/gson/JsonObject;Ljava/lang/String;)Fintermediary method_8323Lnet/minecraft/class_2145;method_8323(Lcom/google/gson/JsonObject;Ljava/lang/String;)Fnamed getFloatLnet/minecraft/util/JsonHelper;getFloat(Lcom/google/gson/JsonObject;Ljava/lang/String;)F
-
getFloat
@Environment(CLIENT) public static float getFloat(JsonObject object, String element, float defaultFloat) - Mappings:
Namespace Name Mixin selector official aLoh;a(Lcom/google/gson/JsonObject;Ljava/lang/String;F)Fintermediary method_8308Lnet/minecraft/class_2145;method_8308(Lcom/google/gson/JsonObject;Ljava/lang/String;F)Fnamed getFloatLnet/minecraft/util/JsonHelper;getFloat(Lcom/google/gson/JsonObject;Ljava/lang/String;F)F
-
asInt
- Mappings:
Namespace Name Mixin selector official fLoh;f(Lcom/google/gson/JsonElement;Ljava/lang/String;)Iintermediary method_8318Lnet/minecraft/class_2145;method_8318(Lcom/google/gson/JsonElement;Ljava/lang/String;)Inamed asIntLnet/minecraft/util/JsonHelper;asInt(Lcom/google/gson/JsonElement;Ljava/lang/String;)I
-
getInt
- Mappings:
Namespace Name Mixin selector official mLoh;m(Lcom/google/gson/JsonObject;Ljava/lang/String;)Iintermediary method_8326Lnet/minecraft/class_2145;method_8326(Lcom/google/gson/JsonObject;Ljava/lang/String;)Inamed getIntLnet/minecraft/util/JsonHelper;getInt(Lcom/google/gson/JsonObject;Ljava/lang/String;)I
-
getInt
- Mappings:
Namespace Name Mixin selector official aLoh;a(Lcom/google/gson/JsonObject;Ljava/lang/String;I)Iintermediary method_8309Lnet/minecraft/class_2145;method_8309(Lcom/google/gson/JsonObject;Ljava/lang/String;I)Inamed getIntLnet/minecraft/util/JsonHelper;getInt(Lcom/google/gson/JsonObject;Ljava/lang/String;I)I
-
asObject
- Mappings:
Namespace Name Mixin selector official lLoh;l(Lcom/google/gson/JsonElement;Ljava/lang/String;)Lcom/google/gson/JsonObject;intermediary method_8324Lnet/minecraft/class_2145;method_8324(Lcom/google/gson/JsonElement;Ljava/lang/String;)Lcom/google/gson/JsonObject;named asObjectLnet/minecraft/util/JsonHelper;asObject(Lcom/google/gson/JsonElement;Ljava/lang/String;)Lcom/google/gson/JsonObject;
-
getObject
@Environment(CLIENT) public static JsonObject getObject(JsonObject object, String element, JsonObject defaultObject) - Mappings:
Namespace Name Mixin selector official aLoh;a(Lcom/google/gson/JsonObject;Ljava/lang/String;Lcom/google/gson/JsonObject;)Lcom/google/gson/JsonObject;intermediary method_8311Lnet/minecraft/class_2145;method_8311(Lcom/google/gson/JsonObject;Ljava/lang/String;Lcom/google/gson/JsonObject;)Lcom/google/gson/JsonObject;named getObjectLnet/minecraft/util/JsonHelper;getObject(Lcom/google/gson/JsonObject;Ljava/lang/String;Lcom/google/gson/JsonObject;)Lcom/google/gson/JsonObject;
-
asArray
- Mappings:
Namespace Name Mixin selector official mLoh;m(Lcom/google/gson/JsonElement;Ljava/lang/String;)Lcom/google/gson/JsonArray;intermediary method_8325Lnet/minecraft/class_2145;method_8325(Lcom/google/gson/JsonElement;Ljava/lang/String;)Lcom/google/gson/JsonArray;named asArrayLnet/minecraft/util/JsonHelper;asArray(Lcom/google/gson/JsonElement;Ljava/lang/String;)Lcom/google/gson/JsonArray;
-
getArray
- Mappings:
Namespace Name Mixin selector official tLoh;t(Lcom/google/gson/JsonObject;Ljava/lang/String;)Lcom/google/gson/JsonArray;intermediary method_8328Lnet/minecraft/class_2145;method_8328(Lcom/google/gson/JsonObject;Ljava/lang/String;)Lcom/google/gson/JsonArray;named getArrayLnet/minecraft/util/JsonHelper;getArray(Lcom/google/gson/JsonObject;Ljava/lang/String;)Lcom/google/gson/JsonArray;
-
getArray
@Environment(CLIENT) public static JsonArray getArray(JsonObject object, String name, JsonArray defaultArray) - Mappings:
Namespace Name Mixin selector official aLoh;a(Lcom/google/gson/JsonObject;Ljava/lang/String;Lcom/google/gson/JsonArray;)Lcom/google/gson/JsonArray;intermediary method_8310Lnet/minecraft/class_2145;method_8310(Lcom/google/gson/JsonObject;Ljava/lang/String;Lcom/google/gson/JsonArray;)Lcom/google/gson/JsonArray;named getArrayLnet/minecraft/util/JsonHelper;getArray(Lcom/google/gson/JsonObject;Ljava/lang/String;Lcom/google/gson/JsonArray;)Lcom/google/gson/JsonArray;
-
getType
- Mappings:
Namespace Name Mixin selector official dLoh;d(Lcom/google/gson/JsonElement;)Ljava/lang/String;intermediary method_8315Lnet/minecraft/class_2145;method_8315(Lcom/google/gson/JsonElement;)Ljava/lang/String;named getTypeLnet/minecraft/util/JsonHelper;getType(Lcom/google/gson/JsonElement;)Ljava/lang/String;
-