Method | Description | |
---|---|---|
Add ( |
Adds a new resource to a cache.
|
|
AddRaw ( |
Adds raw, pre-compressed resource data to a cache.
|
|
Extract ( |
Extracts and decompresses the data for a resource.
|
|
ExtractRaw ( |
Extracts raw, compressed resource data.
|
|
LoadCache ( ResourceLocation location, string path ) : void |
Loads a resource cache from a file.
|
|
LoadCacheFromDirectory ( string directory, ResourceLocation cache ) : void |
Loads a resource cache from a directory using its default name.
|
|
LoadCachesFromDirectory ( string directory ) : void |
Loads resource caches from a directory using their default filenames.
|
|
Replace ( |
Compresses and replaces the data for a resource.
|
|
ReplaceRaw ( |
Replaces a resource with raw, pre-compressed data.
|
Method | Description | |
---|---|---|
GetCache ( |
public Add ( |
||
resource | The resource reference to initialize. | |
location | ResourceLocation | The location where the resource should be stored. |
dataStream | Stream | The stream to read the resource data from. |
return | void |
public AddRaw ( |
||
resource | The resource reference to initialize. | |
location | ResourceLocation | The location where the resource should be stored. |
data | byte | The pre-compressed data to store. |
return | void |
public Extract ( |
||
resource | The resource. | |
outStream | Stream | The stream to write the extracted data to. |
return | void |
public ExtractRaw ( |
||
resource | The resource. | |
return | byte[] |
public LoadCache ( ResourceLocation location, string path ) : void | ||
location | ResourceLocation | The resource cache type. |
path | string | The path to the .dat file to read. |
return | void |
public LoadCacheFromDirectory ( string directory, ResourceLocation cache ) : void | ||
directory | string | The directory to find the cache in. |
cache | ResourceLocation | The type of cache to load. |
return | void |
public LoadCachesFromDirectory ( string directory ) : void | ||
directory | string | The directory to find files in. |
return | void |
public Replace ( |
||
resource | The resource whose data should be replaced. On success, the reference will be adjusted to account for the new data. | |
dataStream | Stream | The stream to read the new data from. |
return | void |
public ReplaceRaw ( |
||
resource | The resource whose data should be replaced. On success, the reference will be adjusted to account for the new data. | |
data | byte | The raw, pre-compressed data to use. |
return | void |