Interface BiomeDataConverter<T>

Type Parameters:
T - Your target data type
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface BiomeDataConverter<T>
A simple functional interface for converting a JsonElement into the desired data type needed for your BiomeMap.
Author:
TheBusyBiscuit
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    convert(com.google.gson.JsonElement jsonElement)
    Override this method and provide a way to convert a JsonElement into your desired data type.
  • Method Details

    • convert

      @Nonnull T convert(@Nonnull com.google.gson.JsonElement jsonElement)
      Override this method and provide a way to convert a JsonElement into your desired data type.

      For primitive data values, you can also just use the following method references:

      • JsonElement::getAsString
      • JsonElement::getAsInt
      • JsonElement::getAsDouble
      • JsonElement::getAsFloat
      • JsonElement::getAsLong
      • JsonElement::getAsBoolean
      or similar.
      Parameters:
      jsonElement - The JsonElement to convert
      Returns:
      Your desired data type.