Class ModelAsset
- java.lang.Object
-
- Direct Known Subclasses:
CubitBlockModel
public class ModelAsset extends RawAsset
-
-
Field Summary
-
Fields inherited from class dev.linwood.itemmods.pack.DefinedNamedPackObject
GSON, name
-
-
Constructor Summary
Constructors Constructor Description ModelAsset(@NotNull java.lang.String name)
ModelAsset(@NotNull java.lang.String name, @NotNull com.google.gson.JsonObject jsonObject)
ModelAsset(@NotNull java.lang.String name, @NotNull java.lang.String url)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
export(java.lang.String namespace, java.lang.String variation, @NotNull java.nio.file.Path path)
com.google.gson.JsonObject
getDefaultJsonObject()
@NotNull org.bukkit.Material
getFallbackTexture()
com.google.gson.JsonObject
getJsonObject(java.lang.String variation)
com.google.gson.JsonObject
getJsonObjectOrDefault(java.lang.String variation)
@Nullable java.lang.Integer
getStaticModel()
boolean
isStatic()
com.google.gson.JsonObject
save(java.lang.String namespace)
void
setDefaultJsonObject(@NotNull com.google.gson.JsonObject jsonObject)
void
setFallbackTexture(@NotNull org.bukkit.Material fallbackTexture)
void
setJsonObject(java.lang.String variation, com.google.gson.JsonObject jsonObject)
void
setStaticModel(@Nullable java.lang.Integer staticModel)
-
Methods inherited from class dev.linwood.itemmods.pack.asset.raw.RawAsset
getData, getDataOrDefault, getDefaultTexture, getVariations, removeVariation, setData, setData, setDefaultData, setDefaultData
-
Methods inherited from class dev.linwood.itemmods.pack.asset.CustomPackAsset
getTemplates, registerTemplate, registerTemplate, unregisterTemplate, unregisterTemplate
-
Methods inherited from class dev.linwood.itemmods.pack.asset.CustomNamedAsset
getDisplayName, removeDisplayName, setDisplayName
-
Methods inherited from class dev.linwood.itemmods.pack.DefinedNamedPackObject
getName, setName
-
-
-
-
Constructor Detail
-
ModelAsset
public ModelAsset(@NotNull @NotNull java.lang.String name)
-
ModelAsset
public ModelAsset(@NotNull @NotNull java.lang.String name, @NotNull @NotNull java.lang.String url) throws java.io.IOException
- Throws:
java.io.IOException
-
ModelAsset
public ModelAsset(@NotNull @NotNull java.lang.String name, @NotNull @NotNull com.google.gson.JsonObject jsonObject)
-
-
Method Detail
-
isStatic
public boolean isStatic()
-
getStaticModel
@Nullable public @Nullable java.lang.Integer getStaticModel()
-
setStaticModel
public void setStaticModel(@Nullable @Nullable java.lang.Integer staticModel)
-
getFallbackTexture
@NotNull public @NotNull org.bukkit.Material getFallbackTexture()
-
setFallbackTexture
public void setFallbackTexture(@NotNull @NotNull org.bukkit.Material fallbackTexture)
-
getJsonObject
public com.google.gson.JsonObject getJsonObject(java.lang.String variation)
-
getJsonObjectOrDefault
public com.google.gson.JsonObject getJsonObjectOrDefault(java.lang.String variation)
-
getDefaultJsonObject
public com.google.gson.JsonObject getDefaultJsonObject()
-
setDefaultJsonObject
public void setDefaultJsonObject(@NotNull @NotNull com.google.gson.JsonObject jsonObject)
-
setJsonObject
public void setJsonObject(java.lang.String variation, com.google.gson.JsonObject jsonObject)
-
save
public com.google.gson.JsonObject save(java.lang.String namespace)
-
-