-
Notifications
You must be signed in to change notification settings - Fork 546
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
Error stack and some incorrect use of variables in the code #4211
Comments
charging bench is a duplicate issue. also please report issues on seperate report. also we aren't responsible for any forks of slimefun. |
No,Actually, I'm talking about the problem with the charging bench , but I found a lot of errors in this logic in the process.and the problem was found on this branch, but the branch doesn't change the code, so it's safe to assume that the problem works on the main branch as well(In fact, it does) |
again, it's a duplicate issue. it's already been reported, and it's never safe to assume a fork doesn't affect code. |
Yes,It's reported in other fork,but it isn't reported in here.And,in fact,is does't affect code,this question exists |
In fact,this issue is not quite the same as that one |
it is reported here. #4183 |
Emm.no same |
1 similar comment
Emm.no same |
you said you have items stacking in the charging bench on the official version. that was already reported in 4183. this is closed. move on |
Boomer he is meaning different issues, it sounds like some other menus/methods combine slimefun items that shouldn't combine like how cargo does |
It's completely different, and the charging bench is just a convenient demonstration machine, not just the charging bench with this issue. |
then as i said, open a seperate issue |
this doesn't have anything to do with cargo |
If you read it carefully, you will see that this is not the same. |
if the cause of the other issue is what you identified then it's the same. open a seperate issue not related to the charging bench |
That's not the cause of the problem, it's talking about items that can't be stacked but stacked,but i will open a new issue |
there's already an open pr to fix it |
Not really |
This issue should have just been discovered by now |
That PR maybe just fix the charging bench. But it is SlimefunUtils's wrong in fact. |
as part of the review process the dev's can look into it to see if the root cause is addressed in the PR or if other changes need to be made to look at #4212 |
I am in China and it is 0 o'clock. I originally opened this issue for convenience, but it seems inconvenient. Also, this issue comes with a detailed solution and traceability process |
❗ Checklist
📍 Description
from SlimefunGuguProject/Slimefun4#912,This fork does not change the code related to this issue.
The following is machine translation:
Original content:For certain items, slimefun will directly make them stack, even if they have different slimefun IDs
Specific items: Same name, same lore, but different slimefun ID (i.e. NBT exists differently, you don't need to consider the full NBT to fix the bug, just consider the slimefun ID)
Problem tracing
Slimefun4/src/main/java/me/mrCookieSlime/Slimefun/api/inventory/DirtyChestMenu.java
Lines 178 to 183 in 226af9b
Slimefun4/src/main/java/io/github/thebusybiscuit/slimefun4/utils/SlimefunUtils.java
Lines 306 to 322 in 226af9b
Slimefun4/src/main/java/io/github/thebusybiscuit/slimefun4/utils/SlimefunUtils.java
Lines 348 to 387 in 226af9b
Herein lies the problem——
equalsItemMeta
methodSlimefun4/src/main/java/io/github/thebusybiscuit/slimefun4/utils/SlimefunUtils.java
Lines 459 to 501 in 226af9b
Here's a thing to say about the
checkCustomModelData
variable in this method calledbypassCustomModelCheck
, which actually ignores checking, so it should be reversed when it is passed in, but it is not reversed when it is passed inThis code checks Lore & Name,The problem arises
Slimefun4/src/main/java/io/github/thebusybiscuit/slimefun4/utils/SlimefunUtils.java
Lines 364 to 386 in 226af9b
Check here to see if you have overlooked a situation where it is a slimefun item and the two items are not the same slimefun item
Slimefun4/src/main/java/io/github/thebusybiscuit/slimefun4/utils/SlimefunUtils.java
Lines 358 to 378 in 226af9b
The variable name is
sfItem
, which means thatsfItem
is a slimefun item by default. In the case ofid==null
(i.e. the item is not a Slimefun item), it is't necessary to continue to determine if it is necessary to return false if one is a Slimefun item and the other is not.Also, since
sfitem.hasItemMeta()
has been judgedWhy should the variable of this ItemMeta be named
possibleSfItemMeta
, and the same goes forpossibleItemId
In a word,maybe change like:
In a word,there is a wrong check and some incorrect use of variables(or wrong name?)
📑 Reproduction Steps
Put different slimefun items with the same lore and name into the charging bench
And then they stacks.
💡 Expected Behavior
they shouldn't stack
📷 Screenshots / Videos
343782159-dc0ad5a8-745b-4829-8c6e-148c2552e470.mp4
📜 Server Log
No response
📂
/error-reports/
folderNo response
💻 Server Software
Paper
🎮 Minecraft Version
1.20.x
⭐ Slimefun version
latest
🧭 Other plugins
No response
The text was updated successfully, but these errors were encountered: