Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Couple of questions regarding this "ecosystem" #122

Open
HoldYourWaffle opened this issue Mar 26, 2020 · 2 comments
Open

Couple of questions regarding this "ecosystem" #122

HoldYourWaffle opened this issue Mar 26, 2020 · 2 comments

Comments

@HoldYourWaffle
Copy link
Contributor

I just found this repository while doing the whole "this must have been done before"-search for a project I'm working on, and I have to say it looks very promising and I'd love to contribute 馃槃

I have a few questions however to clear up some confusion:

  1. I found two other repositories in this organization that look very similar to some modules in this one, minecraft-three-model and minecraft-resource-manager-js. What's the relation between those repositories and their "corresponding" modules in this repository? (model and resource-manager)

  2. What's the relation between resourcepack and resource-manager? Intuitively I'd think resourcepack would be a "resource implementation" for resource-manager, but various "common resource interfaces" like Resource and ResourceLocation are defined in the (more specific) resourcepack.

  3. The documentation on what is a resource/resource-manager/resource-pack/resource-source doesn't seem to "add up" so to speak. For example, the resource-manager readme mentions an addResourceSource method on ResourceManager, but I can't find the definition for this. The documentation for ResourceManager also mentions a generic parameter for the "type of resource content", but it doesn't seem to actually exist.
    I know there are more of these kinds of discrepancies, but right now I only remember those two. Is the documentation just outdated or am I missing something here?

  4. What is the zlib folder inside the nbt module?

As I said before, I'd love to contribute to this project (#102 (comment)), but right now I'm mostly getting confused by it 馃槄

@ci010
Copy link
Collaborator

ci010 commented Mar 26, 2020

  1. They are the legacy repo to manage the code. Currently, those two are managed under this monorepo (@xmcl/model and @xmcl/resource-manager)
  2. ResourcePack module only provides read resource from a single resource pack (a zip or a folder). The ResourceManager can manage multiple resource pack at once, just like Minecraft. You will need to add resource pack into it and calling loadResource from it will load the resource from "top to bottom" (just like Minecraft). Overall, the resource-manager is a higher level module.
  3. That's a outdated document. When I migrate the code to this repo, I forgot to rename the code in doc. I will rename and update other docs in next patch. The addResourceSource should be addResourcePack.
  4. You will see the folder inside a package like nbt/zlib, or user/util. In short, it's an abstract layer to make the package works in both node and browser. The zlib is the abstract layer for the compress/decompress functions. The nbt module require('./zlib') will require either index.ts or index.browser.ts according to the environment (the bundler like webpack will pick a correct one!).

Finally, I'm appreciated your passion. It's welcome to contribute on chunk parsing feature! I'll add more detail in roadmap thread.

@HoldYourWaffle
Copy link
Contributor Author

Thank you so much for your rapid response!

  1. So if I understand correctly, these repositories could just as well be deleted (or marked as archived)?

  2. I guess that makes sense. It might be good to further clarify this relationship in the documentation.

  3. I just read (most of) the updated documentation, this makes a lot more sense indeed.

  4. I guess that make sense.
    However, this also raises some new questions for me, regarding the overall "(sub)module structure" of this project, but I'll wait to post them until I have fully "analyzed" it (to prevent things like stupid oversights).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants