Class CodecUtil

java.lang.Object
com.jozufozu.flywheel.util.CodecUtil

public class CodecUtil extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static <T> com.mojang.serialization.Codec<List<T>>
    oneOrMore(com.mojang.serialization.Codec<T> codec)
    Creates a list codec that can be parsed from either a single element or a complete list.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • CodecUtil

      public CodecUtil()
  • Method Details

    • oneOrMore

      public static <T> com.mojang.serialization.Codec<List<T>> oneOrMore(com.mojang.serialization.Codec<T> codec)
      Creates a list codec that can be parsed from either a single element or a complete list.