Class Velocity.Instruction

java.lang.Object
com.hypixel.hytale.server.core.modules.physics.component.Velocity.Instruction
Enclosing class:
Velocity

public static final class Velocity.Instruction extends Object
A single instruction to be applied to the velocity

The approach used to apply this instruction is handled by a different velocity instruction systems, depending on the needs.

  • Constructor Details

    • Instruction

      public Instruction(@Nonnull org.joml.Vector3d velocity, @Nullable VelocityConfig config, @Nonnull ChangeVelocityType type)
      Default Constructor for an Velocity.Instruction instance
      Parameters:
      velocity - The velocity value to be applied
      config - The velocity config to be referenced, if any
      type - The type of application to perform with the velocity
    • Instruction

      public Instruction(@Nonnull org.joml.Vector3d velocity, @Nullable VelocityConfig config, @Nonnull ChangeVelocityType type, float preMultiplier)
      Default Constructor for an Velocity.Instruction instance when a pre-multiplier exists
      Parameters:
      velocity - The velocity value to be applied
      config - The velocity config to be referenced, if any
      type - The type of application to perform with the velocity
      preMultiplier - A tracking pre-multiplier value used by some systems to compensate behavior differences between NPCs and players
  • Method Details

    • getVelocity

      @Nonnull public org.joml.Vector3d getVelocity()
      Returns:
      the velocity value to be applied
    • getConfig

      @Nullable public VelocityConfig getConfig()
      Returns:
      the velocity config to be referenced, if any
    • getType

      @Nonnull public ChangeVelocityType getType()
      Returns:
      the type of application to perform with the velocity
    • getPreMultiplier

      public float getPreMultiplier()
      Returns:
      Tracking pre-multiplier systems have used to scale velocity x/z