Class JsonDataLoader<T>

All Implemented Interfaces:
ResourceReloader
Direct Known Subclasses:
EquipmentModelLoader, ServerAdvancementLoader

public abstract class JsonDataLoader<T> extends SinglePreparationResourceReloader<Map<Identifier,T>>
An abstract implementation of resource reloader that reads JSON files into values in the prepare stage.
Mappings:
Namespace Name
named net/minecraft/resource/JsonDataLoader
intermediary net/minecraft/class_4309
official avz
  • Field Details

    • LOGGER

      private static final Logger LOGGER
      Mappings:
      Namespace Name Mixin selector
      named LOGGER Lnet/minecraft/resource/JsonDataLoader;LOGGER:Lorg/slf4j/Logger;
      intermediary field_19377 Lnet/minecraft/class_4309;field_19377:Lorg/slf4j/Logger;
      official a Lavz;a:Lorg/slf4j/Logger;
    • ops

      private final com.mojang.serialization.DynamicOps<JsonElement> ops
      Mappings:
      Namespace Name Mixin selector
      named ops Lnet/minecraft/resource/JsonDataLoader;ops:Lcom/mojang/serialization/DynamicOps;
      intermediary field_54055 Lnet/minecraft/class_4309;field_54055:Lcom/mojang/serialization/DynamicOps;
      official b Lavz;b:Lcom/mojang/serialization/DynamicOps;
    • codec

      private final com.mojang.serialization.Codec<T> codec
      Mappings:
      Namespace Name Mixin selector
      named codec Lnet/minecraft/resource/JsonDataLoader;codec:Lcom/mojang/serialization/Codec;
      intermediary field_54056 Lnet/minecraft/class_4309;field_54056:Lcom/mojang/serialization/Codec;
      official c Lavz;c:Lcom/mojang/serialization/Codec;
    • dataType

      private final String dataType
      Mappings:
      Namespace Name Mixin selector
      named dataType Lnet/minecraft/resource/JsonDataLoader;dataType:Ljava/lang/String;
      intermediary field_19380 Lnet/minecraft/class_4309;field_19380:Ljava/lang/String;
      official d Lavz;d:Ljava/lang/String;
  • Constructor Details

    • JsonDataLoader

      protected JsonDataLoader(RegistryWrapper.WrapperLookup registries, com.mojang.serialization.Codec<T> codec, String dataType)
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/resource/JsonDataLoader;<init>(Lnet/minecraft/registry/RegistryWrapper$WrapperLookup;Lcom/mojang/serialization/Codec;Ljava/lang/String;)V
      intermediary <init> Lnet/minecraft/class_4309;<init>(Lnet/minecraft/class_7225$class_7874;Lcom/mojang/serialization/Codec;Ljava/lang/String;)V
      official <init> Lavz;<init>(Ljs$a;Lcom/mojang/serialization/Codec;Ljava/lang/String;)V
    • JsonDataLoader

      protected JsonDataLoader(com.mojang.serialization.Codec<T> codec, String dataType)
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/resource/JsonDataLoader;<init>(Lcom/mojang/serialization/Codec;Ljava/lang/String;)V
      intermediary <init> Lnet/minecraft/class_4309;<init>(Lcom/mojang/serialization/Codec;Ljava/lang/String;)V
      official <init> Lavz;<init>(Lcom/mojang/serialization/Codec;Ljava/lang/String;)V
    • JsonDataLoader

      private JsonDataLoader(com.mojang.serialization.DynamicOps<JsonElement> ops, com.mojang.serialization.Codec<T> codec, String dataType)
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/resource/JsonDataLoader;<init>(Lcom/mojang/serialization/DynamicOps;Lcom/mojang/serialization/Codec;Ljava/lang/String;)V
      intermediary <init> Lnet/minecraft/class_4309;<init>(Lcom/mojang/serialization/DynamicOps;Lcom/mojang/serialization/Codec;Ljava/lang/String;)V
      official <init> Lavz;<init>(Lcom/mojang/serialization/DynamicOps;Lcom/mojang/serialization/Codec;Ljava/lang/String;)V
  • Method Details

    • prepare

      protected Map<Identifier,T> prepare(ResourceManager resourceManager, Profiler profiler)
      Description copied from class: SinglePreparationResourceReloader
      Prepares the intermediate object.

      This method is called in the prepare executor in a reload.

      Specified by:
      prepare in class SinglePreparationResourceReloader<Map<Identifier,T>>
      Parameters:
      resourceManager - the resource manager
      profiler - the prepare profiler
      Returns:
      the prepared object
      Mappings:
      Namespace Name Mixin selector
      named prepare Lnet/minecraft/resource/JsonDataLoader;prepare(Lnet/minecraft/resource/ResourceManager;Lnet/minecraft/util/profiler/Profiler;)Ljava/util/Map;
      intermediary method_20731 Lnet/minecraft/class_4309;method_20731(Lnet/minecraft/class_3300;Lnet/minecraft/class_3695;)Ljava/util/Map;
      official a Lavz;a(Lavv;Lbps;)Ljava/util/Map;
    • load

      public static <T> void load(ResourceManager manager, String dataType, com.mojang.serialization.DynamicOps<JsonElement> ops, com.mojang.serialization.Codec<T> codec, Map<Identifier,T> result)
      Mappings:
      Namespace Name Mixin selector
      named load Lnet/minecraft/resource/JsonDataLoader;load(Lnet/minecraft/resource/ResourceManager;Ljava/lang/String;Lcom/mojang/serialization/DynamicOps;Lcom/mojang/serialization/Codec;Ljava/util/Map;)V
      intermediary method_51148 Lnet/minecraft/class_4309;method_51148(Lnet/minecraft/class_3300;Ljava/lang/String;Lcom/mojang/serialization/DynamicOps;Lcom/mojang/serialization/Codec;Ljava/util/Map;)V
      official a Lavz;a(Lavv;Ljava/lang/String;Lcom/mojang/serialization/DynamicOps;Lcom/mojang/serialization/Codec;Ljava/util/Map;)V