Record Class RotateTankBodyCommand
java.lang.Object
java.lang.Record
dev.zwazel.internal.message.data.tank.RotateTankBodyCommand
- All Implemented Interfaces:
MessageData
-
Constructor Summary
ConstructorsConstructorDescriptionRotateTankBodyCommand(double angle) Creates an instance of aRotateTankBodyCommandrecord class. -
Method Summary
Modifier and TypeMethodDescriptiondoubleangle()Returns the value of theanglerecord component.voidApplies to the world when added to the queuefinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanisUnique()Determines if the message is unique.final StringtoString()Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface dev.zwazel.internal.message.MessageData
applyBeforeSend, applyOnReceive
-
Constructor Details
-
RotateTankBodyCommand
public RotateTankBodyCommand(double angle) Creates an instance of aRotateTankBodyCommandrecord class.- Parameters:
angle- the value for theanglerecord component
-
-
Method Details
-
applyOnAddingToQueue
Description copied from interface:MessageDataApplies to the world when added to the queue- Specified by:
applyOnAddingToQueuein interfaceMessageData- Parameters:
world- the world
-
isUnique
public boolean isUnique()Description copied from interface:MessageDataDetermines if the message is unique. If it is unique, before sending all messages to the server at the end of the tick, we remove all other messages of the same type. So only the latest message of this type is sent.- Specified by:
isUniquein interfaceMessageData- Returns:
- if the message is unique
-
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. -
angle
public double angle()Returns the value of theanglerecord component.- Returns:
- the value of the
anglerecord component
-