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 voidexport(String namespace, String variation, int packFormat, @NotNull Path path)com.google.gson.JsonObjectgetDefaultJsonObject()@NotNull org.bukkit.MaterialgetFallbackTexture()com.google.gson.JsonObjectgetJsonObject(String variation)com.google.gson.JsonObjectgetJsonObjectOrDefault(String variation)@Nullable IntegergetStaticModel()booleanisStatic()com.google.gson.JsonObjectsave(String namespace)voidsetDefaultJsonObject(@NotNull com.google.gson.JsonObject jsonObject)voidsetFallbackTexture(@NotNull org.bukkit.Material fallbackTexture)voidsetJsonObject(String variation, com.google.gson.JsonObject jsonObject)voidsetStaticModel(@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:
exportin classRawAsset- Throws:
IOException
-
-