tutorial:resource
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
tutorial:resource [2019/06/30 07:21] – created liach | tutorial:resource [2019/09/26 01:42] (current) – Notes on getAllResources liach | ||
---|---|---|---|
Line 81: | Line 81: | ||
Synchronizer: | Synchronizer: | ||
+ | ==== Example Usage ==== | ||
Example of efficient resource reloading: | Example of efficient resource reloading: | ||
<code java> | <code java> | ||
Line 124: | Line 125: | ||
Just be careful when you call these two methods in ResourceManager: | Just be careful when you call these two methods in ResourceManager: | ||
<code java> | <code java> | ||
- | Resource getResource(Identifier var1) throws IOException; | + | // Use try-with-resources can help you a lot |
- | List<Resource> getAllResources(Identifier var1) throws IOException; | + | Resource |
+ | |||
+ | // Low priority resources are earlier in this list! | ||
+ | // Warning: You must close all resource in this! Not just closing the input stream, there is another input stream for the mcmeta file! | ||
+ | List< | ||
</ | </ | ||
tutorial/resource.1561879279.txt.gz · Last modified: 2019/06/30 07:21 by liach