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.
  • Field Details

    • MAX_PRESETS

      public static final int MAX_PRESETS
      See Also:
    • TYPE

      public static final com.viaversion.viaversion.api.type.Type<CameraPreset> TYPE
    • LIST_TYPE

      public static final com.viaversion.viaversion.api.type.Type<List<CameraPreset>> 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 a CameraPreset record class.
      Parameters:
      name - the value for the name record component
      parent - the value for the parent record component
      posX - the value for the posX record component
      posY - the value for the posY record component
      posZ - the value for the posZ record component
      rotX - the value for the rotX record component
      rotY - the value for the rotY record component
      rotationSpeed - the value for the rotationSpeed record component
      snapToTarget - the value for the snapToTarget record component
      horizontalRotationLimit - the value for the horizontalRotationLimit record component
      verticalRotationLimit - the value for the verticalRotationLimit record component
      continueTargeting - the value for the continueTargeting record component
      trackingRadius - the value for the trackingRadius record component
      viewOffset - the value for the viewOffset record component
      entityOffset - the value for the entityOffset record component
      radius - the value for the radius record component
      minYawLimit - the value for the minYawLimit record component
      maxYawLimit - the value for the maxYawLimit record component
      audioListener - the value for the audioListener record component
      playerEffects - the value for the playerEffects record component
      aimAssist - the value for the aimAssist record component
      controlScheme - the value for the controlScheme record component
      applyInheritedStartingRotation - the value for the applyInheritedStartingRotation record component
      startingRotation - the value for the startingRotation record component
  • Method Details

    • inherit

      public CameraPreset inherit(CameraPreset p)
      Starting-rotation flags belong to the child, outside ordinary optional-field inheritance.
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • name

      public String name()
      Returns the value of the name record component.
      Returns:
      the value of the name record component
    • parent

      public String parent()
      Returns the value of the parent record component.
      Returns:
      the value of the parent record component
    • posX

      public Float posX()
      Returns the value of the posX record component.
      Returns:
      the value of the posX record component
    • posY

      public Float posY()
      Returns the value of the posY record component.
      Returns:
      the value of the posY record component
    • posZ

      public Float posZ()
      Returns the value of the posZ record component.
      Returns:
      the value of the posZ record component
    • rotX

      public Float rotX()
      Returns the value of the rotX record component.
      Returns:
      the value of the rotX record component
    • rotY

      public Float rotY()
      Returns the value of the rotY record component.
      Returns:
      the value of the rotY record component
    • rotationSpeed

      public Float rotationSpeed()
      Returns the value of the rotationSpeed record component.
      Returns:
      the value of the rotationSpeed record component
    • snapToTarget

      public Boolean snapToTarget()
      Returns the value of the snapToTarget record component.
      Returns:
      the value of the snapToTarget record component
    • horizontalRotationLimit

      public CameraInstruction.Vec2 horizontalRotationLimit()
      Returns the value of the horizontalRotationLimit record component.
      Returns:
      the value of the horizontalRotationLimit record component
    • verticalRotationLimit

      public CameraInstruction.Vec2 verticalRotationLimit()
      Returns the value of the verticalRotationLimit record component.
      Returns:
      the value of the verticalRotationLimit record component
    • continueTargeting

      public Boolean continueTargeting()
      Returns the value of the continueTargeting record component.
      Returns:
      the value of the continueTargeting record component
    • trackingRadius

      public Float trackingRadius()
      Returns the value of the trackingRadius record component.
      Returns:
      the value of the trackingRadius record component
    • viewOffset

      public CameraInstruction.Vec2 viewOffset()
      Returns the value of the viewOffset record component.
      Returns:
      the value of the viewOffset record component
    • entityOffset

      public CameraInstruction.Vec3 entityOffset()
      Returns the value of the entityOffset record component.
      Returns:
      the value of the entityOffset record component
    • radius

      public Float radius()
      Returns the value of the radius record component.
      Returns:
      the value of the radius record component
    • minYawLimit

      public Float minYawLimit()
      Returns the value of the minYawLimit record component.
      Returns:
      the value of the minYawLimit record component
    • maxYawLimit

      public Float maxYawLimit()
      Returns the value of the maxYawLimit record component.
      Returns:
      the value of the maxYawLimit record component
    • audioListener

      public Integer audioListener()
      Returns the value of the audioListener record component.
      Returns:
      the value of the audioListener record component
    • playerEffects

      public Boolean playerEffects()
      Returns the value of the playerEffects record component.
      Returns:
      the value of the playerEffects record component
    • aimAssist

      public CameraPreset.AimAssist aimAssist()
      Returns the value of the aimAssist record component.
      Returns:
      the value of the aimAssist record component
    • controlScheme

      public Integer controlScheme()
      Returns the value of the controlScheme record component.
      Returns:
      the value of the controlScheme record component
    • applyInheritedStartingRotation

      public boolean applyInheritedStartingRotation()
      Returns the value of the applyInheritedStartingRotation record component.
      Returns:
      the value of the applyInheritedStartingRotation record component
    • startingRotation

      public CameraInstruction.Vec2 startingRotation()
      Returns the value of the startingRotation record component.
      Returns:
      the value of the startingRotation record component