Class SoundsJson

java.lang.Object
com.minecolonies.core.generation.SoundsJson
All Implemented Interfaces:
IJsonSerializable

public class SoundsJson extends Object implements IJsonSerializable
  • Constructor Details

    • SoundsJson

      public SoundsJson()
    • SoundsJson

      public SoundsJson(@NotNull @NotNull Map<String[],List<String>> sounds)
  • Method Details

    • ensureTreeMap

      public static <K, V> Map<K,V> ensureTreeMap(Map<K,V> map)
    • createSoundJson

      public static com.google.gson.JsonObject createSoundJson(String category, com.google.gson.JsonObject properties, List<String> names)
      Creates a sound json object for the list of names and its properties
      Parameters:
      category - category to set
      properties - JsonObject properties to use
      names - List of names to set
      Returns:
      new JsonObject
    • serialize

      @NotNull public @NotNull com.google.gson.JsonElement serialize()
      Specified by:
      serialize in interface IJsonSerializable
    • deserialize

      public void deserialize(@NotNull @NotNull com.google.gson.JsonElement jsonElement)
      Specified by:
      deserialize in interface IJsonSerializable