Package kr.toxicity.model.api.data.raw
Record Class ModelData
java.lang.Object
java.lang.Record
kr.toxicity.model.api.data.raw.ModelData
- Record Components:
resolution- resolutionelements- elementsoutliner- childrentextures- texturesanimations- 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 Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionModelData(@NotNull ModelResolution resolution, @NotNull List<ModelElement> elements, @NotNull List<ModelChildren> outliner, @NotNull List<ModelTexture> textures, @Nullable List<ModelAnimation> animations, @Nullable ModelPlaceholder placeholder) Creates an instance of aModelDatarecord class. -
Method Summary
Modifier and TypeMethodDescription@NotNull List<ModelAnimation> Returns the value of theanimationsrecord component.@NotNull List<ModelElement> elements()Returns the value of theelementsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanChecks this model is supported in the Minecraft client.@NotNull List<ModelChildren> outliner()Returns the value of theoutlinerrecord component.@NotNull ModelPlaceholderReturns the value of theplaceholderrecord component.@NotNull ModelResolutionReturns the value of theresolutionrecord component.floatscale()Gets cube scale of this model@NotNull List<ModelTexture> textures()Returns the value of thetexturesrecord component.@NotNull ModelBlueprinttoBlueprint(@NotNull String name) Converts model data to blueprintfinal StringtoString()Returns a string representation of this record class.
-
Field Details
-
GSON
public static final com.google.gson.Gson GSONGson 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 aModelDatarecord class.- Parameters:
resolution- the value for theresolutionrecord componentelements- the value for theelementsrecord componentoutliner- the value for theoutlinerrecord componenttextures- the value for thetexturesrecord componentanimations- the value for theanimationsrecord componentplaceholder- the value for theplaceholderrecord component
-
-
Method Details
-
toBlueprint
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
Returns the value of theplaceholderrecord component.- Returns:
- the value of the
placeholderrecord component
-
animations
Returns the value of theanimationsrecord component.- Returns:
- the value of the
animationsrecord component
-
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. -
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. -
equals
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 withObjects::equals(Object,Object). -
resolution
Returns the value of theresolutionrecord component.- Returns:
- the value of the
resolutionrecord component
-
elements
Returns the value of theelementsrecord component.- Returns:
- the value of the
elementsrecord component
-
outliner
Returns the value of theoutlinerrecord component.- Returns:
- the value of the
outlinerrecord component
-
textures
Returns the value of thetexturesrecord component.- Returns:
- the value of the
texturesrecord component
-