Class Interaction

java.lang.Object
dev.boze.api.utility.interaction.Interaction

public class Interaction extends Object
Interaction represents a client to server interaction that may require rotation
  • Constructor Details

    • Interaction

      public Interaction(Runnable action)
      Creates an interaction that doesn't require rotation
      Parameters:
      action - The action to run
    • Interaction

      public Interaction(Runnable action, float yaw, float pitch)
      Creates an interaction that requires specific rotation
      Parameters:
      action - The action to run
      yaw - The yaw rotation required
      pitch - The pitch rotation required
  • Method Details

    • shouldRotate

      public boolean shouldRotate()
      Returns whether this interaction requires rotation
      Returns:
      true if rotation is required, false otherwise
    • getYaw

      public float getYaw()
      Gets the yaw rotation
      Returns:
      The yaw rotation
    • getPitch

      public float getPitch()
      Gets the pitch rotation
      Returns:
      The pitch rotation
    • run

      public void run()
      Runs the interaction action