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
(ClientboundCustomPayloadPacket p_295727_, CustomPacketPayload p_295776_) protected void
ClientConfigurationPacketListenerImpl.handleCustomPayload
(ClientboundCustomPayloadPacket p_295727_, CustomPacketPayload p_295411_) void
ClientPacketListener.handleCustomPayload
(ClientboundCustomPayloadPacket p_295727_, 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 TypeFieldDescriptionstatic final Map<ResourceLocation,
FriendlyByteBuf.Reader<? extends CustomPacketPayload>> ClientboundCustomPayloadPacket.KNOWN_TYPES
static final Map<ResourceLocation,
FriendlyByteBuf.Reader<? extends CustomPacketPayload>> ServerboundCustomPayloadPacket.KNOWN_TYPES
Modifier and TypeMethodDescriptionClientboundCustomPayloadPacket.payload()
Returns the value of thepayload
record component.ServerboundCustomPayloadPacket.payload()
Returns the value of thepayload
record component.private static CustomPacketPayload
ClientboundCustomPayloadPacket.readPayload
(ResourceLocation p_294802_, FriendlyByteBuf p_294886_) Deprecated.private static CustomPacketPayload
ClientboundCustomPayloadPacket.readPayload
(ResourceLocation p_294367_, FriendlyByteBuf p_294321_, io.netty.channel.ChannelHandlerContext context, ConnectionProtocol protocol) Reads the payload from the given buffer.private static CustomPacketPayload
ServerboundCustomPayloadPacket.readPayload
(ResourceLocation p_294367_, FriendlyByteBuf p_294321_) Deprecated.UseServerboundCustomPayloadPacket.readPayload(ResourceLocation, FriendlyByteBuf, io.netty.channel.ChannelHandlerContext, net.minecraft.network.ConnectionProtocol)
instead, as this variant can only read vanilla payloads.private static CustomPacketPayload
ServerboundCustomPayloadPacket.readPayload
(ResourceLocation p_294367_, FriendlyByteBuf p_294321_, io.netty.channel.ChannelHandlerContext context, ConnectionProtocol protocol) Reads the payload from the given buffer.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 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
-
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
Modifier and TypeMethodDescriptionstatic void
TierSortingRegistry.sync
(ServerConfigurationPacketListener listener, Consumer<CustomPacketPayload> sender) -
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
IClientCommonPacketListenerExtension.isConnected
(CustomPacketPayload payload) Returns true if the custom payload is usable by this connection.default boolean
IServerCommonPacketListenerExtension.isConnected
(CustomPacketPayload payload) Returns true if the custom payload is usable by this connection.default void
IClientCommonPacketListenerExtension.send
(CustomPacketPayload payload) Sends a custom payload to the server.default void
IServerCommonPacketListenerExtension.send
(CustomPacketPayload packetPayload) Sends a custom payload to the client which this listener is attached to.default void
IServerCommonPacketListenerExtension.send
(CustomPacketPayload packetPayload, PacketSendListener listener) Sends a custom payload to the client which this listener is attached to.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 TypeMethodDescriptionvoid
PacketDistributor.PacketTarget.send
(CustomPacketPayload... payloads) -
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
ModdedConfigurationPhaseCompleted.run
(Consumer<CustomPacketPayload> sender) void
ModdedConfigurationPhaseStarted.run
(Consumer<CustomPacketPayload> sender) void
RegistryDataMapNegotiation.run
(Consumer<CustomPacketPayload> sender) void
SyncConfig.run
(Consumer<CustomPacketPayload> sender) void
SyncRegistries.run
(Consumer<CustomPacketPayload> sender) void
SyncTierSortingRegistry.run
(Consumer<CustomPacketPayload> sender) -
Uses of CustomPacketPayload in net.neoforged.neoforge.network.handling
Modifier and TypeInterfaceDescriptioninterface
IConfigurationPayloadHandler<T extends CustomPacketPayload>
Callback for handling custom packets.interface
IPayloadHandler<T extends CustomPacketPayload>
Callback for handling custom packets.interface
IPlayPayloadHandler<T extends CustomPacketPayload>
Callback for handling custom packets.Modifier and TypeMethodDescriptionstatic <Z extends CustomPacketPayload>
IConfigurationPayloadHandler<Z>IConfigurationPayloadHandler.noop()
Creates a replyHandler that does nothing.static <Z extends CustomPacketPayload>
IPlayPayloadHandler<Z>IPlayPayloadHandler.noop()
Creates a replyHandler that does nothing.Modifier and TypeMethodDescriptionvoid
IPacketHandler.handle
(CustomPacketPayload payload) Invoked to handle the given custom payload.void
IReplyHandler.send
(CustomPacketPayload payload) Sends the given payload back to the player. -
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 record
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
A payload that contains the modded network configuration and play components.final record
Payload for the modded network query requestfinal 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.final record
The payload for the tier sorting registry packet.final record
This payload is sent by the server to the client when the tier sorting registry has been fully synced.Modifier and TypeFieldDescriptionstatic final FriendlyByteBuf.Reader<? extends CustomPacketPayload>
ModdedNetworkPayload.READER
static final FriendlyByteBuf.Reader<? extends CustomPacketPayload>
ModdedNetworkQueryPayload.READER
static final FriendlyByteBuf.Reader<? extends CustomPacketPayload>
ModdedNetworkSetupFailedPayload.READER
-
Uses of CustomPacketPayload in net.neoforged.neoforge.network.registration
Modifier and TypeClassDescriptionfinal class
ConfigurationPayloadHandler<T extends CustomPacketPayload>
An internal implementation ofIDirectionAwarePayloadHandlerBuilder
forIConfigurationPayloadHandler
.(package private) static class
Internal builder for a configuration payload handler.final record
ConfigurationRegistration<T extends CustomPacketPayload>
A record that holds the information needed to describe a registered configuration payload, its reader and handler.interface
IDirectionAwarePayloadHandlerBuilder<P extends CustomPacketPayload,
T> Defines a builder for a direction aware payload handler.final record
Registration for a custom packet payload.final record
ModdedPlayPayloadRegistration<T extends CustomPacketPayload>
Registration for a custom packet payload.(package private) class
PayloadHandlerBuilder<T extends CustomPacketPayload>
The internal implementation ofIDirectionAwarePayloadHandlerBuilder
, for use byIPayloadRegistrar.common(ResourceLocation, FriendlyByteBuf.Reader, Consumer)
(package private) final class
PlayPayloadHandler<T extends CustomPacketPayload>
An internal implementation ofIDirectionAwarePayloadHandlerBuilder
forIPlayPayloadHandler
.(package private) static class
PlayPayloadHandler.Builder<T extends CustomPacketPayload>
A builder forPlayPayloadHandler
.final record
PlayRegistration<T extends CustomPacketPayload>
A record that holds the information needed to describe a registered play payload, its reader and handler.Modifier and TypeMethodDescription<T extends CustomPacketPayload>
IPayloadRegistrarIPayloadRegistrar.common
(ResourceLocation id, FriendlyByteBuf.Reader<T> reader, Consumer<IDirectionAwarePayloadHandlerBuilder<T, IPayloadHandler<T>>> handler) Registers a new payload type for all supported phases.default <T extends CustomPacketPayload>
IPayloadRegistrarIPayloadRegistrar.common
(ResourceLocation id, FriendlyByteBuf.Reader<T> reader, IPayloadHandler<T> handler) Registers a new payload type for all supported phases.<T extends CustomPacketPayload>
IPayloadRegistrarModdedPacketRegistrar.common
(ResourceLocation id, FriendlyByteBuf.Reader<T> reader, Consumer<IDirectionAwarePayloadHandlerBuilder<T, IPayloadHandler<T>>> handler) <T extends CustomPacketPayload>
IPayloadRegistrarIPayloadRegistrar.configuration
(ResourceLocation id, FriendlyByteBuf.Reader<T> reader, Consumer<IDirectionAwarePayloadHandlerBuilder<T, IConfigurationPayloadHandler<T>>> handler) Registers a new payload type for the configuration phase.<T extends CustomPacketPayload>
IPayloadRegistrarIPayloadRegistrar.configuration
(ResourceLocation id, FriendlyByteBuf.Reader<T> reader, IConfigurationPayloadHandler<T> handler) Registers a new payload type for the configuration phase.<T extends CustomPacketPayload>
IPayloadRegistrarModdedPacketRegistrar.configuration
(ResourceLocation id, FriendlyByteBuf.Reader<T> reader, Consumer<IDirectionAwarePayloadHandlerBuilder<T, IConfigurationPayloadHandler<T>>> handler) <T extends CustomPacketPayload>
IPayloadRegistrarModdedPacketRegistrar.configuration
(ResourceLocation id, FriendlyByteBuf.Reader<T> reader, IConfigurationPayloadHandler<T> handler) <T extends CustomPacketPayload>
IPayloadRegistrarIPayloadRegistrar.play
(ResourceLocation id, FriendlyByteBuf.Reader<T> reader, Consumer<IDirectionAwarePayloadHandlerBuilder<T, IPlayPayloadHandler<T>>> handler) Registers a new payload type for the play phase.<T extends CustomPacketPayload>
IPayloadRegistrarIPayloadRegistrar.play
(ResourceLocation id, FriendlyByteBuf.Reader<T> reader, IPlayPayloadHandler<T> handler) Registers a new payload type for the play phase.<T extends CustomPacketPayload>
IPayloadRegistrarModdedPacketRegistrar.play
(ResourceLocation id, FriendlyByteBuf.Reader<T> reader, Consumer<IDirectionAwarePayloadHandlerBuilder<T, IPlayPayloadHandler<T>>> handler) <T extends CustomPacketPayload>
IPayloadRegistrarModdedPacketRegistrar.play
(ResourceLocation id, FriendlyByteBuf.Reader<T> reader, IPlayPayloadHandler<T> handler) Modifier and TypeMethodDescriptionConfigurationRegistration.apply
(FriendlyByteBuf buffer) PlayRegistration.apply
(FriendlyByteBuf buffer) Modifier and TypeMethodDescriptionFriendlyByteBuf.Reader<? extends CustomPacketPayload>
NetworkRegistry.getReader
(ResourceLocation id, io.netty.channel.ChannelHandlerContext context, ConnectionProtocol protocol, Map<ResourceLocation, FriendlyByteBuf.Reader<? extends CustomPacketPayload>> knownTypes) Invoked by the network subsystem to get a reader for a custom packet payload.Modifier and TypeMethodDescriptionvoid
ConfigurationRegistration.handle
(CustomPacketPayload payload, ConfigurationPayloadContext context) void
NetworkRegistry.ClientPacketHandler.handle
(CustomPacketPayload payload) void
NetworkRegistry.ServerPacketHandler.handle
(CustomPacketPayload payload) void
PlayRegistration.handle
(CustomPacketPayload payload, PlayPayloadContext context) Modifier and TypeMethodDescriptionFriendlyByteBuf.Reader<? extends CustomPacketPayload>
NetworkRegistry.getReader
(ResourceLocation id, io.netty.channel.ChannelHandlerContext context, ConnectionProtocol protocol, Map<ResourceLocation, FriendlyByteBuf.Reader<? extends CustomPacketPayload>> knownTypes) Invoked by the network subsystem to get a reader for a custom packet 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
ClientboundCustomPayloadPacket.readPayload(ResourceLocation, FriendlyByteBuf, io.netty.channel.ChannelHandlerContext, net.minecraft.network.ConnectionProtocol)
instead, as this variant can only read vanilla payloads.