Interface PacketEncoder<O,T>

All Known Subinterfaces:
PacketCodec<B,V>
All Known Implementing Classes:
PacketCodecDispatcher
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface PacketEncoder<O,T>
A functional interface that, given a buffer and a value, encodes it.

A static method taking PacketByteBuf and the value as the arguments can be used as an encoder.

See Also:
Mappings:
Namespace Name
named net/minecraft/network/codec/PacketEncoder
intermediary net/minecraft/class_9142
official zv
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    encode(O buf, T value)
     
  • Method Details

    • encode

      void encode(O buf, T value)
      Mappings:
      Namespace Name Mixin selector
      named encode Lnet/minecraft/network/codec/PacketEncoder;encode(Ljava/lang/Object;Ljava/lang/Object;)V
      intermediary encode Lnet/minecraft/class_9142;encode(Ljava/lang/Object;Ljava/lang/Object;)V
      official encode Lzv;encode(Ljava/lang/Object;Ljava/lang/Object;)V