deathcap / wsmc

WebSocket proxy to Minecraft
33 stars 10 forks source link

Serve texture packs through wsmc web server #44

Open deathcap opened 8 years ago

deathcap commented 8 years ago

MC has a 'set resource pack' packet, can point to remote URLs of resource pack archives to offer the client to download. Would be nice if wsmc could serve these resource pack files from its integrated webserver – a new configuration option, give it a local file, and have wsmc serve it then push the resource pack packet, with the local URL.

voxel-clientmc recognizes server-offered resource packs: https://github.com/voxel/voxel-clientmc/blob/69982f742ead55423d1a8d5c4c09c2ed806144e6/resource_pack.js - but only shows the URL to the user to let them download and manually install (drag and drop into browser window https://github.com/voxel/voxel-drop), but if they were served locally, then the web client could fetch https://github.com/voxel/voxel-clientmc/issues/39 them using XHR, as they won't need to cross origins.

Also could be useful for servers with mods, containing extra textures for new blocks. The 'stock' texture pack won't necessarily have everything, better if the server could push what it needs since it knows best.