Class PhysicsValues

java.lang.Object
com.hypixel.hytale.server.core.modules.physics.component.PhysicsValues
All Implemented Interfaces:
Component<EntityStore>, Cloneable

public class PhysicsValues extends Object implements Component<EntityStore>
  • Field Details

    • ZERO

      @Nonnull public static final Double ZERO
      A constant representing zero value for validation.
    • CODEC

      @Nonnull public static final BuilderCodec<PhysicsValues> CODEC
      The codec used to parse PhysicsValues instances.
  • Constructor Details

    • PhysicsValues

      public PhysicsValues()
    • PhysicsValues

      public PhysicsValues(@Nonnull PhysicsValues other)
    • PhysicsValues

      public PhysicsValues(double mass, double dragCoefficient, boolean invertedGravity)
  • Method Details

    • getComponentType

      @Nonnull public static ComponentType<EntityStore, PhysicsValues> getComponentType()
      Returns:
      the component type for PhysicsValues components
    • replaceValues

      public void replaceValues(@Nonnull PhysicsValues other)
    • resetToDefault

      public void resetToDefault()
    • scale

      public void scale(float scale)
    • getMass

      public double getMass()
    • getDragCoefficient

      public double getDragCoefficient()
    • isInvertedGravity

      public boolean isInvertedGravity()
    • getDefault

      @Nonnull public static PhysicsValues getDefault()
    • toString

      @Nonnull public String toString()
      Overrides:
      toString in class Object
    • clone

      @Nonnull public Component<EntityStore> clone()
      Specified by:
      clone in interface Component<EntityStore>
      Returns:
      a clone instance of the original component instance.