Class ModelAsset
- java.lang.Object
-
- dev.linwood.itemmods.pack.DefinedNamedPackObject
-
- dev.linwood.itemmods.pack.asset.PackAsset
-
- dev.linwood.itemmods.pack.asset.raw.RawAsset
-
- dev.linwood.itemmods.pack.asset.raw.ModelAsset
-
- 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 String name)
ModelAsset(@NotNull String name, @NotNull com.google.gson.JsonObject jsonObject)
ModelAsset(@NotNull String name, @NotNull String url)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
export(String namespace, String variation, int packFormat, @NotNull Path path)
com.google.gson.JsonObject
getDefaultJsonObject()
@NotNull org.bukkit.Material
getFallbackTexture()
com.google.gson.JsonObject
getJsonObject(String variation)
com.google.gson.JsonObject
getJsonObjectOrDefault(String variation)
@Nullable Integer
getStaticModel()
boolean
isStatic()
com.google.gson.JsonObject
save(String namespace)
void
setDefaultJsonObject(@NotNull com.google.gson.JsonObject jsonObject)
void
setFallbackTexture(@NotNull org.bukkit.Material fallbackTexture)
void
setJsonObject(String variation, com.google.gson.JsonObject jsonObject)
void
setStaticModel(@Nullable 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.DefinedNamedPackObject
getName, setName
-
-
-
-
Constructor Detail
-
ModelAsset
public ModelAsset(@NotNull @NotNull String name)
-
ModelAsset
public ModelAsset(@NotNull @NotNull String name, @NotNull @NotNull String url) throws IOException
- Throws:
IOException
-
ModelAsset
public ModelAsset(@NotNull @NotNull String name, @NotNull @NotNull com.google.gson.JsonObject jsonObject)
-
-
Method Detail
-
isStatic
public boolean isStatic()
-
getStaticModel
@Nullable public @Nullable Integer getStaticModel()
-
setStaticModel
public void setStaticModel(@Nullable @Nullable 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(String variation)
-
getJsonObjectOrDefault
public com.google.gson.JsonObject getJsonObjectOrDefault(String variation)
-
getDefaultJsonObject
public com.google.gson.JsonObject getDefaultJsonObject()
-
setDefaultJsonObject
public void setDefaultJsonObject(@NotNull @NotNull com.google.gson.JsonObject jsonObject)
-
setJsonObject
public void setJsonObject(String variation, com.google.gson.JsonObject jsonObject)
-
export
public void export(String namespace, String variation, int packFormat, @NotNull @NotNull Path path) throws IOException
- Overrides:
export
in classRawAsset
- Throws:
IOException
-
-