Package net.minecraft.network
Interface PacketCallbacks
public interface PacketCallbacks
A set of callbacks for sending a packet.
- Mappings:
Namespace Name official sv
intermediary net/minecraft/class_7648
named net/minecraft/network/PacketCallbacks
-
Method Summary
Modifier and TypeMethodDescriptionstatic PacketCallbacks
Returns a callback that always runsrunnable
.default @Nullable Packet<?>
Returns the packet to send on failure, ornull
if there is none.static PacketCallbacks
Returns a callback that sendsfailurePacket
when failed.default void
Called when packet is sent successfully.
-
Method Details
-
always
Returns a callback that always runsrunnable
.- Returns:
- a callback that always runs
runnable
- Mappings:
Namespace Name Mixin selector official a
Lsv;a(Ljava/lang/Runnable;)Lsv;
intermediary method_45084
Lnet/minecraft/class_7648;method_45084(Ljava/lang/Runnable;)Lnet/minecraft/class_7648;
named always
Lnet/minecraft/network/PacketCallbacks;always(Ljava/lang/Runnable;)Lnet/minecraft/network/PacketCallbacks;
-
of
Returns a callback that sendsfailurePacket
when failed.- Returns:
- a callback that sends
failurePacket
when failed - Mappings:
Namespace Name Mixin selector official a
Lsv;a(Ljava/util/function/Supplier;)Lsv;
intermediary method_45085
Lnet/minecraft/class_7648;method_45085(Ljava/util/function/Supplier;)Lnet/minecraft/class_7648;
named of
Lnet/minecraft/network/PacketCallbacks;of(Ljava/util/function/Supplier;)Lnet/minecraft/network/PacketCallbacks;
-
onSuccess
default void onSuccess()Called when packet is sent successfully.- Mappings:
Namespace Name Mixin selector official a
Lsv;a()V
intermediary method_45083
Lnet/minecraft/class_7648;method_45083()V
named onSuccess
Lnet/minecraft/network/PacketCallbacks;onSuccess()V
-
getFailurePacket
Returns the packet to send on failure, ornull
if there is none.- Returns:
- the packet to send on failure, or
null
if there is none - Mappings:
Namespace Name Mixin selector official b
Lsv;b()Lvd;
intermediary method_45086
Lnet/minecraft/class_7648;method_45086()Lnet/minecraft/class_2596;
named getFailurePacket
Lnet/minecraft/network/PacketCallbacks;getFailurePacket()Lnet/minecraft/network/packet/Packet;
-