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

DistinctiveItem接口描述不妥 #976

Closed
m1919810 opened this issue Dec 5, 2024 · 2 comments
Closed

DistinctiveItem接口描述不妥 #976

m1919810 opened this issue Dec 5, 2024 · 2 comments
Labels
🐞 Bug 抓虫子

Comments

@m1919810
Copy link

m1919810 commented Dec 5, 2024

问题描述

DistinctiveItem描述如下
image
我认为该接口应该在两个物品id相同时候才会被调用

实际上它并没有。

关于我的观点,我认为这需要有。因为首先根据原描述上(我语文不好,所以我问的chatgpt),它调用的前提应当为id匹配

其次 你在similar里已经获取了id了,如果我这里需要重新从pdc里提取sfid,会显得这非常智障.

我完全可以在这里比较别的,比如BlockStateMeta的数据或者别的,可以不比较pdc

最终 ,该接口描述带有误导性,很容易让人直接套用而忽略了sfid的比较

问题复现率

必现

复现步骤

今日有玩家向我汇报,说使用我附属里的物品导致了一些意外的合成路线
后来发现是我附属的物品均实现了DistinctiveItem方法所致
现在我需要在里面加入更多的比较代码了,这是令人恼火的

服务端类型

Paper

Minecraft 版本

1.20.x

Slimefun 版本

Slimefun 2024.09

其他插件信息

No response

补充信息

我觉得这玩意实在是太抽象了

@m1919810 m1919810 added the 🐞 Bug 抓虫子 label Dec 5, 2024
@m1919810
Copy link
Author

m1919810 commented Dec 5, 2024

😡😡😡😡😡😡😡😡

@StarWishsama
Copy link
Member

从上游pr合过来的😡😡

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 Bug 抓虫子
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants