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

对枪包升级逻辑的重构 #354

Open
wants to merge 25 commits into
base: 1.20.1
Choose a base branch
from

Conversation

SNWCreations
Copy link
Contributor

@SNWCreations SNWCreations commented Jan 7, 2025

现在支持文件夹格式枪包的直接转换,相对于压缩包格式的可能效率略低?
文件夹格式有关的翻译条目没有更改,若合并这个功能,则还请自行删除

另外修复了潜在的编码问题

两个晚上无聊写的(((

@SNWCreations
Copy link
Contributor Author

SNWCreations commented Jan 7, 2025

代码应该还能优化...明天看看,先draft一下

parseEntryName 的结果应该是可以复用的

@SNWCreations SNWCreations marked this pull request as draft January 7, 2025 14:44
@xjqsh
Copy link
Member

xjqsh commented Jan 7, 2025

文件夹是故意没写的其实(,因为有默认枪包和其他模组的导出枪包这个因素在,而且有部分枪包本身做的有问题“必须解压运行”(一般是塞了非法的文件名),所以强制要求自行压缩后转换

@SNWCreations
Copy link
Contributor Author

SNWCreations commented Jan 7, 2025 via email

@xjqsh
Copy link
Member

xjqsh commented Jan 8, 2025

有种白干的感觉 hah 默认枪包其实好解决,skip就完事了 必须解压运行的枪包没见过,如果说存在非法文件名的话压缩回去不会把文件名再带进去? 导出枪包有点太 special case 了 :/ 这个确实没啥好办法,除非知道怎么识别

嘛,其实还挺挺多的,特别是有些人喜欢装着optifine之类的东西做包,那种会把原版rl的校验干掉,塞了大写路径什么的自己也意识不到,或者干脆塞了点错误的文件(比如写错的配方或者其他配置,或者mp4爆改ogg,对,mp4,一个文件二十多m),压缩转换了大概率还是用不了,主要其实还是不想背这锅()他们只会觉得转换写的有问题;导出枪包其实也挺常见的,我自己的模组就有用,虽然可以拉一个不自动转换的黑名单,但是我觉得把这种东西内置进去未免太丑了一点)

@SNWCreations
Copy link
Contributor Author

SNWCreations commented Jan 8, 2025 via email

@SNWCreations SNWCreations marked this pull request as ready for review January 8, 2025 04:45
@xjqsh
Copy link
Member

xjqsh commented Jan 8, 2025

因为原版的奇怪机制,压缩包会直接崩游戏,解压了反而不会,貌似错误的文件就被忽略了,这个问题原版的资源包就有,导出枪包因为我当初给的示例是文件夹,然后大家用的都是文件夹(),主要传播的还挺广的,我那包下载量有本体的四分之一了,这个因素不得不考虑

@xjqsh
Copy link
Member

xjqsh commented Jan 8, 2025

要不这样吧,我们直接往配置文件里丢个不自动进行转换的黑名单得了)

@SNWCreations
Copy link
Contributor Author

解压的文件有 Windows/Unix 路径分隔符等平台特定内容的影响,压缩包没有,所以检验更简单。
啊,这Mojang真的是。。。没话说

要不这样吧,我们直接往配置文件里丢个不自动进行转换的黑名单得了)

这个可以

@SNWCreations
Copy link
Contributor Author

我现在没空解决这个了 :/ 可能要晚上看看

@SNWCreations
Copy link
Contributor Author

解决

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