ObsidianBox / Obsidian

Obsidian is the implementation of Magma that extends Forge to deliver server-side content on demand.
http://obsidianbox.org
MIT License
12 stars 3 forks source link

Fixed asset loading #2

Closed Lunaphied closed 10 years ago

Lunaphied commented 10 years ago

Assets wouldn't load as they weren't part of the obsidian domain. Now they load correctly.

coveralls commented 10 years ago

Coverage Status

Coverage remained the same when pulling 9d6b6378649554edeaf1efcc962fe3160ee1607d on modwizcode:master into 42626289c7cc6f0010edd212f4355ea3b67b2dd3 on ObsidianBox:master.

Zidane commented 10 years ago

Yeah this should work but we hit a new problem (perhaps it isn't, lets discuss)

For every addon, I had envisioned that the addon would have its own AddonResourcePack.

In @Grinch 's Chocolate, he puts his assets in:

/assets/obsidian/textures/blocks/chocolate/something.png

From an addon developer's point of view, you should never have to worry about the obsidian part, in the addon's jar the path should be:

/assets/chocolate/textures/blocks/something.png

You should be able to easily make the change to the Custom*\ classes and AddonResourcePack to make that work. The problem is someone putting assets outside the jar, we would need to devise a system where we check jar first for resource and if not present we would look in:

/assets/obsidian/textures/blocks/chocolate/something.png

We don't want addon resources that are OUTSIDE a jar existing outside the obsidian folder in assets in-case a mod has the same identifier. I welcome any thoughts on this.

Zidane commented 10 years ago

(cont.)

Forgot to mention the filesystem should be an override. If a user knows to put an asset in /assets/obsidian/textures/blocks/something.png cause he doesn't like Grinch's something.png, the AddonResourcePack should use that first and the jar second

Wanted to fix my incorrect statement.

tl;dr Search filesystem first, jar second.

Lunaphied commented 10 years ago

Yeah that's what I was trying to figure out when I started working on this. Actually I believe the default will be to use the file system, I already checked and resource packs work just fine. As for the correct path, I was more trying to get everything working as is, since chocolate does use a strange path that doesn't have to change if I loaded them this way.

Lunaphied commented 10 years ago

These paths make more sense.

Lunaphied commented 10 years ago

Items keep the same paths but now blocks have textures/blocks/

coveralls commented 10 years ago

Coverage Status

Coverage remained the same when pulling cb4a3f65189ae3602e87e3ad083b09a0c221a38b on modwizcode:master into 42626289c7cc6f0010edd212f4355ea3b67b2dd3 on ObsidianBox:master.

Lunaphied commented 10 years ago

The icon for doors wasn't working

coveralls commented 10 years ago

Coverage Status

Coverage remained the same when pulling 87f4e098532fc8496a8e40621878209866c709c7 on modwizcode:master into 42626289c7cc6f0010edd212f4355ea3b67b2dd3 on ObsidianBox:master.