Interface PacketCallbacks


public interface PacketCallbacks
A set of callbacks for sending a packet.
Mappings:
Namespace Name
named net/minecraft/network/PacketCallbacks
intermediary net/minecraft/class_7648
official wg
  • Method Summary

    Modifier and Type
    Method
    Description
    always(Runnable runnable)
    Returns a callback that always runs runnable.
    default @Nullable Packet<?>
    Returns the packet to send on failure, or null if there is none.
    of(Supplier<Packet<?>> failurePacket)
    Returns a callback that sends failurePacket when failed.
    default void
    Called when packet is sent successfully.
  • Method Details

    • always

      static PacketCallbacks always(Runnable runnable)
      Returns a callback that always runs runnable.
      Returns:
      a callback that always runs runnable
      Mappings:
      Namespace Name Mixin selector
      named always Lnet/minecraft/network/PacketCallbacks;always(Ljava/lang/Runnable;)Lnet/minecraft/network/PacketCallbacks;
      intermediary method_45084 Lnet/minecraft/class_7648;method_45084(Ljava/lang/Runnable;)Lnet/minecraft/class_7648;
      official a Lwg;a(Ljava/lang/Runnable;)Lwg;
    • of

      static PacketCallbacks of(Supplier<Packet<?>> failurePacket)
      Returns a callback that sends failurePacket when failed.
      Returns:
      a callback that sends failurePacket when failed
      Mappings:
      Namespace Name Mixin selector
      named of Lnet/minecraft/network/PacketCallbacks;of(Ljava/util/function/Supplier;)Lnet/minecraft/network/PacketCallbacks;
      intermediary method_45085 Lnet/minecraft/class_7648;method_45085(Ljava/util/function/Supplier;)Lnet/minecraft/class_7648;
      official a Lwg;a(Ljava/util/function/Supplier;)Lwg;
    • onSuccess

      default void onSuccess()
      Called when packet is sent successfully.
      Mappings:
      Namespace Name Mixin selector
      named onSuccess Lnet/minecraft/network/PacketCallbacks;onSuccess()V
      intermediary method_45083 Lnet/minecraft/class_7648;method_45083()V
      official a Lwg;a()V
    • getFailurePacket

      @Nullable default @Nullable Packet<?> getFailurePacket()
      Returns the packet to send on failure, or null if there is none.
      Returns:
      the packet to send on failure, or null if there is none
      Mappings:
      Namespace Name Mixin selector
      named getFailurePacket Lnet/minecraft/network/PacketCallbacks;getFailurePacket()Lnet/minecraft/network/packet/Packet;
      intermediary method_45086 Lnet/minecraft/class_7648;method_45086()Lnet/minecraft/class_2596;
      official b Lwg;b()Lzg;