Interface Decodable<T,U>

Type Parameters:
T - the family this decoder produces
U - the Minecraft type this decoder reads
All Known Implementing Classes:
DecoderRegistry

@NullMarked @AsOf("3.3.0") public interface Decodable<T,U>
Builds a wrapper from the Minecraft object it wraps, the inverse of Wrapper.toMinecraft().
Since:
3.3.0
  • Method Summary

    Modifier and Type
    Method
    Description
    decode(U minecraftObject)
    Decodes a Minecraft value into the Wyck type owned by this decoder.
    default Set<ResourceKey>
    The type keys this decoder claims within a DecoderRegistry, empty when its family has a single implementation and is not dispatched.
  • Method Details

    • decode

      @AsOf("3.3.0") T decode(U minecraftObject)
      Decodes a Minecraft value into the Wyck type owned by this decoder.
      Parameters:
      minecraftObject - the Minecraft object to read
      Returns:
      the wrapper for that object
      Since:
      3.3.0
    • types

      @AsOf("3.3.0") default Set<ResourceKey> types()
      The type keys this decoder claims within a DecoderRegistry, empty when its family has a single implementation and is not dispatched.
      Returns:
      the type keys this decoder claims
      Since:
      3.3.0