Class NBTCodecHelper

java.lang.Object
com.wdiscute.starcatcher.io.NBTCodecHelper

public class NBTCodecHelper extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static <T> T
    decode(com.mojang.serialization.Codec<T> codec, net.minecraft.nbt.CompoundTag compoundTag, String name)
     
    static <T> T
    decode(com.mojang.serialization.Codec<T> codec, net.minecraft.nbt.CompoundTag compoundTag, String name, Supplier<T> orElse)
     
    static <T> void
    encode(com.mojang.serialization.Codec<T> codec, T data, net.minecraft.nbt.CompoundTag compoundTag, String name)
     

    Methods inherited from class java.lang.Object

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

    • NBTCodecHelper

      public NBTCodecHelper()
  • Method Details

    • encode

      public static <T> void encode(com.mojang.serialization.Codec<T> codec, T data, net.minecraft.nbt.CompoundTag compoundTag, String name)
    • decode

      public static <T> T decode(com.mojang.serialization.Codec<T> codec, net.minecraft.nbt.CompoundTag compoundTag, String name, Supplier<T> orElse)
    • decode

      @Nullable public static <T> T decode(com.mojang.serialization.Codec<T> codec, net.minecraft.nbt.CompoundTag compoundTag, String name)