Class RawAsset
- java.lang.Object
-
- dev.linwood.itemmods.pack.DefinedNamedPackObject
-
- dev.linwood.itemmods.pack.asset.PackAsset
-
- dev.linwood.itemmods.pack.asset.raw.RawAsset
-
- Direct Known Subclasses:
ModelAsset
,SoundAsset
,TextureAsset
public abstract class RawAsset extends PackAsset
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
export(String namespace, String variation, int packFormat, Path path)
byte[]
getData(String variation)
byte[]
getDataOrDefault(String variation)
byte[]
getDefaultTexture()
@NotNull Set<String>
getVariations()
void
removeVariation(String variation)
com.google.gson.JsonObject
save(String namespace)
void
setData(String variation, byte[] bytes)
void
setData(String variation, @NotNull String url)
void
setDefaultData(byte[] bytes)
void
setDefaultData(@NotNull String url)
-
Methods inherited from class dev.linwood.itemmods.pack.DefinedNamedPackObject
getName, setName
-
-
-
-
Constructor Detail
-
RawAsset
public RawAsset(@NotNull @NotNull String name)
-
RawAsset
public RawAsset(@NotNull @NotNull String name, @NotNull @NotNull String url) throws IOException
- Throws:
IOException
-
RawAsset
public RawAsset(@NotNull @NotNull String name, @NotNull @NotNull com.google.gson.JsonObject jsonObject)
-
-
Method Detail
-
getDefaultTexture
public byte[] getDefaultTexture()
-
setDefaultData
public void setDefaultData(byte[] bytes)
-
setDefaultData
public void setDefaultData(@NotNull @NotNull String url) throws IOException
- Throws:
IOException
-
removeVariation
public void removeVariation(String variation)
-
getData
public byte[] getData(String variation)
-
getDataOrDefault
public byte[] getDataOrDefault(String variation)
-
setData
public void setData(String variation, @NotNull @NotNull String url) throws IOException
- Throws:
IOException
-
setData
public void setData(String variation, byte[] bytes)
-
export
public void export(String namespace, String variation, int packFormat, Path path) throws IOException
- Throws:
IOException
-
-