Class JsonHelper

java.lang.Object
net.minecraft.util.JsonHelper

public class JsonHelper extends Object
Mappings:
Namespace Name
official oe
intermediary net/minecraft/class_2145
named net/minecraft/util/JsonHelper
  • Constructor Details

    • JsonHelper

      public JsonHelper()
  • Method Details

    • hasString

      public static boolean hasString(JsonObject object, String element)
      Mappings:
      Namespace Name Mixin selector
      official a Loe;a(Lcom/google/gson/JsonObject;Ljava/lang/String;)Z
      intermediary method_8307 Lnet/minecraft/class_2145;method_8307(Lcom/google/gson/JsonObject;Ljava/lang/String;)Z
      named hasString Lnet/minecraft/util/JsonHelper;hasString(Lcom/google/gson/JsonObject;Ljava/lang/String;)Z
    • isString

      @Environment(CLIENT) public static boolean isString(JsonElement element)
      Mappings:
      Namespace Name Mixin selector
      official a Loe;a(Lcom/google/gson/JsonElement;)Z
      intermediary method_8305 Lnet/minecraft/class_2145;method_8305(Lcom/google/gson/JsonElement;)Z
      named isString Lnet/minecraft/util/JsonHelper;isString(Lcom/google/gson/JsonElement;)Z
    • isNumber

      public static boolean isNumber(JsonElement element)
      Mappings:
      Namespace Name Mixin selector
      official b Loe;b(Lcom/google/gson/JsonElement;)Z
      intermediary method_12874 Lnet/minecraft/class_2145;method_12874(Lcom/google/gson/JsonElement;)Z
      named isNumber Lnet/minecraft/util/JsonHelper;isNumber(Lcom/google/gson/JsonElement;)Z
    • hasBoolean

      @Environment(CLIENT) public static boolean hasBoolean(JsonObject object, String element)
      Mappings:
      Namespace Name Mixin selector
      official c Loe;c(Lcom/google/gson/JsonObject;Ljava/lang/String;)Z
      intermediary method_10834 Lnet/minecraft/class_2145;method_10834(Lcom/google/gson/JsonObject;Ljava/lang/String;)Z
      named hasBoolean Lnet/minecraft/util/JsonHelper;hasBoolean(Lcom/google/gson/JsonObject;Ljava/lang/String;)Z
    • hasArray

      public static boolean hasArray(JsonObject object, String element)
      Mappings:
      Namespace Name Mixin selector
      official d Loe;d(Lcom/google/gson/JsonObject;Ljava/lang/String;)Z
      intermediary method_8317 Lnet/minecraft/class_2145;method_8317(Lcom/google/gson/JsonObject;Ljava/lang/String;)Z
      named hasArray Lnet/minecraft/util/JsonHelper;hasArray(Lcom/google/gson/JsonObject;Ljava/lang/String;)Z
    • hasPrimitive

      public static boolean hasPrimitive(JsonObject object, String element)
      Mappings:
      Namespace Name Mixin selector
      official f Loe;f(Lcom/google/gson/JsonObject;Ljava/lang/String;)Z
      intermediary method_8319 Lnet/minecraft/class_2145;method_8319(Lcom/google/gson/JsonObject;Ljava/lang/String;)Z
      named hasPrimitive Lnet/minecraft/util/JsonHelper;hasPrimitive(Lcom/google/gson/JsonObject;Ljava/lang/String;)Z
    • hasElement

      public static boolean hasElement(JsonObject object, String lement)
      Mappings:
      Namespace Name Mixin selector
      official g Loe;g(Lcom/google/gson/JsonObject;Ljava/lang/String;)Z
      intermediary method_8320 Lnet/minecraft/class_2145;method_8320(Lcom/google/gson/JsonObject;Ljava/lang/String;)Z
      named hasElement Lnet/minecraft/util/JsonHelper;hasElement(Lcom/google/gson/JsonObject;Ljava/lang/String;)Z
    • asString

      public static String asString(JsonElement element, String name)
      Mappings:
      Namespace Name Mixin selector
      official a Loe;a(Lcom/google/gson/JsonElement;Ljava/lang/String;)Ljava/lang/String;
      intermediary method_8306 Lnet/minecraft/class_2145;method_8306(Lcom/google/gson/JsonElement;Ljava/lang/String;)Ljava/lang/String;
      named asString Lnet/minecraft/util/JsonHelper;asString(Lcom/google/gson/JsonElement;Ljava/lang/String;)Ljava/lang/String;
    • getString

      public static String getString(JsonObject object, String element)
      Mappings:
      Namespace Name Mixin selector
      official h Loe;h(Lcom/google/gson/JsonObject;Ljava/lang/String;)Ljava/lang/String;
      intermediary method_8321 Lnet/minecraft/class_2145;method_8321(Lcom/google/gson/JsonObject;Ljava/lang/String;)Ljava/lang/String;
      named getString Lnet/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 a Loe;a(Lcom/google/gson/JsonObject;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
      intermediary method_8312 Lnet/minecraft/class_2145;method_8312(Lcom/google/gson/JsonObject;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
      named getString Lnet/minecraft/util/JsonHelper;getString(Lcom/google/gson/JsonObject;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
    • asItem

      public static Item asItem(JsonElement element, String name)
      Mappings:
      Namespace Name Mixin selector
      official b Loe;b(Lcom/google/gson/JsonElement;Ljava/lang/String;)Lado;
      intermediary method_12875 Lnet/minecraft/class_2145;method_12875(Lcom/google/gson/JsonElement;Ljava/lang/String;)Lnet/minecraft/class_1069;
      named asItem Lnet/minecraft/util/JsonHelper;asItem(Lcom/google/gson/JsonElement;Ljava/lang/String;)Lnet/minecraft/item/Item;
    • getItem

      public static Item getItem(JsonObject object, String element)
      Mappings:
      Namespace Name Mixin selector
      official i Loe;i(Lcom/google/gson/JsonObject;Ljava/lang/String;)Lado;
      intermediary method_12876 Lnet/minecraft/class_2145;method_12876(Lcom/google/gson/JsonObject;Ljava/lang/String;)Lnet/minecraft/class_1069;
      named getItem Lnet/minecraft/util/JsonHelper;getItem(Lcom/google/gson/JsonObject;Ljava/lang/String;)Lnet/minecraft/item/Item;
    • asBoolean

      public static boolean asBoolean(JsonElement element, String name)
      Mappings:
      Namespace Name Mixin selector
      official c Loe;c(Lcom/google/gson/JsonElement;Ljava/lang/String;)Z
      intermediary method_8314 Lnet/minecraft/class_2145;method_8314(Lcom/google/gson/JsonElement;Ljava/lang/String;)Z
      named asBoolean Lnet/minecraft/util/JsonHelper;asBoolean(Lcom/google/gson/JsonElement;Ljava/lang/String;)Z
    • getBoolean

      @Environment(CLIENT) public static boolean getBoolean(JsonObject object, String element)
      Mappings:
      Namespace Name Mixin selector
      official j Loe;j(Lcom/google/gson/JsonObject;Ljava/lang/String;)Z
      intermediary method_8322 Lnet/minecraft/class_2145;method_8322(Lcom/google/gson/JsonObject;Ljava/lang/String;)Z
      named getBoolean Lnet/minecraft/util/JsonHelper;getBoolean(Lcom/google/gson/JsonObject;Ljava/lang/String;)Z
    • getBoolean

      public static boolean getBoolean(JsonObject object, String element, boolean defaultBoolean)
      Mappings:
      Namespace Name Mixin selector
      official a Loe;a(Lcom/google/gson/JsonObject;Ljava/lang/String;Z)Z
      intermediary method_8313 Lnet/minecraft/class_2145;method_8313(Lcom/google/gson/JsonObject;Ljava/lang/String;Z)Z
      named getBoolean Lnet/minecraft/util/JsonHelper;getBoolean(Lcom/google/gson/JsonObject;Ljava/lang/String;Z)Z
    • asFloat

      public static float asFloat(JsonElement element, String name)
      Mappings:
      Namespace Name Mixin selector
      official e Loe;e(Lcom/google/gson/JsonElement;Ljava/lang/String;)F
      intermediary method_8316 Lnet/minecraft/class_2145;method_8316(Lcom/google/gson/JsonElement;Ljava/lang/String;)F
      named asFloat Lnet/minecraft/util/JsonHelper;asFloat(Lcom/google/gson/JsonElement;Ljava/lang/String;)F
    • getFloat

      public static float getFloat(JsonObject object, String element)
      Mappings:
      Namespace Name Mixin selector
      official l Loe;l(Lcom/google/gson/JsonObject;Ljava/lang/String;)F
      intermediary method_8323 Lnet/minecraft/class_2145;method_8323(Lcom/google/gson/JsonObject;Ljava/lang/String;)F
      named getFloat Lnet/minecraft/util/JsonHelper;getFloat(Lcom/google/gson/JsonObject;Ljava/lang/String;)F
    • getFloat

      public static float getFloat(JsonObject object, String element, float defaultFloat)
      Mappings:
      Namespace Name Mixin selector
      official a Loe;a(Lcom/google/gson/JsonObject;Ljava/lang/String;F)F
      intermediary method_8308 Lnet/minecraft/class_2145;method_8308(Lcom/google/gson/JsonObject;Ljava/lang/String;F)F
      named getFloat Lnet/minecraft/util/JsonHelper;getFloat(Lcom/google/gson/JsonObject;Ljava/lang/String;F)F
    • asInt

      public static int asInt(JsonElement element, String name)
      Mappings:
      Namespace Name Mixin selector
      official g Loe;g(Lcom/google/gson/JsonElement;Ljava/lang/String;)I
      intermediary method_8318 Lnet/minecraft/class_2145;method_8318(Lcom/google/gson/JsonElement;Ljava/lang/String;)I
      named asInt Lnet/minecraft/util/JsonHelper;asInt(Lcom/google/gson/JsonElement;Ljava/lang/String;)I
    • getInt

      public static int getInt(JsonObject object, String element)
      Mappings:
      Namespace Name Mixin selector
      official n Loe;n(Lcom/google/gson/JsonObject;Ljava/lang/String;)I
      intermediary method_8326 Lnet/minecraft/class_2145;method_8326(Lcom/google/gson/JsonObject;Ljava/lang/String;)I
      named getInt Lnet/minecraft/util/JsonHelper;getInt(Lcom/google/gson/JsonObject;Ljava/lang/String;)I
    • getInt

      public static int getInt(JsonObject object, String element, int defaultInt)
      Mappings:
      Namespace Name Mixin selector
      official a Loe;a(Lcom/google/gson/JsonObject;Ljava/lang/String;I)I
      intermediary method_8309 Lnet/minecraft/class_2145;method_8309(Lcom/google/gson/JsonObject;Ljava/lang/String;I)I
      named getInt Lnet/minecraft/util/JsonHelper;getInt(Lcom/google/gson/JsonObject;Ljava/lang/String;I)I
    • asObject

      public static JsonObject asObject(JsonElement element, String name)
      Mappings:
      Namespace Name Mixin selector
      official m Loe;m(Lcom/google/gson/JsonElement;Ljava/lang/String;)Lcom/google/gson/JsonObject;
      intermediary method_8324 Lnet/minecraft/class_2145;method_8324(Lcom/google/gson/JsonElement;Ljava/lang/String;)Lcom/google/gson/JsonObject;
      named asObject Lnet/minecraft/util/JsonHelper;asObject(Lcom/google/gson/JsonElement;Ljava/lang/String;)Lcom/google/gson/JsonObject;
    • getObject

      public static JsonObject getObject(JsonObject object, String element)
      Mappings:
      Namespace Name Mixin selector
      official t Loe;t(Lcom/google/gson/JsonObject;Ljava/lang/String;)Lcom/google/gson/JsonObject;
      intermediary method_8327 Lnet/minecraft/class_2145;method_8327(Lcom/google/gson/JsonObject;Ljava/lang/String;)Lcom/google/gson/JsonObject;
      named getObject Lnet/minecraft/util/JsonHelper;getObject(Lcom/google/gson/JsonObject;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 a Loe;a(Lcom/google/gson/JsonObject;Ljava/lang/String;Lcom/google/gson/JsonObject;)Lcom/google/gson/JsonObject;
      intermediary method_8311 Lnet/minecraft/class_2145;method_8311(Lcom/google/gson/JsonObject;Ljava/lang/String;Lcom/google/gson/JsonObject;)Lcom/google/gson/JsonObject;
      named getObject Lnet/minecraft/util/JsonHelper;getObject(Lcom/google/gson/JsonObject;Ljava/lang/String;Lcom/google/gson/JsonObject;)Lcom/google/gson/JsonObject;
    • asArray

      public static JsonArray asArray(JsonElement element, String name)
      Mappings:
      Namespace Name Mixin selector
      official n Loe;n(Lcom/google/gson/JsonElement;Ljava/lang/String;)Lcom/google/gson/JsonArray;
      intermediary method_8325 Lnet/minecraft/class_2145;method_8325(Lcom/google/gson/JsonElement;Ljava/lang/String;)Lcom/google/gson/JsonArray;
      named asArray Lnet/minecraft/util/JsonHelper;asArray(Lcom/google/gson/JsonElement;Ljava/lang/String;)Lcom/google/gson/JsonArray;
    • getArray

      public static JsonArray getArray(JsonObject object, String element)
      Mappings:
      Namespace Name Mixin selector
      official u Loe;u(Lcom/google/gson/JsonObject;Ljava/lang/String;)Lcom/google/gson/JsonArray;
      intermediary method_8328 Lnet/minecraft/class_2145;method_8328(Lcom/google/gson/JsonObject;Ljava/lang/String;)Lcom/google/gson/JsonArray;
      named getArray Lnet/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, @Nullable JsonArray defaultArray)
      Mappings:
      Namespace Name Mixin selector
      official a Loe;a(Lcom/google/gson/JsonObject;Ljava/lang/String;Lcom/google/gson/JsonArray;)Lcom/google/gson/JsonArray;
      intermediary method_8310 Lnet/minecraft/class_2145;method_8310(Lcom/google/gson/JsonObject;Ljava/lang/String;Lcom/google/gson/JsonArray;)Lcom/google/gson/JsonArray;
      named getArray Lnet/minecraft/util/JsonHelper;getArray(Lcom/google/gson/JsonObject;Ljava/lang/String;Lcom/google/gson/JsonArray;)Lcom/google/gson/JsonArray;
    • deserialize

      public static <T> T deserialize(@Nullable JsonElement element, String name, JsonDeserializationContext context, Class<? extends T> type)
      Mappings:
      Namespace Name Mixin selector
      official a Loe;a(Lcom/google/gson/JsonElement;Ljava/lang/String;Lcom/google/gson/JsonDeserializationContext;Ljava/lang/Class;)Ljava/lang/Object;
      intermediary method_12871 Lnet/minecraft/class_2145;method_12871(Lcom/google/gson/JsonElement;Ljava/lang/String;Lcom/google/gson/JsonDeserializationContext;Ljava/lang/Class;)Ljava/lang/Object;
      named deserialize Lnet/minecraft/util/JsonHelper;deserialize(Lcom/google/gson/JsonElement;Ljava/lang/String;Lcom/google/gson/JsonDeserializationContext;Ljava/lang/Class;)Ljava/lang/Object;
    • deserialize

      public static <T> T deserialize(JsonObject object, String element, JsonDeserializationContext context, Class<? extends T> type)
      Mappings:
      Namespace Name Mixin selector
      official a Loe;a(Lcom/google/gson/JsonObject;Ljava/lang/String;Lcom/google/gson/JsonDeserializationContext;Ljava/lang/Class;)Ljava/lang/Object;
      intermediary method_12872 Lnet/minecraft/class_2145;method_12872(Lcom/google/gson/JsonObject;Ljava/lang/String;Lcom/google/gson/JsonDeserializationContext;Ljava/lang/Class;)Ljava/lang/Object;
      named deserialize Lnet/minecraft/util/JsonHelper;deserialize(Lcom/google/gson/JsonObject;Ljava/lang/String;Lcom/google/gson/JsonDeserializationContext;Ljava/lang/Class;)Ljava/lang/Object;
    • deserialize

      public static <T> T deserialize(JsonObject object, String element, T defaultValue, JsonDeserializationContext context, Class<? extends T> type)
      Mappings:
      Namespace Name Mixin selector
      official a Loe;a(Lcom/google/gson/JsonObject;Ljava/lang/String;Ljava/lang/Object;Lcom/google/gson/JsonDeserializationContext;Ljava/lang/Class;)Ljava/lang/Object;
      intermediary method_12873 Lnet/minecraft/class_2145;method_12873(Lcom/google/gson/JsonObject;Ljava/lang/String;Ljava/lang/Object;Lcom/google/gson/JsonDeserializationContext;Ljava/lang/Class;)Ljava/lang/Object;
      named deserialize Lnet/minecraft/util/JsonHelper;deserialize(Lcom/google/gson/JsonObject;Ljava/lang/String;Ljava/lang/Object;Lcom/google/gson/JsonDeserializationContext;Ljava/lang/Class;)Ljava/lang/Object;
    • getType

      public static String getType(JsonElement element)
      Mappings:
      Namespace Name Mixin selector
      official d Loe;d(Lcom/google/gson/JsonElement;)Ljava/lang/String;
      intermediary method_8315 Lnet/minecraft/class_2145;method_8315(Lcom/google/gson/JsonElement;)Ljava/lang/String;
      named getType Lnet/minecraft/util/JsonHelper;getType(Lcom/google/gson/JsonElement;)Ljava/lang/String;
    • deserialize

      public static <T> T deserialize(Gson gson, Reader reader, Class<T> class2, boolean lenient)
      Mappings:
      Namespace Name Mixin selector
      official a Loe;a(Lcom/google/gson/Gson;Ljava/io/Reader;Ljava/lang/Class;Z)Ljava/lang/Object;
      intermediary method_12868 Lnet/minecraft/class_2145;method_12868(Lcom/google/gson/Gson;Ljava/io/Reader;Ljava/lang/Class;Z)Ljava/lang/Object;
      named deserialize Lnet/minecraft/util/JsonHelper;deserialize(Lcom/google/gson/Gson;Ljava/io/Reader;Ljava/lang/Class;Z)Ljava/lang/Object;
    • deserialize

      public static <T> T deserialize(Gson gson, String content, Class<T> class2)
      Mappings:
      Namespace Name Mixin selector
      official a Loe;a(Lcom/google/gson/Gson;Ljava/lang/String;Ljava/lang/Class;)Ljava/lang/Object;
      intermediary method_12869 Lnet/minecraft/class_2145;method_12869(Lcom/google/gson/Gson;Ljava/lang/String;Ljava/lang/Class;)Ljava/lang/Object;
      named deserialize Lnet/minecraft/util/JsonHelper;deserialize(Lcom/google/gson/Gson;Ljava/lang/String;Ljava/lang/Class;)Ljava/lang/Object;
    • deserialize

      public static <T> T deserialize(Gson gson, String content, Class<T> class2, boolean lenient)
      Mappings:
      Namespace Name Mixin selector
      official a Loe;a(Lcom/google/gson/Gson;Ljava/lang/String;Ljava/lang/Class;Z)Ljava/lang/Object;
      intermediary method_12870 Lnet/minecraft/class_2145;method_12870(Lcom/google/gson/Gson;Ljava/lang/String;Ljava/lang/Class;Z)Ljava/lang/Object;
      named deserialize Lnet/minecraft/util/JsonHelper;deserialize(Lcom/google/gson/Gson;Ljava/lang/String;Ljava/lang/Class;Z)Ljava/lang/Object;