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

[Bug] Crash #35

Open
1 task done
LongLasting opened this issue Mar 18, 2024 · 9 comments
Open
1 task done

[Bug] Crash #35

LongLasting opened this issue Mar 18, 2024 · 9 comments
Labels
bug Something isn't working

Comments

@LongLasting
Copy link

Minecraft Version

1.20.4

OMMC Version

oh-my-minecraft-client-1.20.4-0.5.332+477abff-beta

Description

Crash when sorting inventory/R键整理的时候自崩

To Reproduce

可能跟箱子的里的物品有关,我在别的存档或者箱子中整理就没有问题

Expected behavior

image

Log

No response

Latest CI build tested

  • I confirm that this problem still exists with the latest CI build.
@LongLasting LongLasting added bug Something isn't working pending Awaiting response from developer labels Mar 18, 2024
@LongLasting
Copy link
Author

well, the crash only happens on this chest, so im thinking if the items in it caused crash/这个崩溃只在这个箱子里发生,不知道为什么,所以我附上了箱子中物品的截图

@Hendrix-Shen
Copy link
Member

If your preferred language is Chinese, you can communicate directly in Chinese.
Please provide upload crash logs.

====================

如果你的偏好语言为中文,请直接使用中文交流。
请上传崩溃日志。

@Hendrix-Shen Hendrix-Shen removed the pending Awaiting response from developer label Mar 19, 2024
@LongLasting
Copy link
Author

@LongLasting
Copy link
Author

打乱箱子里东西的顺序就不会崩溃了,但是箱子里的东西如果按我之前发的那个图里的摆放顺序,按R整理直接崩

@LongLasting
Copy link
Author

我把那个箱子里的白色地毯拿掉就不会崩,放回去(放最后)就崩了

@tianhangj
Copy link

我大致复制了图中的箱子并排序,并没有崩溃(可能是物品不完全一样导致的),但似乎不符合排序的预期?(结果如下)
image

@tianhangj
Copy link

image
经过测试,这样会崩溃

@tianhangj
Copy link

image
在 src/main/java/com/plusls/ommc/feature/sortInventory 中的 ItemStackComparator 子类中,这一段代码导致崩溃,原因是 minecraft:white_bed 和 minecraft:white_carpet 都被判定为是 IDyeBlock,这导致这两个物品比较会返回 0,由此导致崩溃。

@tianhangj
Copy link

@Hendrix-Shen

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants