Class RotateObjectComponent

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

public class RotateObjectComponent extends Object implements Component<EntityStore>
A component that represents an object that rotates at a given speed.
  • Field Details

  • Constructor Details

    • RotateObjectComponent

      public RotateObjectComponent()
      Empty Constructor for a RotateObjectComponent instance.

      Used by the codec to instantiate RotateObjectComponent instances.

    • RotateObjectComponent

      public RotateObjectComponent(float rotationSpeed)
      Default Constructor for a RotateObjectComponent instance.
      Parameters:
      rotationSpeed - The rotation speed to set.
  • Method Details

    • getComponentType

      @Nonnull public static ComponentType<EntityStore, RotateObjectComponent> getComponentType()
      Returns:
      the component type for the RotateObjectComponent component.
    • clone

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

    • setRotationSpeed

      public void setRotationSpeed(float rotationSpeed)
      Called to set the rotation speed of this component.
      Parameters:
      rotationSpeed - The rotation speed to set.
    • getRotationSpeed

      public float getRotationSpeed()
      Returns:
      the rotation speed of this component.