Uses of Interface
net.minecraft.network.protocol.common.custom.CustomPacketPayload
Packages that use CustomPacketPayload
Package
Description
-
Uses of CustomPacketPayload in net.minecraft.client.multiplayer
Methods in net.minecraft.client.multiplayer with parameters of type CustomPacketPayloadModifier and TypeMethodDescriptionprotected abstract voidClientCommonPacketListenerImpl.handleCustomPayload(CustomPacketPayload pPayload) protected voidClientConfigurationPacketListenerImpl.handleCustomPayload(CustomPacketPayload pPayload) voidClientPacketListener.handleCustomPayload(CustomPacketPayload pPayload) private voidClientConfigurationPacketListenerImpl.handleUnknownCustomPayload(CustomPacketPayload pPayload) private voidClientPacketListener.handleUnknownCustomPayload(CustomPacketPayload pPacket) -
Uses of CustomPacketPayload in net.minecraft.network.protocol.common
Fields in net.minecraft.network.protocol.common declared as CustomPacketPayloadModifier and TypeFieldDescriptionprivate final CustomPacketPayloadClientboundCustomPayloadPacket.payloadThe field for thepayloadrecord component.private final CustomPacketPayloadServerboundCustomPayloadPacket.payloadThe field for thepayloadrecord component.Methods in net.minecraft.network.protocol.common that return CustomPacketPayloadModifier and TypeMethodDescriptionClientboundCustomPayloadPacket.payload()Returns the value of thepayloadrecord component.ServerboundCustomPayloadPacket.payload()Returns the value of thepayloadrecord component.Constructors in net.minecraft.network.protocol.common with parameters of type CustomPacketPayloadModifierConstructorDescriptionCreates an instance of aClientboundCustomPayloadPacketrecord class.Creates an instance of aServerboundCustomPayloadPacketrecord class. -
Uses of CustomPacketPayload in net.minecraft.network.protocol.common.custom
Classes in net.minecraft.network.protocol.common.custom with type parameters of type CustomPacketPayloadModifier and TypeClassDescriptionstatic final recordCustomPacketPayload.Type<T extends CustomPacketPayload>static final recordCustomPacketPayload.TypeAndCodec<B extends FriendlyByteBuf,T extends CustomPacketPayload> Classes in net.minecraft.network.protocol.common.custom that implement CustomPacketPayloadModifier and TypeClassDescriptionfinal recordfinal recordfinal recordfinal recordfinal recordfinal recordfinal recordfinal recordfinal recordfinal recordfinal recordfinal recordfinal recordfinal recordfinal recordfinal recordfinal recordfinal recordfinal recordfinal recordfinal recordMethods in net.minecraft.network.protocol.common.custom with type parameters of type CustomPacketPayloadModifier and TypeMethodDescriptionstatic <B extends io.netty.buffer.ByteBuf,T extends CustomPacketPayload>
StreamCodec<B, T> CustomPacketPayload.codec(StreamMemberEncoder<B, T> pEncoder, StreamDecoder<B, T> pDecoder) static <T extends CustomPacketPayload>
CustomPacketPayload.Type<T> CustomPacketPayload.createType(String pId) Methods in net.minecraft.network.protocol.common.custom that return types with arguments of type CustomPacketPayloadModifier and TypeMethodDescriptionstatic <B extends FriendlyByteBuf>
StreamCodec<B, CustomPacketPayload> CustomPacketPayload.codec(CustomPacketPayload.FallbackProvider<B> pFallbackProvider, List<CustomPacketPayload.TypeAndCodec<? super B, ?>> pTypeAndCodecs, ConnectionProtocol protocol, PacketFlow packetFlow) StreamCodec<B, ? extends CustomPacketPayload> CustomPacketPayload.FallbackProvider.create(ResourceLocation pId) CustomPacketPayload.Type<? extends CustomPacketPayload> CustomPacketPayload.type() -
Uses of CustomPacketPayload in net.minecraft.network.protocol.game
Methods in net.minecraft.network.protocol.game with parameters of type CustomPacketPayloadModifier and TypeMethodDescriptionprivate static voidDebugPackets.sendPacketToAllPlayers(ServerLevel pLevel, CustomPacketPayload pPayload) -
Uses of CustomPacketPayload in net.neoforged.neoforge.client.network
Methods in net.neoforged.neoforge.client.network with parameters of type CustomPacketPayloadModifier and TypeMethodDescriptionstatic voidClientPacketDistributor.sendToServer(CustomPacketPayload payload, CustomPacketPayload... payloads) Send the given payload(s) to the server -
Uses of CustomPacketPayload in net.neoforged.neoforge.client.network.event
Methods in net.neoforged.neoforge.client.network.event with type parameters of type CustomPacketPayloadModifier and TypeMethodDescription<T extends CustomPacketPayload>
voidRegisterClientPayloadHandlersEvent.register(CustomPacketPayload.Type<T> type, IPayloadHandler<T> handler) Registers the providedIPayloadHandleras the client handler to be invoked on the main thread for the providedCustomPacketPayload.Type<T extends CustomPacketPayload>
voidRegisterClientPayloadHandlersEvent.register(CustomPacketPayload.Type<T> type, HandlerThread thread, IPayloadHandler<T> handler) Registers the providedIPayloadHandleras the client handler to be invoked on the specified thread for the providedCustomPacketPayload.Type -
Uses of CustomPacketPayload in net.neoforged.neoforge.client.network.handling
Methods in net.neoforged.neoforge.client.network.handling with parameters of type CustomPacketPayload -
Uses of CustomPacketPayload in net.neoforged.neoforge.client.network.registration
Methods in net.neoforged.neoforge.client.network.registration with type parameters of type CustomPacketPayloadModifier and TypeMethodDescriptionstatic <T extends CustomPacketPayload>
voidClientNetworkRegistry.register(CustomPacketPayload.Type<T> type, HandlerThread thread, IPayloadHandler<T> handler) -
Uses of CustomPacketPayload in net.neoforged.neoforge.common.extensions
Methods in net.neoforged.neoforge.common.extensions with parameters of type CustomPacketPayloadModifier and TypeMethodDescriptiondefault voidIPlayerListExtension.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 voidIPlayerListExtension.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 voidIServerChunkCacheExtension.broadcast(Entity entity, CustomPacketPayload payload) Sends a payload to all players watching the given entity.default voidIPlayerListExtension.broadcastAll(CustomPacketPayload payload) Sends a payload to all players on the serverdefault voidIPlayerListExtension.broadcastAll(CustomPacketPayload payload, ResourceKey<Level> targetLevel) Sends a payload to all players within the specific level.default voidIServerChunkCacheExtension.broadcastAndSend(Entity entity, CustomPacketPayload payload) Sends a payload to all players watching the given entity.default booleanICommonPacketListener.hasChannel(CustomPacketPayload payload) default voidIClientCommonPacketListenerExtension.send(CustomPacketPayload payload) Sends a payload to the target of this listener.voidICommonPacketListener.send(CustomPacketPayload payload) Sends a payload to the target of this listener.default voidIServerCommonPacketListenerExtension.send(CustomPacketPayload payload) Sends a payload to the target of this listener.default voidIServerCommonPacketListenerExtension.send(CustomPacketPayload payload, @Nullable io.netty.channel.ChannelFutureListener listener) Sends a payload to the client of this listener.default voidIServerGamePacketListenerExtension.sendBundled(CustomPacketPayload... payloads) Sends all given payloads as a bundle to the client.Method parameters in net.neoforged.neoforge.common.extensions with type arguments of type CustomPacketPayloadModifier and TypeMethodDescriptiondefault voidIServerGamePacketListenerExtension.sendBundled(Iterable<CustomPacketPayload> payloads) Sends all given payloads as a bundle to the client.default voidIEntityExtension.sendPairingData(ServerPlayer serverPlayer, Consumer<CustomPacketPayload> bundleBuilder) Sends the pairing data to the client. -
Uses of CustomPacketPayload in net.neoforged.neoforge.network
Methods in net.neoforged.neoforge.network with parameters of type CustomPacketPayloadModifier and TypeMethodDescriptionprivate static Packet<?> PacketDistributor.makeClientboundPacket(CustomPacketPayload payload, CustomPacketPayload... payloads) static voidPacketDistributor.sendToAllPlayers(CustomPacketPayload payload, CustomPacketPayload... payloads) Send the given payload(s) to all players on the serverstatic voidPacketDistributor.sendToPlayer(ServerPlayer player, CustomPacketPayload payload, CustomPacketPayload... payloads) Send the given payload(s) to the given playerstatic voidPacketDistributor.sendToPlayersInDimension(ServerLevel level, CustomPacketPayload payload, CustomPacketPayload... payloads) Send the given payload(s) to all players in the given dimensionstatic voidPacketDistributor.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 voidPacketDistributor.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 voidPacketDistributor.sendToPlayersTrackingEntity(Entity entity, CustomPacketPayload payload, CustomPacketPayload... payloads) Send the given payload(s) to all players tracking the given entitystatic voidPacketDistributor.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 player -
Uses of CustomPacketPayload in net.neoforged.neoforge.network.configuration
Method parameters in net.neoforged.neoforge.network.configuration with type arguments of type CustomPacketPayloadModifier and TypeMethodDescriptionvoidCommonRegisterTask.run(Consumer<CustomPacketPayload> sender) voidCommonVersionTask.run(Consumer<CustomPacketPayload> sender) voidICustomConfigurationTask.run(Consumer<CustomPacketPayload> sender) Invoked when it is time for this configuration to run.voidRegistryDataMapNegotiation.run(Consumer<CustomPacketPayload> sender) voidSyncConfig.run(Consumer<CustomPacketPayload> sender) voidSyncRegistries.run(Consumer<CustomPacketPayload> sender) -
Uses of CustomPacketPayload in net.neoforged.neoforge.network.handling
Classes in net.neoforged.neoforge.network.handling with type parameters of type CustomPacketPayloadModifier and TypeInterfaceDescriptioninterfaceIPayloadHandler<T extends CustomPacketPayload>Callback for handling custom packets.final recordMainThreadPayloadHandler<T extends CustomPacketPayload>Helper class that always executes the wrapped handler on the main thread.Methods in net.neoforged.neoforge.network.handling with parameters of type CustomPacketPayloadModifier and TypeMethodDescriptionvoidIPayloadContext.handle(CustomPacketPayload payload) Handles a payload using the current context.voidServerPayloadContext.handle(CustomPacketPayload payload) default voidIPayloadContext.reply(CustomPacketPayload payload) Sends the given payload back to the sender. -
Uses of CustomPacketPayload in net.neoforged.neoforge.network.payload
Classes in net.neoforged.neoforge.network.payload that implement CustomPacketPayloadModifier and TypeClassDescriptionfinal recordPayload that can be sent from the server to the client to add an entity to the world, with custom data.final recordA custom payload that updates the full dataslot value instead of just the short valuefinal recordA custom payload that allows for opening screens with additional data.final recordfinal recordfinal recordCommon Register, used to send play-phase channels during the configuration phase.final recordCommon version payload.final recordA payload that contains a config file.final classfinal recordfinal classfinal recordfinal recordPacket payload for sending a frozen registry to the clientfinal classThis payload is sent to the client when the server has finished sending all the frozen registries.final recordPacket payload sent to the client to start the frozen registry sync.final recordfinal recordfinal recordfinal recordfinal recordA payload that contains the modded network configuration and play components.final recordPayload for the modded network query request.final recordPayload sent to the client when the server has failed to set up the modded network.final recordWe use this to transfer the actual recipe content from server to client.final recordfinal recordA payload that is used to split a packet into multiple payloads.final recordMethods in net.neoforged.neoforge.network.payload that return types with arguments of type CustomPacketPayloadModifier and TypeMethodDescriptionCustomPacketPayload.Type<? extends CustomPacketPayload> SyncAttachmentsPayload.type() -
Uses of CustomPacketPayload in net.neoforged.neoforge.network.registration
Classes in net.neoforged.neoforge.network.registration with type parameters of type CustomPacketPayloadModifier and TypeClassDescriptionfinal recordRegistration for a custom packet payload.final recordModdedPlayPayloadRegistration<T extends CustomPacketPayload>Registration for a custom packet payload.final recordPayloadRegistration<T extends CustomPacketPayload>Holds the information needed to describe a registered payload.Fields in net.neoforged.neoforge.network.registration with type parameters of type CustomPacketPayloadModifier and TypeFieldDescriptionprotected static final Map<ResourceLocation, StreamCodec<FriendlyByteBuf, ? extends CustomPacketPayload>> NetworkRegistry.BUILTIN_PAYLOADSMap of NeoForge payloads that may be sent before channel negotiation.Methods in net.neoforged.neoforge.network.registration with type parameters of type CustomPacketPayloadModifier and TypeMethodDescription<T extends CustomPacketPayload>
PayloadRegistrarPayloadRegistrar.commonBidirectional(CustomPacketPayload.Type<T> type, StreamCodec<? super FriendlyByteBuf, T> codec, IPayloadHandler<T> serverHandler) Registers a bidirectional payload for all phases.<T extends CustomPacketPayload>
PayloadRegistrarPayloadRegistrar.commonBidirectional(CustomPacketPayload.Type<T> type, StreamCodec<? super FriendlyByteBuf, T> codec, IPayloadHandler<T> serverHandler, @Nullable IPayloadHandler<T> clientHandler) Registers a bidirectional payload for all phases.<T extends CustomPacketPayload>
PayloadRegistrarPayloadRegistrar.commonToClient(CustomPacketPayload.Type<T> type, StreamCodec<? super FriendlyByteBuf, T> codec) Registers a client-bound payload for all phases without a handler.<T extends CustomPacketPayload>
PayloadRegistrarPayloadRegistrar.commonToClient(CustomPacketPayload.Type<T> type, StreamCodec<? super FriendlyByteBuf, T> codec, IPayloadHandler<T> handler) Registers a client-bound payload for all phases.<T extends CustomPacketPayload>
PayloadRegistrarPayloadRegistrar.commonToServer(CustomPacketPayload.Type<T> type, StreamCodec<? super FriendlyByteBuf, T> codec, IPayloadHandler<T> handler) Registers a server-bound payload for all phases.<T extends CustomPacketPayload>
PayloadRegistrarPayloadRegistrar.configurationBidirectional(CustomPacketPayload.Type<T> type, StreamCodec<? super FriendlyByteBuf, T> codec, IPayloadHandler<T> serverHandler) Registers a bidirectional payload for the configuration phase.<T extends CustomPacketPayload>
PayloadRegistrarPayloadRegistrar.configurationBidirectional(CustomPacketPayload.Type<T> type, StreamCodec<? super FriendlyByteBuf, T> codec, IPayloadHandler<T> serverHandler, @Nullable IPayloadHandler<T> clientHandler) Registers a bidirectional payload for the configuration phase.<T extends CustomPacketPayload>
PayloadRegistrarPayloadRegistrar.configurationToClient(CustomPacketPayload.Type<T> type, StreamCodec<? super FriendlyByteBuf, T> codec) Registers a client-bound payload for the configuration phase without a handler.<T extends CustomPacketPayload>
PayloadRegistrarPayloadRegistrar.configurationToClient(CustomPacketPayload.Type<T> type, StreamCodec<? super FriendlyByteBuf, T> codec, 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> codec, 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> codec, IPayloadHandler<T> serverHandler) Registers a bidirectional payload for the play phase.<T extends CustomPacketPayload>
PayloadRegistrarPayloadRegistrar.playBidirectional(CustomPacketPayload.Type<T> type, StreamCodec<? super RegistryFriendlyByteBuf, T> codec, IPayloadHandler<T> serverHandler, @Nullable IPayloadHandler<T> clientHandler) Registers a bidirectional payload for the play phase.<T extends CustomPacketPayload>
PayloadRegistrarPayloadRegistrar.playToClient(CustomPacketPayload.Type<T> type, StreamCodec<? super RegistryFriendlyByteBuf, T> codec) Registers a client-bound payload for the play phase without a handler.<T extends CustomPacketPayload>
PayloadRegistrarPayloadRegistrar.playToClient(CustomPacketPayload.Type<T> type, StreamCodec<? super RegistryFriendlyByteBuf, T> codec, 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> codec, 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, @Nullable IPayloadHandler<T> serverHandler, @Nullable IPayloadHandler<T> clientHandler, 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, @Nullable IPayloadHandler<T> serverHandler, @Nullable IPayloadHandler<T> clientHandler, List<ConnectionProtocol> protocols, Optional<PacketFlow> flow, String version, boolean optional) protected static <T extends CustomPacketPayload>
voidNetworkRegistry.registerHandler(Map<ConnectionProtocol, Map<ResourceLocation, IPayloadHandler<?>>> handlers, ConnectionProtocol protocol, PacketFlow flow, CustomPacketPayload.Type<T> type, IPayloadHandler<T> handler) Methods in net.neoforged.neoforge.network.registration that return types with arguments of type CustomPacketPayloadModifier and TypeMethodDescriptionstatic @Nullable StreamCodec<? super FriendlyByteBuf, ? extends CustomPacketPayload> NetworkRegistry.getCodec(ResourceLocation id, ConnectionProtocol protocol, PacketFlow flow) Attempts to retrieve theStreamCodecfor a non-vanilla payload.Methods in net.neoforged.neoforge.network.registration with parameters of type CustomPacketPayloadModifier and TypeMethodDescriptionstatic booleanNetworkRegistry.isModdedPayload(CustomPacketPayload payload) Checks if a payload is a modded payload.