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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: server resource packs #215

Merged
merged 8 commits into from
Oct 30, 2024
Merged

feat: server resource packs #215

merged 8 commits into from
Oct 30, 2024

Conversation

zardoy
Copy link
Owner

@zardoy zardoy commented Oct 13, 2024

No description provided.

Copy link

codesandbox bot commented Oct 13, 2024

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders

Open Preview

@zardoy
Copy link
Owner Author

zardoy commented Oct 13, 2024

/deploy

Copy link

Deployed to Vercel Preview: https://prismarine-lieqk4t2x-zaro.vercel.app
Playground
Storybook

@@ -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) => {
Copy link

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.

Suggested change
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) => {

Copy link
Owner Author

@zardoy zardoy Oct 29, 2024

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

@Mqxx
Copy link

Mqxx commented Oct 29, 2024

@zardoy can this be merged?

@zardoy
Copy link
Owner Author

zardoy commented Oct 29, 2024

@zardoy can this be merged?

Yes I think so, I will add models handling in some other pr I think then

@zardoy zardoy changed the title Server resource packs feat server resource packs Oct 30, 2024
@zardoy zardoy changed the title feat server resource packs feat: server resource packs Oct 30, 2024
@zardoy
Copy link
Owner Author

zardoy commented Oct 30, 2024

@Mqxx did you check that it works on 1.21?

@zardoy zardoy merged commit 03c6a3f into next Oct 30, 2024
2 checks passed
@zardoy zardoy deleted the server-resource-pack branch October 30, 2024 11:40
gguio pushed a commit to gguio/prismarine-web-client that referenced this pull request Nov 10, 2024
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

Successfully merging this pull request may close these issues.

2 participants