Record Class ModelData

java.lang.Object
java.lang.Record
kr.toxicity.model.api.data.raw.ModelData
Record Components:
meta - meta
resolution - resolution
elements - elements
outliner - children
textures - textures
animations - animations
groups - groups (>=BlockBench 5.0.0)
placeholder - placeholder

@Internal public record ModelData(@NotNull ModelMeta meta, @NotNull ModelResolution resolution, @NotNull List<ModelElement> elements, @NotNull List<ModelChildren> outliner, @NotNull List<ModelTexture> textures, @Nullable List<ModelAnimation> animations, @Nullable List<ModelGroup> groups, @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

  • Method Details

    • loadBlueprint

      @NotNull public @NotNull ModelLoadResult loadBlueprint(@NotNull @NotNull String name)
      Converts model data to blueprint
      Parameters:
      name - blueprint name
      Returns:
      blueprint
    • loadBlueprint

      @NotNull public @NotNull ModelLoadResult loadBlueprint(@NotNull @NotNull String name, boolean strict)
      Converts model data to blueprint
      Parameters:
      name - blueprint name
      strict - strict
      Returns:
      blueprint
    • assertSupported

      public void assertSupported()
      Asserts this model
    • placeholder

      @NotNull public @NotNull ModelPlaceholder placeholder()
      Gets placeholder
      Returns:
      placeholder
    • animations

      @NotNull public @NotNull List<ModelAnimation> animations()
      Gets animation
      Returns:
      animation
    • groups

      @NotNull public @NotNull List<ModelGroup> groups()
      Gets groups
      Returns:
      groups
    • 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.
    • meta

      @NotNull public @NotNull ModelMeta meta()
      Returns the value of the meta record component.
      Returns:
      the value of the meta record component
    • 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