Package net.minecraft.network
Interface PacketCallbacks
public interface PacketCallbacks
A set of callbacks for sending a packet.
- Mappings:
Namespace Name named net/minecraft/network/PacketCallbacksintermediary net/minecraft/class_7648official wg
-
Method Summary
Modifier and TypeMethodDescriptionstatic PacketCallbacksReturns a callback that always runsrunnable.Returns the packet to send on failure, ornullif there is none.static PacketCallbacksReturns a callback that sendsfailurePacketwhen failed.default voidCalled 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 named alwaysLnet/minecraft/network/PacketCallbacks;always(Ljava/lang/Runnable;)Lnet/minecraft/network/PacketCallbacks;intermediary method_45084Lnet/minecraft/class_7648;method_45084(Ljava/lang/Runnable;)Lnet/minecraft/class_7648;official aLwg;a(Ljava/lang/Runnable;)Lwg;
-
of
Returns a callback that sendsfailurePacketwhen failed.- Returns:
- a callback that sends
failurePacketwhen failed - Mappings:
Namespace Name Mixin selector named ofLnet/minecraft/network/PacketCallbacks;of(Ljava/util/function/Supplier;)Lnet/minecraft/network/PacketCallbacks;intermediary method_45085Lnet/minecraft/class_7648;method_45085(Ljava/util/function/Supplier;)Lnet/minecraft/class_7648;official aLwg;a(Ljava/util/function/Supplier;)Lwg;
-
onSuccess
default void onSuccess()Called when packet is sent successfully.- Mappings:
Namespace Name Mixin selector named onSuccessLnet/minecraft/network/PacketCallbacks;onSuccess()Vintermediary method_45083Lnet/minecraft/class_7648;method_45083()Vofficial aLwg;a()V
-
getFailurePacket
Returns the packet to send on failure, ornullif there is none.- Returns:
- the packet to send on failure, or
nullif there is none - Mappings:
Namespace Name Mixin selector named getFailurePacketLnet/minecraft/network/PacketCallbacks;getFailurePacket()Lnet/minecraft/network/packet/Packet;intermediary method_45086Lnet/minecraft/class_7648;method_45086()Lnet/minecraft/class_2596;official bLwg;b()Lzg;
-