Record Class BundleHashPacket
java.lang.Object
java.lang.Record
de.luckymcdev.foundryengine.common.network.packets.BundleHashPacket
- All Implemented Interfaces:
AbstractPacket<BundleHashPacket>, net.minecraft.network.protocol.common.custom.CustomPacketPayload
public record BundleHashPacket(String clientHash)
extends Record
implements AbstractPacket<BundleHashPacket>
Packet sent from Client to Server to verify bundle directory synchronization.
-
Nested Class Summary
Nested 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
Fields -
Constructor Summary
ConstructorsConstructorDescriptionBundleHashPacket(String clientHash) Creates an instance of aBundleHashPacketrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theclientHashrecord component.final booleanIndicates whether some other object is "equal to" this one.net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf, BundleHashPacket> getCodec()net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<BundleHashPacket> getType()voidhandleServer(net.neoforged.neoforge.network.handling.IPayloadContext ctx) final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.Methods inherited from interface AbstractPacket
handleClient, typeMethods inherited from interface net.minecraft.network.protocol.common.custom.CustomPacketPayload
toVanillaClientbound, toVanillaServerbound
-
Field Details
-
DEFINITION
-
-
Constructor Details
-
BundleHashPacket
Creates an instance of aBundleHashPacketrecord class.- Parameters:
clientHash- the value for theclientHashrecord component
-
-
Method Details
-
getType
public net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<BundleHashPacket> getType()- Specified by:
getTypein interfaceAbstractPacket<BundleHashPacket>
-
getBoundTo
- Specified by:
getBoundToin interfaceAbstractPacket<BundleHashPacket>
-
getCodec
public net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf, BundleHashPacket> getCodec()- Specified by:
getCodecin interfaceAbstractPacket<BundleHashPacket>
-
handleServer
public void handleServer(net.neoforged.neoforge.network.handling.IPayloadContext ctx) - Specified by:
handleServerin interfaceAbstractPacket<BundleHashPacket>
-
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). -
clientHash
Returns the value of theclientHashrecord component.- Returns:
- the value of the
clientHashrecord component
-