commoble.databuddy.data

## Class SimpleJsonDataManager<T>

- java.lang.Object
- - net.minecraft.client.resources.ReloadListener<java.util.Map<net.minecraft.util.ResourceLocation,com.google.gson.JsonElement>>
  - - net.minecraft.client.resources.JsonReloadListener
    - - commoble.databuddy.data.SimpleJsonDataManager<T>

All Implemented Interfaces:
  net.minecraft.resources.IFutureReloadListener

Deprecated.

    @Deprecated
    public class SimpleJsonDataManager<T>
    extends net.minecraft.client.resources.JsonReloadListener

### Nested Class Summary

### Nested classes/interfaces inherited from interface net.minecraft.resources.IFutureReloadListener

`net.minecraft.resources.IFutureReloadListener.IStage`

### Field Summary

Fields
`protected java.util.Map<net.minecraft.util.ResourceLocation,T>` `data` Deprecated. The raw data that we parsed from json last time resources were reloaded

### Constructor Summary

Constructors
Constructor and Description
`SimpleJsonDataManager(java.lang.String folder, java.lang.Class<T> dataClass)` Deprecated.

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods
`protected void` `apply(java.util.Map<net.minecraft.util.ResourceLocation,com.google.gson.JsonElement> jsons, net.minecraft.resources.IResourceManager manager, net.minecraft.profiler.IProfiler profiler)` Deprecated. Called on resource reload, the jsons have already been found for us and we just need to parse them in here
`T` `getData(net.minecraft.util.ResourceLocation id)` Deprecated. Get the data object represented by the json at the given resource location
`protected T` `getJsonAsData(com.google.gson.JsonElement json)` Deprecated. Use a json object (presumably one from an assets/modid/asset_type/ or data/modid/data_type/ folder) to generate a data object
`static <KEY,IN,OUT> java.util.Map<KEY,OUT>` `mapValues(java.util.Map<KEY,IN> inputs, java.util.function.Function<IN,OUT> mapper)` Deprecated. Converts all the values in a map to new values; the new map uses the same keys as the old map

### Methods inherited from class net.minecraft.client.resources.JsonReloadListener

`getPreparedPath, prepare`

### Methods inherited from class net.minecraft.client.resources.ReloadListener

`reload`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface net.minecraft.resources.IFutureReloadListener

`getSimpleName`

### Field Detail

#### data

    protected java.util.Map<net.minecraft.util.ResourceLocation,T> data

Deprecated.
The raw data that we parsed from json last time resources were reloaded

### Constructor Detail

#### SimpleJsonDataManager

    public SimpleJsonDataManager(java.lang.String folder,
                                 java.lang.Class<T> dataClass)

Deprecated.

Parameters:
  `folder` - This is the name of the folders that the resource loader looks in, e.g. assets/modid/FOLDER
  `dataClass` - the class to convert jsons into

### Method Detail

#### getData

    public T getData(net.minecraft.util.ResourceLocation id)

Deprecated.
Get the data object represented by the json at the given resource location

Parameters:
  `id` - The key for the object
Returns:
  The object, or null if there is no object associated with the given key

#### apply

    protected void apply(java.util.Map<net.minecraft.util.ResourceLocation,com.google.gson.JsonElement> jsons,
                         net.minecraft.resources.IResourceManager manager,
                         net.minecraft.profiler.IProfiler profiler)

Deprecated.
Called on resource reload, the jsons have already been found for us and we just need to parse them in here

Specified by:
  `apply` in class `net.minecraft.client.resources.ReloadListener<java.util.Map<net.minecraft.util.ResourceLocation,com.google.gson.JsonElement>>`

#### getJsonAsData

    protected T getJsonAsData(com.google.gson.JsonElement json)

Deprecated.
Use a json object (presumably one from an assets/modid/asset_type/ or data/modid/data_type/ folder) to generate a data object

Parameters:
  `json` - The json element that GSON parsed a json into
Returns:
  the finalized object

#### mapValues

    public static <KEY,IN,OUT> java.util.Map<KEY,OUT> mapValues(java.util.Map<KEY,IN> inputs,
                                                                java.util.function.Function<IN,OUT> mapper)

Deprecated.
Converts all the values in a map to new values; the new map uses the same keys as the old map

Type Parameters:
  `KEY` - The type of the maps' keys
  `IN` - The type of the input map's values
  `OUT` - The type of the output map's values
Parameters:
  `inputs` - The input map
  `mapper` - A function that converts the input map's values to the output map's values
Returns:
  A map with the same keys as the input map but whose values have been transformed