Record Class StartStopTrackPacket
java.lang.Object
java.lang.Record
com.hammy275.immersivemc.common.network.packet.StartStopTrackPacket
public record StartStopTrackPacket(net.minecraft.resources.Identifier handlerID, boolean isStop)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionStartStopTrackPacket(net.minecraft.resources.Identifier handlerID, boolean isStop) Creates an instance of aStartStopTrackPacketrecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic StartStopTrackPacketdecode(net.minecraft.network.RegistryFriendlyByteBuf buffer) static voidencode(StartStopTrackPacket packet, net.minecraft.network.RegistryFriendlyByteBuf buffer) final booleanIndicates whether some other object is "equal to" this one.static voidhandle(StartStopTrackPacket packet, net.minecraft.server.level.ServerPlayer player) net.minecraft.resources.IdentifierReturns the value of thehandlerIDrecord component.final inthashCode()Returns a hash code value for this object.booleanisStop()Returns the value of theisStoprecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
StartStopTrackPacket
public StartStopTrackPacket(net.minecraft.resources.Identifier handlerID, boolean isStop) Creates an instance of aStartStopTrackPacketrecord class.- Parameters:
handlerID- the value for thehandlerIDrecord componentisStop- the value for theisStoprecord component
-
-
Method Details
-
encode
public static void encode(StartStopTrackPacket packet, net.minecraft.network.RegistryFriendlyByteBuf buffer) -
decode
-
handle
public static void handle(StartStopTrackPacket packet, net.minecraft.server.level.ServerPlayer player) -
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
handlerID
public net.minecraft.resources.Identifier handlerID()Returns the value of thehandlerIDrecord component.- Returns:
- the value of the
handlerIDrecord component
-
isStop
public boolean isStop()Returns the value of theisStoprecord component.- Returns:
- the value of the
isStoprecord component
-