-
Notifications
You must be signed in to change notification settings - Fork 56
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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: server resource packs #215
Conversation
Review or Edit in CodeSandboxOpen the branch in Web Editor • VS Code • Insiders |
/deploy |
Deployed to Vercel Preview: https://prismarine-lieqk4t2x-zaro.vercel.app |
@@ -58,31 +64,36 @@ export const installTexturePackFromHandle = async () => { | |||
// await completeTexturePackInstall() | |||
} | |||
|
|||
export const installTexturePack = async (file: File | ArrayBuffer, displayName = file['name'], name = 'default') => { | |||
export const installTexturePack = async (file: File | ArrayBuffer, displayName = file['name'], name = 'default', isServer = false) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could lead to problems. I had the problem that under some conditions the name
key inside file
was undefined.
export const installTexturePack = async (file: File | ArrayBuffer, displayName = file['name'], name = 'default', isServer = false) => { | |
export const installTexturePack = async (file: File | ArrayBuffer, displayName = file['name'] ?? 'default.zip', name = 'default', isServer = false) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It will be undefined. Display name is not needed after server resource pack is installed as it's not used in the ui, but a good catch, thanks
@zardoy can this be merged? |
Yes I think so, I will add models handling in some other pr I think then |
@Mqxx did you check that it works on 1.21? |
Co-authored-by: Mqx <[email protected]>
No description provided.