Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR
Fix MegaCraftingCenter stop accepting patterns after save&load game.
This is caused by ActualPattern recorded in CraftingCPUCluster will be saved to disk by .getPattern().writeToNBT()
how ever ActualPattern return the original pattern.
Therefore, when CraftingCPUCluster read from disk, ActualPattern turns into regular pattern, and consider patterns in MegaCraftingCenter as a different one.
This PR create a new item called ItemActualPattern to properly serialize&deserialize ActualPattern.
And implement equals&hashcode for ActualPattern
修复梦魇合成中心在存档并加载游戏后,无法接受之前下单的样板
这是因为 CraftingCPUCluster 在保存游戏时会将记录的样板用 .getPattern().writeToNBT() 保存
但梦魇合成中心提供的 ActualPattern getPattern()返回的是原样板
因此重新加载存档后CraftingCPUCluster 中的 ActualPattern 会变成普通样板,并认为它们是不同的 从而拒绝发配
这个PR新建了一个物品ItemActualPattern 来正确序列化/反序列化化ActualPattern(玩家不会感知到这个物品 所以没有材质也没本地化)
并为ActualPattern实现了equals&hashcode
Reproduce/复现:
https://github.com/user-attachments/assets/83ebc687-08ba-4311-9d10-8bb45f14863c
After fix/修复后:
https://github.com/user-attachments/assets/ec760604-fd84-4424-9291-30fde3051086
Add Pattern Access Hatch
This is a dedicated hatch for Mega Crafting Center
Installed on Mega Crafting Center, connect to ME net to access internal patterns.
Then use a ME Terminal to qurey, add or remove patterns.
样板访问仓是梦魇合成中心的专用仓室
安装在梦魇合成中心上后能连接ME网络来访问梦魇合成中心的内部样板
然后使用ME终端就能查询/插入/移除样板
Usage/演示:
https://github.com/user-attachments/assets/8c880d9f-5c09-4443-91dc-04e7265e256a
Use ME Terminal to filter patterns/使用ME终端过滤样板

没有加合成 因为我不确定这东西的平衡性