Record Class ServerBoundSetTimePacket
java.lang.Object
java.lang.Record
de.luckymcdev.foundryengine.common.network.packets.world.ServerBoundSetTimePacket
- All Implemented Interfaces:
AbstractPacket<ServerBoundSetTimePacket>, net.minecraft.network.protocol.common.custom.CustomPacketPayload
public record ServerBoundSetTimePacket(int timeValue)
extends Record
implements AbstractPacket<ServerBoundSetTimePacket>
-
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
FieldsModifier and TypeFieldDescriptionstatic final AbstractPacket.Definition<ServerBoundSetTimePacket> -
Constructor Summary
ConstructorsConstructorDescriptionServerBoundSetTimePacket(int timeValue) Creates an instance of aServerBoundSetTimePacketrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf, ServerBoundSetTimePacket> getCodec()net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<ServerBoundSetTimePacket> getType()voidhandleServer(net.neoforged.neoforge.network.handling.IPayloadContext ctx) final inthashCode()Returns a hash code value for this object.intReturns the value of thetimeValuerecord component.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
-
ServerBoundSetTimePacket
public ServerBoundSetTimePacket(int timeValue) Creates an instance of aServerBoundSetTimePacketrecord class.- Parameters:
timeValue- the value for thetimeValuerecord component
-
-
Method Details
-
getType
public net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<ServerBoundSetTimePacket> getType()- Specified by:
getTypein interfaceAbstractPacket<ServerBoundSetTimePacket>
-
getBoundTo
- Specified by:
getBoundToin interfaceAbstractPacket<ServerBoundSetTimePacket>
-
getCodec
public net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf, ServerBoundSetTimePacket> getCodec()- Specified by:
getCodecin interfaceAbstractPacket<ServerBoundSetTimePacket>
-
handleServer
public void handleServer(net.neoforged.neoforge.network.handling.IPayloadContext ctx) - Specified by:
handleServerin interfaceAbstractPacket<ServerBoundSetTimePacket>
-
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 with thecomparemethod from their corresponding wrapper classes. -
timeValue
public int timeValue()Returns the value of thetimeValuerecord component.- Returns:
- the value of the
timeValuerecord component
-