Record Class ClientBoundFileListPacket
java.lang.Object
java.lang.Record
de.luckymcdev.foundryengine.common.network.packets.explorer.ClientBoundFileListPacket
- All Implemented Interfaces:
AbstractPacket<ClientBoundFileListPacket>, net.minecraft.network.protocol.common.custom.CustomPacketPayload
public record ClientBoundFileListPacket(String rootPath, List<ClientBoundFileListPacket.RemoteEntry> entries)
extends Record
implements AbstractPacket<ClientBoundFileListPacket>
Sent by the server in response to
ServerBoundRequestFileListPacket.
Carries a flat list of (relativePath, isDirectory) pairs representing the
remote directory tree rooted at the requested path.-
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 final AbstractPacket.Definition<ClientBoundFileListPacket> -
Constructor Summary
ConstructorsConstructorDescriptionClientBoundFileListPacket(String rootPath, List<ClientBoundFileListPacket.RemoteEntry> entries) Creates an instance of aClientBoundFileListPacketrecord class. -
Method Summary
Modifier and TypeMethodDescriptionentries()Returns the value of theentriesrecord component.final booleanIndicates whether some other object is "equal to" this one.net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf, ClientBoundFileListPacket> getCodec()net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<ClientBoundFileListPacket> getType()voidhandleClient(net.neoforged.neoforge.network.handling.IPayloadContext ctx) final inthashCode()Returns a hash code value for this object.rootPath()Returns the value of therootPathrecord component.final StringtoString()Returns a string representation of this record class.Methods inherited from interface AbstractPacket
handleServer, typeMethods inherited from interface net.minecraft.network.protocol.common.custom.CustomPacketPayload
toVanillaClientbound, toVanillaServerbound
-
Field Details
-
DEFINITION
-
-
Constructor Details
-
ClientBoundFileListPacket
public ClientBoundFileListPacket(String rootPath, List<ClientBoundFileListPacket.RemoteEntry> entries) Creates an instance of aClientBoundFileListPacketrecord class.- Parameters:
rootPath- the value for therootPathrecord componententries- the value for theentriesrecord component
-
-
Method Details
-
getType
public net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<ClientBoundFileListPacket> getType()- Specified by:
getTypein interfaceAbstractPacket<ClientBoundFileListPacket>
-
getBoundTo
- Specified by:
getBoundToin interfaceAbstractPacket<ClientBoundFileListPacket>
-
getCodec
public net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf, ClientBoundFileListPacket> getCodec()- Specified by:
getCodecin interfaceAbstractPacket<ClientBoundFileListPacket>
-
handleClient
public void handleClient(net.neoforged.neoforge.network.handling.IPayloadContext ctx) - Specified by:
handleClientin interfaceAbstractPacket<ClientBoundFileListPacket>
-
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). -
rootPath
Returns the value of therootPathrecord component.- Returns:
- the value of the
rootPathrecord component
-
entries
Returns the value of theentriesrecord component.- Returns:
- the value of the
entriesrecord component
-