Commit 9684a0c
Add resource manager for data packs
Add packs
Updates to resources
I did most of this a few months ago. I don't remember all the specifics.
Remove leftover empty file from rebase
Fix compile errors related to PluginContainer
Add some missing javadocs
Convert PackVersion to a standard catalog type
More edits to javadocs
Fix licenses
Make proper register events for ResourceReloadListener and PackDiscoverer
Add a reload method to Engine to reload resources.
Tweaks to API for common impl
Update to use kyori text
Update for API changes
Implement resource events
API: rename the register event method
Update for registry changes
ResourcePath now wraps ResourceKey
Update for latest api-8.
Signed-off-by: Chris Sanders <[email protected]>
Fixup more naming convention
- Remove the need for a Closeablelist by turning it into Stream (which
auto closes) in ResourceManager.
Signed-off-by: Chris Sanders <[email protected]>
More refactoring
- PackInfo -> PackInformation
- Establish that `Pack` is engine-scoped. It is not the intention of
this API to instill that client resources should be loaded server side
nor should server data be loaded client side. That does not mean that a
plugin couldn't take it upon themselves to do so (they are simply files
after all) but it is the goal of the API to correctly establish what a
developer *should* be doing ultimately.
- Per the former, move retrieval of a PluginContainer's pack to
ResourceManager
- Migrate PackVersion/PackType to enums. There is no reason a developer
should be creating additional versions or types via the API.
Signed-off-by: Chris Sanders <[email protected]>
Move the information manager to the resource manager.
Plugins should grab their information first. If they want a pack, they
can call it off the information object.
Signed-off-by: Chris Sanders <[email protected]>
Update for feedback/refactoring
- Remove exposing listeners, not really a goal of this API unless we one
day add the ability to do additional plugin provided packs
- Move PackRepository up to engine, this is not tied to resource
managers
- Various method name fixes/javadoc fixes (needs an overall javadoc
pass)
Signed-off-by: Chris Sanders <[email protected]>
Name isn't very helpful.
Signed-off-by: Chris Sanders <[email protected]>
More updates to the resource packs API based on feedback.
Signed-off-by: Chris Sanders <[email protected]>
More updates based on discussion
- Toss PackOrder
- Toss PackVersion
- Add PackStatus (makes way more sense than order)
- Toss PackContentsMetadata (way too tied to Vanilla)
- Adjust more javadocs
Signed-off-by: Chris Sanders <[email protected]>
Further work after implementing the resource pack API
Signed-off-by: Chris Sanders <[email protected]>
Enforce that this is an id (and not a name)
Signed-off-by: Chris Sanders <[email protected]>
Add requireResource method to Pack
* Add #close override to resource related AutoClosables to match what is expected in Vanilla to reduce unnecessary checked exceptions (and FindBugs warnings)
Update based on comments in PR
Co-authored-by: Chris Sanders <[email protected]>
Co-authored-by: Daniel Naylor <[email protected]>1 parent 3481b71 commit 9684a0c
File tree
14 files changed
+641
-274
lines changed- src/main/java/org/spongepowered/api
- asset
- resource
- pack
14 files changed
+641
-274
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
29 | 34 | | |
30 | 35 | | |
| 36 | + | |
| 37 | + | |
31 | 38 | | |
32 | 39 | | |
33 | 40 | | |
| |||
48 | 55 | | |
49 | 56 | | |
50 | 57 | | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
51 | 68 | | |
52 | 69 | | |
53 | 70 | | |
| |||
61 | 78 | | |
62 | 79 | | |
63 | 80 | | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
64 | 90 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
29 | 28 | | |
30 | 29 | | |
31 | 30 | | |
| |||
160 | 159 | | |
161 | 160 | | |
162 | 161 | | |
163 | | - | |
164 | | - | |
165 | | - | |
166 | | - | |
167 | | - | |
168 | | - | |
169 | | - | |
170 | 162 | | |
171 | 163 | | |
172 | 164 | | |
| |||
197 | 189 | | |
198 | 190 | | |
199 | 191 | | |
200 | | - | |
| 192 | + | |
201 | 193 | | |
202 | 194 | | |
203 | 195 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
30 | 29 | | |
31 | 30 | | |
32 | 31 | | |
| |||
96 | 95 | | |
97 | 96 | | |
98 | 97 | | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | 98 | | |
109 | 99 | | |
110 | 100 | | |
| |||
This file was deleted.
Lines changed: 58 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
0 commit comments