Record Class ClientboundTransceiverPacket
java.lang.Object
java.lang.Record
com.codinglitch.simpleradio.core.networking.packets.ClientboundTransceiverPacket
- All Implemented Interfaces:
Packeter
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionClientboundTransceiverPacket(boolean started, UUID player, String type) Creates an instance of aClientboundTransceiverPacketrecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic ClientboundTransceiverPacketdecode(net.minecraft.network.FriendlyByteBuf buffer) voidencode(net.minecraft.network.FriendlyByteBuf buffer) final booleanIndicates whether some other object is "equal to" this one.static voidhandle(ClientboundTransceiverPacket packet) final inthashCode()Returns a hash code value for this object.player()Returns the value of theplayerrecord component.net.minecraft.resources.ResourceLocationresource()booleanstarted()Returns the value of thestartedrecord component.final StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.
-
Field Details
-
ID
public static net.minecraft.resources.ResourceLocation ID
-
-
Constructor Details
-
ClientboundTransceiverPacket
Creates an instance of aClientboundTransceiverPacketrecord class.- Parameters:
started- the value for thestartedrecord componentplayer- the value for theplayerrecord componenttype- the value for thetyperecord component
-
-
Method Details
-
resource
public net.minecraft.resources.ResourceLocation resource() -
encode
public void encode(net.minecraft.network.FriendlyByteBuf buffer) -
decode
-
handle
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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 '=='. -
started
public boolean started()Returns the value of thestartedrecord component.- Returns:
- the value of the
startedrecord component
-
player
Returns the value of theplayerrecord component.- Returns:
- the value of the
playerrecord component
-
type
Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-