Record Class ModelData

java.lang.Object
java.lang.Record
kr.toxicity.model.api.data.raw.ModelData
Record Components:
resolution - resolution
elements - elements
outliner - children
textures - textures
animations - animations

@Internal public record ModelData(@NotNull ModelResolution resolution, @NotNull List<ModelElement> elements, @NotNull List<ModelChildren> outliner, @NotNull List<ModelTexture> textures, @Nullable List<ModelAnimation> animations, @Nullable ModelPlaceholder placeholder) extends Record
Raw BlockBench model's data.
  • Field Details

    • GSON

      public static final com.google.gson.Gson GSON
      Gson parser
  • Constructor Details

    • ModelData

      public ModelData(@NotNull @NotNull ModelResolution resolution, @NotNull @NotNull List<ModelElement> elements, @NotNull @NotNull List<ModelChildren> outliner, @NotNull @NotNull List<ModelTexture> textures, @Nullable @Nullable List<ModelAnimation> animations, @Nullable @Nullable ModelPlaceholder placeholder)
      Creates an instance of a ModelData record class.
      Parameters:
      resolution - the value for the resolution record component
      elements - the value for the elements record component
      outliner - the value for the outliner record component
      textures - the value for the textures record component
      animations - the value for the animations record component
      placeholder - the value for the placeholder record component
  • Method Details

    • toBlueprint

      @NotNull public @NotNull ModelBlueprint toBlueprint(@NotNull @NotNull String name)
      Converts model data to blueprint
      Parameters:
      name - blueprint name
      Returns:
      blueprint
    • isSupported

      public boolean isSupported()
      Checks this model is supported in the Minecraft client.
      Returns:
      is supported
    • scale

      public float scale()
      Gets cube scale of this model
      Returns:
      scale
    • placeholder

      @NotNull public @NotNull ModelPlaceholder placeholder()
      Returns the value of the placeholder record component.
      Returns:
      the value of the placeholder record component
    • animations

      @NotNull public @NotNull List<ModelAnimation> animations()
      Returns the value of the animations record component.
      Returns:
      the value of the animations record component
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • resolution

      @NotNull public @NotNull ModelResolution resolution()
      Returns the value of the resolution record component.
      Returns:
      the value of the resolution record component
    • elements

      @NotNull public @NotNull List<ModelElement> elements()
      Returns the value of the elements record component.
      Returns:
      the value of the elements record component
    • outliner

      @NotNull public @NotNull List<ModelChildren> outliner()
      Returns the value of the outliner record component.
      Returns:
      the value of the outliner record component
    • textures

      @NotNull public @NotNull List<ModelTexture> textures()
      Returns the value of the textures record component.
      Returns:
      the value of the textures record component