Interface Ref<V>

All Superinterfaces:
WithKey, WithRef<V>, WithValue<V>
All Known Implementing Classes:
RefOfKey, RefOfValue, UnitType

public sealed interface Ref<V> extends WithKey, WithRef<V>, WithValue<V> permits UnitType<B,V>, RefOfKey<V>, RefOfValue<V>
  • Field Details

    • ERROR_NOT_UNIT

      static final com.mojang.serialization.DataResult<String> ERROR_NOT_UNIT
  • Method Details

    • contextRefCodec

      static <V> com.mojang.serialization.MapCodec<Ref<V>> contextRefCodec()
    • contextRefStreamCodec

      static <B extends io.netty.buffer.ByteBuf, V> net.minecraft.network.codec.StreamCodec<B,Ref<V>> contextRefStreamCodec()
    • optionalContextRefCodec

      static <V> com.mojang.serialization.MapCodec<Optional<Ref<V>>> optionalContextRefCodec()
    • optionalContextRefStreamCodec

      static <B extends io.netty.buffer.ByteBuf, V> net.minecraft.network.codec.StreamCodec<B, Optional<Ref<V>>> optionalContextRefStreamCodec()
    • ref

      default Ref<V> ref()
      Specified by:
      ref in interface WithRef<V>
    • value

      default V value()
      Specified by:
      value in interface WithValue<V>
    • unitKeyResult

      default com.mojang.serialization.DataResult<String> unitKeyResult()