Interface Drawable

    • Method Summary

      All Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      default int compareTo​(Drawable o)  
      String getTextureHandle()
      Get the handle of the texture for this drawable.
      double getX()
      Get the x coordinate of the drawable.
      double getY()
      Get the y coordinate of the drawable.
      int getZ()
      Get the z value of the drawable.
      default boolean isAnimated()
      Return wether the Drawable is animated.
      default boolean isTilable()
      Return wether this Drawable can be drawn tiled if multiple are present in the same cell.
      default void setCurrentTick​(long renderTick)
      Set the current render tick for animated drawables.
    • Method Detail

      • getX

        double getX()
        Get the x coordinate of the drawable. The coordinate system is based on cells where fractionals denote positions between cells.
        Returns:
        returns the X position as a double
      • getY

        double getY()
        Get the y coordinate of the drawable. The coordinate system is based on cells where fractionals denote positions between cells.
        Returns:
        returns the Y position as a double
      • getZ

        int getZ()
        Get the z value of the drawable. The z value is used to decide the drawing order of Drawables in the same cell.
        Returns:
        returns the Z position as a double
      • getTextureHandle

        String getTextureHandle()
        Get the handle of the texture for this drawable. The texture must be registered in the TextureRegistry.
        Returns:
        returns the texture handle as a String
      • isTilable

        default boolean isTilable()
        Return wether this Drawable can be drawn tiled if multiple are present in the same cell.
        Returns:
        true if the Drawable is tilable
      • isAnimated

        default boolean isAnimated()
        Return wether the Drawable is animated.
        Returns:
        true iff any property (x, y, z) is animated
      • setCurrentTick

        default void setCurrentTick​(long renderTick)
        Set the current render tick for animated drawables.
        Parameters:
        renderTick - The current render tick