Record Class CameraPreset
java.lang.Object
java.lang.Record
net.raphimc.viabedrock.protocol.model.CameraPreset
public record CameraPreset(String name, String parent, Float posX, Float posY, Float posZ, Float rotX, Float rotY, Float rotationSpeed, Boolean snapToTarget, CameraInstruction.Vec2 horizontalRotationLimit, CameraInstruction.Vec2 verticalRotationLimit, Boolean continueTargeting, Float trackingRadius, CameraInstruction.Vec2 viewOffset, CameraInstruction.Vec3 entityOffset, Float radius, Float minYawLimit, Float maxYawLimit, Integer audioListener, Boolean playerEffects, CameraPreset.AimAssist aimAssist, Integer controlScheme, boolean applyInheritedStartingRotation, CameraInstruction.Vec2 startingRotation)
extends Record
Protocol 2193 presets. Optional false and zero values remain distinct from absence.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.viaversion.viaversion.api.type.Type<List<CameraPreset>> static final intstatic final com.viaversion.viaversion.api.type.Type<CameraPreset> -
Constructor Summary
ConstructorsConstructorDescriptionCameraPreset(String name, String parent, Float posX, Float posY, Float posZ, Float rotX, Float rotY, Float rotationSpeed, Boolean snapToTarget, CameraInstruction.Vec2 horizontalRotationLimit, CameraInstruction.Vec2 verticalRotationLimit, Boolean continueTargeting, Float trackingRadius, CameraInstruction.Vec2 viewOffset, CameraInstruction.Vec3 entityOffset, Float radius, Float minYawLimit, Float maxYawLimit, Integer audioListener, Boolean playerEffects, CameraPreset.AimAssist aimAssist, Integer controlScheme, boolean applyInheritedStartingRotation, CameraInstruction.Vec2 startingRotation) Creates an instance of aCameraPresetrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theaimAssistrecord component.booleanReturns the value of theapplyInheritedStartingRotationrecord component.Returns the value of theaudioListenerrecord component.Returns the value of thecontinueTargetingrecord component.Returns the value of thecontrolSchemerecord component.Returns the value of theentityOffsetrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of thehorizontalRotationLimitrecord component.Starting-rotation flags belong to the child, outside ordinary optional-field inheritance.Returns the value of themaxYawLimitrecord component.Returns the value of theminYawLimitrecord component.name()Returns the value of thenamerecord component.parent()Returns the value of theparentrecord component.Returns the value of theplayerEffectsrecord component.posX()Returns the value of theposXrecord component.posY()Returns the value of theposYrecord component.posZ()Returns the value of theposZrecord component.radius()Returns the value of theradiusrecord component.Returns the value of therotationSpeedrecord component.rotX()Returns the value of therotXrecord component.rotY()Returns the value of therotYrecord component.Returns the value of thesnapToTargetrecord component.Returns the value of thestartingRotationrecord component.final StringtoString()Returns a string representation of this record class.Returns the value of thetrackingRadiusrecord component.Returns the value of theverticalRotationLimitrecord component.Returns the value of theviewOffsetrecord component.
-
Field Details
-
MAX_PRESETS
public static final int MAX_PRESETS- See Also:
-
TYPE
-
LIST_TYPE
-
-
Constructor Details
-
CameraPreset
public CameraPreset(String name, String parent, Float posX, Float posY, Float posZ, Float rotX, Float rotY, Float rotationSpeed, Boolean snapToTarget, CameraInstruction.Vec2 horizontalRotationLimit, CameraInstruction.Vec2 verticalRotationLimit, Boolean continueTargeting, Float trackingRadius, CameraInstruction.Vec2 viewOffset, CameraInstruction.Vec3 entityOffset, Float radius, Float minYawLimit, Float maxYawLimit, Integer audioListener, Boolean playerEffects, CameraPreset.AimAssist aimAssist, Integer controlScheme, boolean applyInheritedStartingRotation, CameraInstruction.Vec2 startingRotation) Creates an instance of aCameraPresetrecord class.- Parameters:
name- the value for thenamerecord componentparent- the value for theparentrecord componentposX- the value for theposXrecord componentposY- the value for theposYrecord componentposZ- the value for theposZrecord componentrotX- the value for therotXrecord componentrotY- the value for therotYrecord componentrotationSpeed- the value for therotationSpeedrecord componentsnapToTarget- the value for thesnapToTargetrecord componenthorizontalRotationLimit- the value for thehorizontalRotationLimitrecord componentverticalRotationLimit- the value for theverticalRotationLimitrecord componentcontinueTargeting- the value for thecontinueTargetingrecord componenttrackingRadius- the value for thetrackingRadiusrecord componentviewOffset- the value for theviewOffsetrecord componententityOffset- the value for theentityOffsetrecord componentradius- the value for theradiusrecord componentminYawLimit- the value for theminYawLimitrecord componentmaxYawLimit- the value for themaxYawLimitrecord componentaudioListener- the value for theaudioListenerrecord componentplayerEffects- the value for theplayerEffectsrecord componentaimAssist- the value for theaimAssistrecord componentcontrolScheme- the value for thecontrolSchemerecord componentapplyInheritedStartingRotation- the value for theapplyInheritedStartingRotationrecord componentstartingRotation- the value for thestartingRotationrecord component
-
-
Method Details
-
inherit
Starting-rotation flags belong to the child, outside ordinary optional-field inheritance. -
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. -
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
parent
Returns the value of theparentrecord component.- Returns:
- the value of the
parentrecord component
-
posX
Returns the value of theposXrecord component.- Returns:
- the value of the
posXrecord component
-
posY
Returns the value of theposYrecord component.- Returns:
- the value of the
posYrecord component
-
posZ
Returns the value of theposZrecord component.- Returns:
- the value of the
posZrecord component
-
rotX
Returns the value of therotXrecord component.- Returns:
- the value of the
rotXrecord component
-
rotY
Returns the value of therotYrecord component.- Returns:
- the value of the
rotYrecord component
-
rotationSpeed
Returns the value of therotationSpeedrecord component.- Returns:
- the value of the
rotationSpeedrecord component
-
snapToTarget
Returns the value of thesnapToTargetrecord component.- Returns:
- the value of the
snapToTargetrecord component
-
horizontalRotationLimit
Returns the value of thehorizontalRotationLimitrecord component.- Returns:
- the value of the
horizontalRotationLimitrecord component
-
verticalRotationLimit
Returns the value of theverticalRotationLimitrecord component.- Returns:
- the value of the
verticalRotationLimitrecord component
-
continueTargeting
Returns the value of thecontinueTargetingrecord component.- Returns:
- the value of the
continueTargetingrecord component
-
trackingRadius
Returns the value of thetrackingRadiusrecord component.- Returns:
- the value of the
trackingRadiusrecord component
-
viewOffset
Returns the value of theviewOffsetrecord component.- Returns:
- the value of the
viewOffsetrecord component
-
entityOffset
Returns the value of theentityOffsetrecord component.- Returns:
- the value of the
entityOffsetrecord component
-
radius
Returns the value of theradiusrecord component.- Returns:
- the value of the
radiusrecord component
-
minYawLimit
Returns the value of theminYawLimitrecord component.- Returns:
- the value of the
minYawLimitrecord component
-
maxYawLimit
Returns the value of themaxYawLimitrecord component.- Returns:
- the value of the
maxYawLimitrecord component
-
audioListener
Returns the value of theaudioListenerrecord component.- Returns:
- the value of the
audioListenerrecord component
-
playerEffects
Returns the value of theplayerEffectsrecord component.- Returns:
- the value of the
playerEffectsrecord component
-
aimAssist
Returns the value of theaimAssistrecord component.- Returns:
- the value of the
aimAssistrecord component
-
controlScheme
Returns the value of thecontrolSchemerecord component.- Returns:
- the value of the
controlSchemerecord component
-
applyInheritedStartingRotation
public boolean applyInheritedStartingRotation()Returns the value of theapplyInheritedStartingRotationrecord component.- Returns:
- the value of the
applyInheritedStartingRotationrecord component
-
startingRotation
Returns the value of thestartingRotationrecord component.- Returns:
- the value of the
startingRotationrecord component
-