Voxelum / minecraft-launcher-core-node

Provide packages to install Minecraft, launch Minecraft and more to build launcher with NodeJs/Electron!
https://docs.xmcl.app/en/core/
MIT License
174 stars 25 forks source link

Use in Browser #246

Closed UndarkAido closed 1 year ago

UndarkAido commented 1 year ago

I've been trying to get this to work in a webpage today and I've been failing, has anyone tried recently? I think I've gotten all of the Node.JS fallbacks working but it seems to be hung up on the usage of Buffer in yauzl and I'm stumped

And then I think I need to load the pack from a blob? I'm also wondering if I can use Minecraft's JAR as a pack.

John-Dean commented 1 year ago

Yep, I've got (at least part of the library) working.

https://github.com/John-Dean/MCGame

Using "webpack": "^5.73.0"

Config file here: https://github.com/John-Dean/MCGame/blob/98128f3b2bd13a486eb87c1427b5ecbeba9e1a83/packaged/config/webpack.browser.js

I'm using model nbt resourcepack system unzip and world

ci010 commented 1 year ago

In readme, there is a table in the section named Active Packages. The last column of the table should tell the environment.