Class DisplayBuilder

java.lang.Object
io.github.vampirestudios.vampirelib.api.datagen.DisplayBuilder

public class DisplayBuilder extends Object
Instantiate this class in order to provide an optional set of display properties for a given model JSON.
  • Constructor Details

    • DisplayBuilder

      public DisplayBuilder()
  • Method Details

    • rotate

      public DisplayBuilder rotate(double x, double y, double z)
      Rotate the model by the given vector.
      Parameters:
      x - The X-coordinate of the rotation.
      y - The Y-coordinate of the rotation.
      z - The Z-coordinate of the rotation.
      Returns:
      The current newly-modified DisplayBuilder instance.
    • rotate

      public DisplayBuilder rotate(org.joml.Vector3d vec)
      Rotate the model by the given vector.
      Parameters:
      vec - A rotation vector.
      Returns:
      The current newly-modified DisplayBuilder instance.
    • translate

      public DisplayBuilder translate(double x, double y, double z)
      Translate the model by the given vector.
      Parameters:
      x - The X-coordinate of the translation.
      y - The Y-coordinate of the translation.
      z - The Z-coordinate of the translation.
      Returns:
      The current newly-modified DisplayBuilder instance.
    • translate

      public DisplayBuilder translate(org.joml.Vector3d vec)
      Translate the model by the given vector.
      Parameters:
      vec - A translation vector.
      Returns:
      The current newly-modified DisplayBuilder instance.
    • scale

      public DisplayBuilder scale(double f)
      Scale the model by the given scale factor.
      Parameters:
      f - The constant factor to scale the model by in all three cardinal directions.
      Returns:
      The current newly-modified DisplayBuilder instance.
    • scale

      public DisplayBuilder scale(double x, double y, double z)
      Scale the model by the given vector.
      Parameters:
      x - The scalar for the X-direction.
      y - The scalar for the Y-direction.
      z - The scalar for the Z-direction.
      Returns:
      The current newly-modified DisplayBuilder instance.
    • scale

      public DisplayBuilder scale(org.joml.Vector3d vec)
      Scale the model by the given vector.
      Parameters:
      vec - A scale vector.
      Returns:
      The current newly-modified DisplayBuilder instance.
    • build

      public com.google.gson.JsonObject build()