Package net.minecraft.network
Interface PacketCallbacks
public interface PacketCallbacks
A set of callbacks for sending a packet.
- Mappings:
Namespace Name official up
intermediary net/minecraft/class_7648
named net/minecraft/network/PacketCallbacks
-
Method Summary
Modifier and TypeMethodDescriptionstatic PacketCallbacks
Returns a callback that always runsrunnable
.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
Lup;a(Ljava/lang/Runnable;)Lup;
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
Lup;a(Ljava/util/function/Supplier;)Lup;
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
Lup;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
Lup;b()Lxf;
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;
-