Class NeoForgeStreamCodecs.LazyStreamCodec<B,V>

java.lang.Object
net.neoforged.neoforge.network.codec.NeoForgeStreamCodecs.LazyStreamCodec<B,V>
All Implemented Interfaces:
net.minecraft.network.codec.StreamCodec<B,V>, net.minecraft.network.codec.StreamDecoder<B,V>, net.minecraft.network.codec.StreamEncoder<B,V>
Enclosing class:
NeoForgeStreamCodecs

private static class NeoForgeStreamCodecs.LazyStreamCodec<B,V> extends Object implements net.minecraft.network.codec.StreamCodec<B,V>
  • Nested Class Summary

    Nested classes/interfaces inherited from interface net.minecraft.network.codec.StreamCodec

    net.minecraft.network.codec.StreamCodec.CodecOperation<B,S,T>
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final Lazy<net.minecraft.network.codec.StreamCodec<B,V>>
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    LazyStreamCodec(Supplier<net.minecraft.network.codec.StreamCodec<B,V>> streamCodecSupplier)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    decode(B buf)
     
    void
    encode(B buf, V value)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface net.minecraft.network.codec.StreamCodec

    apply, cast, dispatch, map, mapStream
  • Field Details

    • delegate

      private final Lazy<net.minecraft.network.codec.StreamCodec<B,V>> delegate
  • Constructor Details

    • LazyStreamCodec

      public LazyStreamCodec(Supplier<net.minecraft.network.codec.StreamCodec<B,V>> streamCodecSupplier)
  • Method Details

    • encode

      public void encode(B buf, V value)
      Specified by:
      encode in interface net.minecraft.network.codec.StreamEncoder<B,V>
    • decode

      public V decode(B buf)
      Specified by:
      decode in interface net.minecraft.network.codec.StreamDecoder<B,V>