We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
1.21paper的诸如"附属界面打不开,无法cast sfitem to citem"的问题均出自此 实际为 paper1.21运行时ItemStack.class被修改导致 其中 new ItemStack(ItemStack item)会令this.craftDelegate=item.clone() 而ItemStack.clone方法为return this.craftDelegate.clone()<-默认是citem 故只要不覆写clone就可以避免出现任何问题
至于附属中出现的问题,是因为他们尝试对sfitem进行new ItemStack获得干净物品,但实际上恰恰相反的调用了sfitem.clone,存入了不干净的物品,导致paper直接读取craftDelegate成员并强转时出错
必现
无
Paper
1.21.x
Slimefun 2024.09
No response
The text was updated successfully, but these errors were encountered:
刚才看了一下 不能直接super.clone() 我建议这样 以兼容1.21+和1.21以下
Sorry, something went wrong.
make a pr
revert SlimefunGuguProject#988
3b663d6
issue SlimefunGuguProject#988
599861a
No branches or pull requests
问题描述
1.21paper的诸如"附属界面打不开,无法cast sfitem to citem"的问题均出自此
实际为 paper1.21运行时ItemStack.class被修改导致
其中 new ItemStack(ItemStack item)会令this.craftDelegate=item.clone()
而ItemStack.clone方法为return this.craftDelegate.clone()<-默认是citem
故只要不覆写clone就可以避免出现任何问题
至于附属中出现的问题,是因为他们尝试对sfitem进行new ItemStack获得干净物品,但实际上恰恰相反的调用了sfitem.clone,存入了不干净的物品,导致paper直接读取craftDelegate成员并强转时出错
问题复现率
必现
复现步骤
无
服务端类型
Paper
Minecraft 版本
1.21.x
Slimefun 版本
Slimefun 2024.09
其他插件信息
No response
补充信息
No response
The text was updated successfully, but these errors were encountered: