Record Class ClientboundDialoguePacket
java.lang.Object
java.lang.Record
de.luckymcdev.foundryengine.common.network.packets.dialogue.ClientboundDialoguePacket
- All Implemented Interfaces:
AbstractPacket<ClientboundDialoguePacket>, net.minecraft.network.protocol.common.custom.CustomPacketPayload
public record ClientboundDialoguePacket(ClientboundDialoguePacket.Action action, net.minecraft.resources.Identifier treeId, net.minecraft.nbt.CompoundTag session, net.minecraft.nbt.CompoundTag node)
extends Record
implements AbstractPacket<ClientboundDialoguePacket>
Server-to-client packet for dialogue lifecycle.
Carries serialized
DialogueSession and DialogueNode to the
client's ClientDialogueManager.-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface AbstractPacket
AbstractPacket.Definition<T>Nested classes/interfaces inherited from interface 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> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic Consumer<ClientboundDialoguePacket> static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf, ClientboundDialoguePacket> static final AbstractPacket.Definition<ClientboundDialoguePacket> static final net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<ClientboundDialoguePacket> Fields inherited from interface AbstractPacket
GENEROUS_NBT_CODEC, MAX_FILE_CONTENT_LENGTH, MAX_LIST_ELEMENT_COUNT, MAX_MODULE_COUNT, MAX_STRING_LENGTH -
Constructor Summary
ConstructorsConstructorDescriptionClientboundDialoguePacket(ClientboundDialoguePacket.Action action, net.minecraft.resources.Identifier treeId, net.minecraft.nbt.CompoundTag session, net.minecraft.nbt.CompoundTag node) Creates an instance of aClientboundDialoguePacketrecord class. -
Method Summary
Modifier and TypeMethodDescriptionaction()Returns the value of theactionrecord component.static ClientboundDialoguePacketadvance(net.minecraft.resources.Identifier treeId, DialogueSession session, DialogueNode node) static ClientboundDialoguePacketended(net.minecraft.resources.Identifier treeId) final booleanIndicates whether some other object is "equal to" this one.net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf, ClientboundDialoguePacket> getCodec()net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<ClientboundDialoguePacket> getType()final inthashCode()Returns a hash code value for this object.net.minecraft.nbt.CompoundTagnode()Returns the value of thenoderecord component.net.minecraft.nbt.CompoundTagsession()Returns the value of thesessionrecord component.static ClientboundDialoguePacketshow(net.minecraft.resources.Identifier treeId, DialogueSession session, DialogueNode node) final StringtoString()Returns a string representation of this record class.net.minecraft.resources.IdentifiertreeId()Returns the value of thetreeIdrecord component.Methods inherited from interface AbstractPacket
handleClient, handleServer, typeMethods inherited from interface net.minecraft.network.protocol.common.custom.CustomPacketPayload
toVanillaClientbound, toVanillaServerbound
-
Field Details
-
TYPE
public static final net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<ClientboundDialoguePacket> TYPE -
CODEC
public static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf, ClientboundDialoguePacket> CODEC -
DEFINITION
-
CLIENT_HANDLER
-
-
Constructor Details
-
ClientboundDialoguePacket
public ClientboundDialoguePacket(ClientboundDialoguePacket.Action action, net.minecraft.resources.Identifier treeId, net.minecraft.nbt.CompoundTag session, net.minecraft.nbt.CompoundTag node) Creates an instance of aClientboundDialoguePacketrecord class.- Parameters:
action- the value for theactionrecord componenttreeId- the value for thetreeIdrecord componentsession- the value for thesessionrecord componentnode- the value for thenoderecord component
-
-
Method Details
-
show
public static ClientboundDialoguePacket show(net.minecraft.resources.Identifier treeId, DialogueSession session, DialogueNode node) -
advance
public static ClientboundDialoguePacket advance(net.minecraft.resources.Identifier treeId, DialogueSession session, DialogueNode node) -
ended
-
getType
public net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<ClientboundDialoguePacket> getType()- Specified by:
getTypein interfaceAbstractPacket<ClientboundDialoguePacket>
-
getBoundTo
- Specified by:
getBoundToin interfaceAbstractPacket<ClientboundDialoguePacket>
-
getCodec
public net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf, ClientboundDialoguePacket> getCodec()- Specified by:
getCodecin interfaceAbstractPacket<ClientboundDialoguePacket>
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
action
Returns the value of theactionrecord component.- Returns:
- the value of the
actionrecord component
-
treeId
public net.minecraft.resources.Identifier treeId()Returns the value of thetreeIdrecord component.- Returns:
- the value of the
treeIdrecord component
-
session
public net.minecraft.nbt.CompoundTag session()Returns the value of thesessionrecord component.- Returns:
- the value of the
sessionrecord component
-
node
public net.minecraft.nbt.CompoundTag node()Returns the value of thenoderecord component.- Returns:
- the value of the
noderecord component
-