Record Class PhysicalActorState

java.lang.Object
java.lang.Record
com.viaversion.viafabricplus.bedrock.movement.replay.PhysicalActorState

public record PhysicalActorState(net.minecraft.world.entity.Entity actor, net.minecraft.client.multiplayer.ClientLevel level, int id, UUID uuid, UUID nativeLifetime, net.raphimc.viabedrock.api.model.NativeActorMessage.Snapshot metadata, boolean physical, PhysicalActorState.CorrectionValues correction, net.raphimc.viabedrock.api.model.PlayerModeMessage.State mode, PhysicalState state) extends Record
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static final record 
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    PhysicalActorState(net.minecraft.world.entity.Entity actor, net.minecraft.client.multiplayer.ClientLevel level, int id, UUID uuid, UUID nativeLifetime, net.raphimc.viabedrock.api.model.NativeActorMessage.Snapshot metadata, boolean physical, PhysicalActorState.CorrectionValues correction, net.raphimc.viabedrock.api.model.PlayerModeMessage.State mode, PhysicalState state)
    Creates an instance of a PhysicalActorState record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    accepts(net.raphimc.viabedrock.api.model.ActorMotionCommand command, net.minecraft.client.player.LocalPlayer player)
     
    boolean
    accepts(net.raphimc.viabedrock.api.model.PlayerCorrection command, net.minecraft.client.player.LocalPlayer player)
     
    net.minecraft.world.entity.Entity
    Returns the value of the actor record component.
    capture(net.minecraft.world.entity.Entity actor)
     
    Returns the value of the correction record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    int
    id()
    Returns the value of the id record component.
    net.minecraft.client.multiplayer.ClientLevel
    Returns the value of the level record component.
    net.raphimc.viabedrock.api.model.NativeActorMessage.Snapshot
    Returns the value of the metadata record component.
    net.raphimc.viabedrock.api.model.PlayerModeMessage.State
    Returns the value of the mode record component.
    Returns the value of the nativeLifetime record component.
    boolean
    Returns the value of the physical record component.
    relationships(net.minecraft.world.entity.Entity actor)
     
    void
     
    Returns the value of the state record component.
    final String
    Returns a string representation of this record class.
    Returns the value of the uuid record component.
    boolean
    valid(net.minecraft.client.player.LocalPlayer player)
     

    Methods inherited from class Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • PhysicalActorState

      public PhysicalActorState(net.minecraft.world.entity.Entity actor, net.minecraft.client.multiplayer.ClientLevel level, int id, UUID uuid, UUID nativeLifetime, net.raphimc.viabedrock.api.model.NativeActorMessage.Snapshot metadata, boolean physical, PhysicalActorState.CorrectionValues correction, net.raphimc.viabedrock.api.model.PlayerModeMessage.State mode, PhysicalState state)
      Creates an instance of a PhysicalActorState record class.
      Parameters:
      actor - the value for the actor record component
      level - the value for the level record component
      id - the value for the id record component
      uuid - the value for the uuid record component
      nativeLifetime - the value for the nativeLifetime record component
      metadata - the value for the metadata record component
      physical - the value for the physical record component
      correction - the value for the correction record component
      mode - the value for the mode record component
      state - the value for the state record component
  • Method Details

    • capture

      public static PhysicalActorState capture(net.minecraft.world.entity.Entity actor)
    • relationships

      public static PhysicalActorState relationships(net.minecraft.world.entity.Entity actor)
    • accepts

      public boolean accepts(net.raphimc.viabedrock.api.model.PlayerCorrection command, net.minecraft.client.player.LocalPlayer player)
    • accepts

      public boolean accepts(net.raphimc.viabedrock.api.model.ActorMotionCommand command, net.minecraft.client.player.LocalPlayer player)
    • restore

      public void restore()
    • valid

      public boolean valid(net.minecraft.client.player.LocalPlayer player)
    • 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.
    • actor

      public net.minecraft.world.entity.Entity actor()
      Returns the value of the actor record component.
      Returns:
      the value of the actor record component
    • level

      public net.minecraft.client.multiplayer.ClientLevel level()
      Returns the value of the level record component.
      Returns:
      the value of the level record component
    • id

      public int id()
      Returns the value of the id record component.
      Returns:
      the value of the id record component
    • uuid

      public UUID uuid()
      Returns the value of the uuid record component.
      Returns:
      the value of the uuid record component
    • nativeLifetime

      public UUID nativeLifetime()
      Returns the value of the nativeLifetime record component.
      Returns:
      the value of the nativeLifetime record component
    • metadata

      public net.raphimc.viabedrock.api.model.NativeActorMessage.Snapshot metadata()
      Returns the value of the metadata record component.
      Returns:
      the value of the metadata record component
    • physical

      public boolean physical()
      Returns the value of the physical record component.
      Returns:
      the value of the physical record component
    • correction

      Returns the value of the correction record component.
      Returns:
      the value of the correction record component
    • mode

      public net.raphimc.viabedrock.api.model.PlayerModeMessage.State mode()
      Returns the value of the mode record component.
      Returns:
      the value of the mode record component
    • state

      public PhysicalState state()
      Returns the value of the state record component.
      Returns:
      the value of the state record component