Record Class RotateTankTurretCommand
java.lang.Object
java.lang.Record
dev.zwazel.internal.message.data.tank.RotateTankTurretCommand
- All Implemented Interfaces:
MessageData
public record RotateTankTurretCommand(double yawAngle, double pitchAngle)
extends Record
implements MessageData
-
Constructor Summary
ConstructorsConstructorDescriptionRotateTankTurretCommand
(double yawAngle, double pitchAngle) Creates an instance of aRotateTankTurretCommand
record class. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Applies to the world when added to the queuefinal boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.boolean
isUnique()
Determines if the message is unique.double
Returns the value of thepitchAngle
record component.final String
toString()
Returns a string representation of this record class.double
yawAngle()
Returns the value of theyawAngle
record component.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface dev.zwazel.internal.message.MessageData
applyBeforeSend, applyOnReceive
-
Constructor Details
-
RotateTankTurretCommand
public RotateTankTurretCommand(double yawAngle, double pitchAngle) Creates an instance of aRotateTankTurretCommand
record class.- Parameters:
yawAngle
- the value for theyawAngle
record componentpitchAngle
- the value for thepitchAngle
record component
-
-
Method Details
-
applyOnAddingToQueue
Description copied from interface:MessageData
Applies to the world when added to the queue- Specified by:
applyOnAddingToQueue
in interfaceMessageData
- Parameters:
world
- the world
-
isUnique
public boolean isUnique()Description copied from interface:MessageData
Determines 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:
isUnique
in 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 thecompare
method from their corresponding wrapper classes. -
yawAngle
public double yawAngle()Returns the value of theyawAngle
record component.- Returns:
- the value of the
yawAngle
record component
-
pitchAngle
public double pitchAngle()Returns the value of thepitchAngle
record component.- Returns:
- the value of the
pitchAngle
record component
-