Contents
Class Velocity.Instruction
java.lang.Object
com.hypixel.hytale.server.core.modules.physics.component.Velocity.Instruction
- Enclosing class:
Velocity
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 Summary
ConstructorsConstructorDescriptionInstruction(org.joml.Vector3d velocity, VelocityConfig config, ChangeVelocityType type) Default Constructor for anVelocity.InstructioninstanceInstruction(org.joml.Vector3d velocity, VelocityConfig config, ChangeVelocityType type, float preMultiplier) Default Constructor for anVelocity.Instructioninstance when a pre-multiplier exists -
Method Summary
-
Constructor Details
-
Instruction
public Instruction(@Nonnull org.joml.Vector3d velocity, @Nullable VelocityConfig config, @Nonnull ChangeVelocityType type) Default Constructor for anVelocity.Instructioninstance- Parameters:
velocity- The velocity value to be appliedconfig- The velocity config to be referenced, if anytype- 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 anVelocity.Instructioninstance when a pre-multiplier exists- Parameters:
velocity- The velocity value to be appliedconfig- The velocity config to be referenced, if anytype- The type of application to perform with the velocitypreMultiplier- 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
- Returns:
- the velocity config to be referenced, if any
-
getType
- Returns:
- the type of application to perform with the velocity
-
getPreMultiplier
public float getPreMultiplier()- Returns:
- Tracking pre-multiplier systems have used to scale
velocityx/z
-