Closed lijinhong11 closed 2 months ago
Pro Tip! You can help us label your Pull Requests by using the following branch naming convention next time you create a pull request. ❤️ Branch naming convention | Label |
---|---|
feature/** |
🎈 Feature |
fix/** |
✨ Fix |
chore/** |
🧹 Chores |
api/** |
🔧 API |
performance/** |
💡 Performance Optimization |
compatibility/** |
🤝 Compatibility |
If your changes do not fall into any of these categories, don't worry. You can just ignore this message in that case! 👀
Have you tested this?
not :( but I will test later
Tested and it fixed with [64,64] ([64,32] may too)
If we could get another person to test and verify that'd be great!
A Slimefun preview build is available for testing! Commit: e021d694
https://preview-builds.walshy.dev/download/Slimefun/4172/e021d694
Note: This is not a supported build and is only here for the purposes of testing. Do not run this on a live server and do not report bugs anywhere but this PR!
If we could get another person to test and verify that'd be great!
I want to make sure this doesn't somehow break any existing thing as I'm worried this might break a recipe that is setup as [32,32] and the slot setup is something like [1, 64]
So there's the only way is to stack items' amount
im afraid that it wont work. if there is a recipe a[Diamondx64] and a recipe b[Diamondx64, Iron_ingot] and there are 64 diamonds in the AContainer, it should match recipe a instead of b. i may give another solution later.
u r more excellent than me 🙁
发件人: Ddggdd135 @.> 发送时间: 2024年4月27日 08:34 收件人: Slimefun/Slimefun4 @.> 抄送: lijinhong11 @.>; Author @.> 主题: Re: [Slimefun/Slimefun4] fix AContainer can't find recipes with similar items (PR #4172)
im afraid that it wont work. if there is a recipe a[Diamondx64] and a recipe b[Diamondx64, Iron_ingot] and there are 64 diamonds in the AContainer, it should match recipe a instead of b. i may give another solution later.
— Reply to this email directly, view it on GitHubhttps://github.com/Slimefun/Slimefun4/pull/4172#issuecomment-2080269033, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AO6JU5AF7VLD7TFDFGPJGPTY7LXBNAVCNFSM6AAAAABGNBY3Z2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOBQGI3DSMBTGM. You are receiving this because you authored the thread.Message ID: @.***>
and i wonder why not use hashcode. if the NBT of item is different from that in recipe, it shouldnt match.
and i wonder why not use hashcode. if the NBT of item is different from that in recipe, it shouldnt match.
Because there are tons of cases where nbt wouldn't be identical but the ingredient is still valid
and i wonder why not use hashcode. if the NBT of item is different from that in recipe, it shouldnt match.
Because there are tons of cases where nbt wouldn't be identical but the ingredient is still valid
Could you please give an example?
Could you please give an example?
Sure! We already have problems with it in other areas so I can just give a couple of those:
the recipe calls for a diamond hoe, you have a diamond hoe that was used and then repaired, nbt won't be identical.
You have a recipe that calls for fertilizer, the fertilizer has a custom model nbt because the server previously had a resource pack but now does not or the model number changed, nbt won't be identical
Etc etc
thats so bad
thats so bad
?
i created my pr #4177
Description
4166
Proposed changes
Skip scanned slots
Related Issues (if applicable)
4166
Checklist
Nonnull
andNullable
annotations to my methods to indicate their behaviour for null values