Record Class CameraInstruction

java.lang.Object
java.lang.Record
net.raphimc.viabedrock.protocol.model.CameraInstruction

public record CameraInstruction(CameraInstruction.SetCamera set, Boolean clear, CameraInstruction.Fade fade, CameraInstruction.Target target, Boolean removeTarget, CameraInstruction.FieldOfView fieldOfView, CameraInstruction.Spline spline, Long attachToEntity, Boolean detachFromEntity) extends Record
Protocol 2193 camera fields. Null means absent, including optional booleans.
  • Field Details

    • TYPE

      public static final com.viaversion.viaversion.api.type.Type<CameraInstruction> TYPE
  • Constructor Details

    • CameraInstruction

      public CameraInstruction(CameraInstruction.SetCamera set, Boolean clear, CameraInstruction.Fade fade, CameraInstruction.Target target, Boolean removeTarget, CameraInstruction.FieldOfView fieldOfView, CameraInstruction.Spline spline, Long attachToEntity, Boolean detachFromEntity)
      Creates an instance of a CameraInstruction record class.
      Parameters:
      set - the value for the set record component
      clear - the value for the clear record component
      fade - the value for the fade record component
      target - the value for the target record component
      removeTarget - the value for the removeTarget record component
      fieldOfView - the value for the fieldOfView record component
      spline - the value for the spline record component
      attachToEntity - the value for the attachToEntity record component
      detachFromEntity - the value for the detachFromEntity record component
  • Method Details

    • action

      public CameraInstruction.Action action()
      Native camera actions are mutually exclusive, even when several optional fields are present.
    • 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. All components in this record class are compared with Objects::equals(Object,Object).
      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.
    • set

      Returns the value of the set record component.
      Returns:
      the value of the set record component
    • clear

      public Boolean clear()
      Returns the value of the clear record component.
      Returns:
      the value of the clear record component
    • fade

      public CameraInstruction.Fade fade()
      Returns the value of the fade record component.
      Returns:
      the value of the fade record component
    • target

      public CameraInstruction.Target target()
      Returns the value of the target record component.
      Returns:
      the value of the target record component
    • removeTarget

      public Boolean removeTarget()
      Returns the value of the removeTarget record component.
      Returns:
      the value of the removeTarget record component
    • fieldOfView

      public CameraInstruction.FieldOfView fieldOfView()
      Returns the value of the fieldOfView record component.
      Returns:
      the value of the fieldOfView record component
    • spline

      public CameraInstruction.Spline spline()
      Returns the value of the spline record component.
      Returns:
      the value of the spline record component
    • attachToEntity

      public Long attachToEntity()
      Returns the value of the attachToEntity record component.
      Returns:
      the value of the attachToEntity record component
    • detachFromEntity

      public Boolean detachFromEntity()
      Returns the value of the detachFromEntity record component.
      Returns:
      the value of the detachFromEntity record component