Schnittstelle AbstractPacket<T extends AbstractPacket<T>>
- Alle Superschnittstellen:
net.minecraft.network.protocol.common.custom.CustomPacketPayload
- Alle bekannten Implementierungsklassen:
AreaPacket, BundleHashPacket, ClientboundDialoguePacket, ClientBoundExplorerPacket, CustomDataPacket, CutsceneCommandPacket, CutscenePacket, DialogueSavePacket, GiveItemPacket, LinearizeCutscenePacket, SavedDataSyncPacket, ScreenEffectPacket, ServerBoundChangeWeatherPacket, ServerboundDialoguePacket, ServerBoundExplorerPacket, ServerBoundSetTimePacket, ServerBoundSpawnEntityPacket, ServerBoundTeleportPacket, WaypointPacket
public interface AbstractPacket<T extends AbstractPacket<T>>
extends net.minecraft.network.protocol.common.custom.CustomPacketPayload
Base interface for all network packets.
-
Verschachtelte Klassen - Übersicht
Verschachtelte KlassenModifikator und TypSchnittstelleBeschreibungstatic final recordAbstractPacket.Definition<T extends AbstractPacket<T>>Von Schnittstelle geerbte verschachtelte Klassen/Schnittstellen net.minecraft.network.protocol.common.custom.CustomPacketPayload
net.minecraft.network.protocol.common.custom.CustomPacketPayload.FallbackProvider<B>, net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<T>, net.minecraft.network.protocol.common.custom.CustomPacketPayload.TypeAndCodec<B,T> -
Feldübersicht
FelderModifikator und TypFeldBeschreibungstatic final net.minecraft.network.codec.StreamCodec<io.netty.buffer.ByteBuf, net.minecraft.nbt.CompoundTag> Bounded NBT codec with a generous quota for large editor/user payloads.static final intMaximum length for large file/resource content payloads.static final intMaximum element count for list fields in packet payloads.static final intMaximum module count for area packets.static final intMaximum length for user-supplied strings carried in packet payloads. -
Methodenübersicht
Modifikator und TypMethodeBeschreibungstatic <T extends net.minecraft.network.protocol.common.custom.CustomPacketPayload>
net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<T> createType(net.minecraft.resources.Identifier id) net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf, T> getCodec()net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<T> getType()default voidhandleClient(net.neoforged.neoforge.network.handling.IPayloadContext ctx) default voidhandleServer(net.neoforged.neoforge.network.handling.IPayloadContext ctx) default net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<? extends net.minecraft.network.protocol.common.custom.CustomPacketPayload> type()Von Schnittstelle geerbte Methoden net.minecraft.network.protocol.common.custom.CustomPacketPayload
toVanillaClientbound, toVanillaServerbound
-
Felddetails
-
MAX_STRING_LENGTH
static final int MAX_STRING_LENGTHMaximum length for user-supplied strings carried in packet payloads.- Siehe auch:
-
MAX_FILE_CONTENT_LENGTH
static final int MAX_FILE_CONTENT_LENGTHMaximum length for large file/resource content payloads.- Siehe auch:
-
MAX_LIST_ELEMENT_COUNT
static final int MAX_LIST_ELEMENT_COUNTMaximum element count for list fields in packet payloads.- Siehe auch:
-
MAX_MODULE_COUNT
static final int MAX_MODULE_COUNTMaximum module count for area packets.- Siehe auch:
-
GENEROUS_NBT_CODEC
static final net.minecraft.network.codec.StreamCodec<io.netty.buffer.ByteBuf, net.minecraft.nbt.CompoundTag> GENEROUS_NBT_CODECBounded NBT codec with a generous quota for large editor/user payloads.
-
-
Methodendetails
-
createType
static <T extends net.minecraft.network.protocol.common.custom.CustomPacketPayload> net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<T> createType(net.minecraft.resources.Identifier id) -
type
default net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<? extends net.minecraft.network.protocol.common.custom.CustomPacketPayload> type()- Angegeben von:
typein Schnittstellenet.minecraft.network.protocol.common.custom.CustomPacketPayload
-
getType
net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<T> getType() -
getBoundTo
PacketBounds getBoundTo() -
getCodec
net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf, T> getCodec() -
handleClient
default void handleClient(net.neoforged.neoforge.network.handling.IPayloadContext ctx) -
handleServer
default void handleServer(net.neoforged.neoforge.network.handling.IPayloadContext ctx)
-