Uses of Interface
net.minecraft.network.protocol.common.custom.CustomPacketPayload
Package
Description
-
Uses of CustomPacketPayload in net.minecraft.client.multiplayer
Modifier and TypeMethodDescriptionprotected abstract void
ClientCommonPacketListenerImpl.handleCustomPayload
(CustomPacketPayload p_295776_) protected void
ClientConfigurationPacketListenerImpl.handleCustomPayload
(CustomPacketPayload p_295411_) void
ClientPacketListener.handleCustomPayload
(CustomPacketPayload p_295851_) private void
ClientConfigurationPacketListenerImpl.handleUnknownCustomPayload
(CustomPacketPayload p_296412_) private void
ClientPacketListener.handleUnknownCustomPayload
(CustomPacketPayload p_294389_) -
Uses of CustomPacketPayload in net.minecraft.network.protocol.common
Modifier and TypeFieldDescriptionprivate final CustomPacketPayload
ClientboundCustomPayloadPacket.payload
The field for thepayload
record component.private final CustomPacketPayload
ServerboundCustomPayloadPacket.payload
The field for thepayload
record component.Modifier and TypeMethodDescriptionClientboundCustomPayloadPacket.payload()
Returns the value of thepayload
record component.ServerboundCustomPayloadPacket.payload()
Returns the value of thepayload
record component.ModifierConstructorDescriptionCreates an instance of aClientboundCustomPayloadPacket
record class.Creates an instance of aServerboundCustomPayloadPacket
record class. -
Uses of CustomPacketPayload in net.minecraft.network.protocol.common.custom
Modifier and TypeClassDescriptionstatic final record
CustomPacketPayload.Type<T extends CustomPacketPayload>
static final record
CustomPacketPayload.TypeAndCodec<B extends FriendlyByteBuf,
T extends CustomPacketPayload> Modifier and TypeClassDescriptionfinal record
final record
final record
final record
final record
final record
final record
final record
final record
final record
final record
final record
final record
final record
final record
final record
final record
final record
final record
final record
Modifier and TypeMethodDescriptionstatic <B extends io.netty.buffer.ByteBuf,
T extends CustomPacketPayload>
StreamCodec<B, T> CustomPacketPayload.codec
(StreamMemberEncoder<B, T> p_319960_, StreamDecoder<B, T> p_320047_) static <T extends CustomPacketPayload>
CustomPacketPayload.Type<T> CustomPacketPayload.createType
(String p_319908_) Modifier and TypeMethodDescriptionstatic <B extends FriendlyByteBuf>
StreamCodec<B, CustomPacketPayload> CustomPacketPayload.codec
(CustomPacketPayload.FallbackProvider<B> p_319839_, List<CustomPacketPayload.TypeAndCodec<? super B, ?>> p_320495_, ConnectionProtocol protocol, PacketFlow packetFlow) StreamCodec
<B, ? extends CustomPacketPayload> CustomPacketPayload.FallbackProvider.create
(ResourceLocation p_320236_) CustomPacketPayload.Type
<? extends CustomPacketPayload> CustomPacketPayload.type()
-
Uses of CustomPacketPayload in net.minecraft.network.protocol.game
Modifier and TypeMethodDescriptionprivate static void
DebugPackets.sendPacketToAllPlayers
(ServerLevel p_133692_, CustomPacketPayload p_296119_) -
Uses of CustomPacketPayload in net.neoforged.neoforge.common.extensions
Modifier and TypeMethodDescriptiondefault void
IPlayerListExtension.broadcast
(double x, double y, double z, double range, ResourceKey<Level> level, CustomPacketPayload payload) Sends a payload to all players within the specific level, within a given range around the target pointdefault void
IPlayerListExtension.broadcast
(Player excludedPlayer, double x, double y, double z, double range, ResourceKey<Level> level, CustomPacketPayload payload) Sends a payload to all players within the specific level, within a given range around the target point, excluding the specified player.default void
IServerChunkCacheExtension.broadcast
(Entity entity, CustomPacketPayload payload) Sends a payload to all players watching the given entity.default void
IPlayerListExtension.broadcastAll
(CustomPacketPayload payload) Sends a payload to all players on the serverdefault void
IPlayerListExtension.broadcastAll
(CustomPacketPayload payload, ResourceKey<Level> targetLevel) Sends a payload to all players within the specific level.default void
IServerChunkCacheExtension.broadcastAndSend
(Entity entity, CustomPacketPayload payload) Sends a payload to all players watching the given entity.default boolean
ICommonPacketListener.hasChannel
(CustomPacketPayload payload) default void
IClientCommonPacketListenerExtension.send
(CustomPacketPayload payload) Sends a payload to the target of this listener.void
ICommonPacketListener.send
(CustomPacketPayload payload) Sends a payload to the target of this listener.default void
IServerCommonPacketListenerExtension.send
(CustomPacketPayload payload) Sends a payload to the target of this listener.default void
IServerCommonPacketListenerExtension.send
(CustomPacketPayload payload, @Nullable PacketSendListener listener) Sends a payload to the client of this listener.default void
IServerGamePacketListenerExtension.sendBundled
(CustomPacketPayload... payloads) Sends all given payloads as a bundle to the client.Modifier and TypeMethodDescriptiondefault void
IServerGamePacketListenerExtension.sendBundled
(Iterable<CustomPacketPayload> payloads) Sends all given payloads as a bundle to the client.default void
IEntityExtension.sendPairingData
(ServerPlayer serverPlayer, Consumer<CustomPacketPayload> bundleBuilder) Sends the pairing data to the client. -
Uses of CustomPacketPayload in net.neoforged.neoforge.debug.entity
Modifier and TypeMethodDescriptionvoid
EntityTests.AdaptedSpawnEntity.sendPairingData
(ServerPlayer serverPlayer, Consumer<CustomPacketPayload> bundleBuilder) -
Uses of CustomPacketPayload in net.neoforged.neoforge.network
Modifier and TypeMethodDescriptionprivate static Packet
<?> PacketDistributor.makeClientboundPacket
(CustomPacketPayload payload, CustomPacketPayload... payloads) static void
PacketDistributor.sendToAllPlayers
(CustomPacketPayload payload, CustomPacketPayload... payloads) Send the given payload(s) to all players on the serverstatic void
PacketDistributor.sendToPlayer
(ServerPlayer player, CustomPacketPayload payload, CustomPacketPayload... payloads) Send the given payload(s) to the given playerstatic void
PacketDistributor.sendToPlayersInDimension
(ServerLevel level, CustomPacketPayload payload, CustomPacketPayload... payloads) Send the given payload(s) to all players in the given dimensionstatic void
PacketDistributor.sendToPlayersNear
(ServerLevel level, @Nullable ServerPlayer excluded, double x, double y, double z, double radius, CustomPacketPayload payload, CustomPacketPayload... payloads) Send the given payload(s) to all players in the area covered by the given radius around the given coordinates in the given dimension, except the given excluded player if presentstatic void
PacketDistributor.sendToPlayersTrackingChunk
(ServerLevel level, ChunkPos chunkPos, CustomPacketPayload payload, CustomPacketPayload... payloads) Send the given payload(s) to all players tracking the chunk at the given position in the given levelstatic void
PacketDistributor.sendToPlayersTrackingEntity
(Entity entity, CustomPacketPayload payload, CustomPacketPayload... payloads) Send the given payload(s) to all players tracking the given entitystatic void
PacketDistributor.sendToPlayersTrackingEntityAndSelf
(Entity entity, CustomPacketPayload payload, CustomPacketPayload... payloads) Send the given payload(s) to all players tracking the given entity and the entity itself if it is a playerstatic void
PacketDistributor.sendToServer
(CustomPacketPayload payload, CustomPacketPayload... payloads) Send the given payload(s) to the server -
Uses of CustomPacketPayload in net.neoforged.neoforge.network.bundle
-
Uses of CustomPacketPayload in net.neoforged.neoforge.network.configuration
Modifier and TypeMethodDescriptionvoid
ICustomConfigurationTask.run
(Consumer<CustomPacketPayload> sender) Invoked when it is time for this configuration to run.void
RegistryDataMapNegotiation.run
(Consumer<CustomPacketPayload> sender) void
SyncConfig.run
(Consumer<CustomPacketPayload> sender) void
SyncRegistries.run
(Consumer<CustomPacketPayload> sender) -
Uses of CustomPacketPayload in net.neoforged.neoforge.network.handling
Modifier and TypeClassDescriptionfinal record
DirectionalPayloadHandler<T extends CustomPacketPayload>
Helper class that merges two unidirectional handlers into a single bidirectional handler.interface
IPayloadHandler<T extends CustomPacketPayload>
Callback for handling custom packets.final record
MainThreadPayloadHandler<T extends CustomPacketPayload>
Helper class that always executes the wrapped handler on the main thread.Modifier and TypeMethodDescriptionvoid
ClientPayloadContext.handle
(CustomPacketPayload payload) void
IPayloadContext.handle
(CustomPacketPayload payload) Handles a payload using the current context.void
ServerPayloadContext.handle
(CustomPacketPayload payload) default void
IPayloadContext.reply
(CustomPacketPayload payload) Sends the given payload back to the sender. -
Uses of CustomPacketPayload in net.neoforged.neoforge.network.payload
Modifier and TypeClassDescriptionfinal record
Payload that can be sent from the server to the client to add an entity to the world, with custom data.final record
A custom payload that updates the full dataslot value instead of just the short valuefinal record
A custom payload that allows for opening screens with additional data.final record
final record
A payload that contains a config file.final record
Packet payload for sending a frozen registry to the clientfinal class
This payload is sent to the client when the server has finished sending all the frozen registries.final record
Packet payload sent to the client to start the frozen registry sync.final record
final record
final record
final record
final record
A payload that contains the modded network configuration and play components.final record
Payload for the modded network query request.final record
Payload sent to the client when the server has failed to set up the modded network.final record
final record
A payload that is used to split a packet into multiple payloads. -
Uses of CustomPacketPayload in net.neoforged.neoforge.network.registration
Modifier and TypeClassDescriptionfinal record
Registration for a custom packet payload.final record
ModdedPlayPayloadRegistration<T extends CustomPacketPayload>
Registration for a custom packet payload.final record
PayloadRegistration<T extends CustomPacketPayload>
Holds the information needed to describe a registered payload.Modifier and TypeFieldDescriptionprivate static final Map
<ResourceLocation, StreamCodec<FriendlyByteBuf, ? extends CustomPacketPayload>> NetworkRegistry.BUILTIN_PAYLOADS
Map of NeoForge payloads that may be sent before channel negotiation.Modifier and TypeMethodDescription<T extends CustomPacketPayload>
PayloadRegistrarPayloadRegistrar.commonBidirectional
(CustomPacketPayload.Type<T> type, StreamCodec<? super FriendlyByteBuf, T> reader, IPayloadHandler<T> handler) Registers a bidirectional payload for all phases.<T extends CustomPacketPayload>
PayloadRegistrarPayloadRegistrar.commonToClient
(CustomPacketPayload.Type<T> type, StreamCodec<? super FriendlyByteBuf, T> reader, IPayloadHandler<T> handler) Registers a client-bound payload for all phases.<T extends CustomPacketPayload>
PayloadRegistrarPayloadRegistrar.commonToServer
(CustomPacketPayload.Type<T> type, StreamCodec<? super FriendlyByteBuf, T> reader, IPayloadHandler<T> handler) Registers a server-bound payload for all phases.<T extends CustomPacketPayload>
PayloadRegistrarPayloadRegistrar.configurationBidirectional
(CustomPacketPayload.Type<T> type, StreamCodec<? super FriendlyByteBuf, T> reader, IPayloadHandler<T> handler) Registers a bidirectional payload for the configuration phase.<T extends CustomPacketPayload>
PayloadRegistrarPayloadRegistrar.configurationToClient
(CustomPacketPayload.Type<T> type, StreamCodec<? super FriendlyByteBuf, T> reader, IPayloadHandler<T> handler) Registers a client-bound payload for the configuration phase.<T extends CustomPacketPayload>
PayloadRegistrarPayloadRegistrar.configurationToServer
(CustomPacketPayload.Type<T> type, StreamCodec<? super FriendlyByteBuf, T> reader, IPayloadHandler<T> handler) Registers a server-bound payload for the configuration phase.<T extends CustomPacketPayload>
PayloadRegistrarPayloadRegistrar.playBidirectional
(CustomPacketPayload.Type<T> type, StreamCodec<? super RegistryFriendlyByteBuf, T> reader, IPayloadHandler<T> handler) Registers a bidirectional payload for the play phase.<T extends CustomPacketPayload>
PayloadRegistrarPayloadRegistrar.playToClient
(CustomPacketPayload.Type<T> type, StreamCodec<? super RegistryFriendlyByteBuf, T> reader, IPayloadHandler<T> handler) Registers a client-bound payload for the play phase.<T extends CustomPacketPayload>
PayloadRegistrarPayloadRegistrar.playToServer
(CustomPacketPayload.Type<T> type, StreamCodec<? super RegistryFriendlyByteBuf, T> reader, IPayloadHandler<T> handler) Registers a server-bound payload for the play phase.static <T extends CustomPacketPayload,
B extends FriendlyByteBuf>
voidNetworkRegistry.register
(CustomPacketPayload.Type<T> type, StreamCodec<? super B, T> codec, IPayloadHandler<T> handler, List<ConnectionProtocol> protocols, Optional<PacketFlow> flow, String version, boolean optional) Registers a new payload.private <T extends CustomPacketPayload,
B extends FriendlyByteBuf>
voidPayloadRegistrar.register
(CustomPacketPayload.Type<T> type, StreamCodec<? super B, T> codec, IPayloadHandler<T> handler, List<ConnectionProtocol> protocols, Optional<PacketFlow> flow, String version, boolean optional) Modifier and TypeMethodDescriptionstatic @Nullable StreamCodec
<? super FriendlyByteBuf, ? extends CustomPacketPayload> NetworkRegistry.getCodec
(ResourceLocation id, ConnectionProtocol protocol, PacketFlow flow) Attempts to retrieve theStreamCodec
for a non-vanilla payload.Modifier and TypeMethodDescriptionstatic boolean
NetworkRegistry.isModdedPayload
(CustomPacketPayload payload) Checks if a payload is a modded payload. -
Uses of CustomPacketPayload in net.neoforged.neoforge.oldtest.misc
-
Uses of CustomPacketPayload in net.neoforged.testframework.gametest
Modifier and TypeMethodDescription<T extends CustomPacketPayload>
Stream<T> GameTestPlayer.getOutboundPayloads
(Class<T> type) -
Uses of CustomPacketPayload in net.neoforged.testframework.impl.packet
Modifier and TypeClassDescriptionfinal record
final record
Modifier and TypeMethodDescriptionCustomPacketPayload.Type
<? extends CustomPacketPayload> ChangeEnabledPayload.type()
CustomPacketPayload.Type
<? extends CustomPacketPayload> ChangeStatusPayload.type()