-
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
Errors in SlimefunUtils #4212
Comments
QQ2024628-05254.mp4See more #4211 Environment: git-Purpur-2018 (MC: 1.20.1) I used the machine and the command to see NBT from InfinityExpansion to reproduce the issue clearly. This video reproduces the issue by using a machine from InfinityExpansion, but it is not related to InfinityExpansion. The reason for using this machine is simply because it is easier to reproduce. Difficulty reproducing this issue in environments with only Slimefun. |
It is not as same as the video in #4211 |
Sorry, I misjudged, but that fork is causing problems with the code. But, SlimefunUtils does have this problem, and this method is wrong. |
Now,This issue has nothing to do with that fork anymore |
❗ Checklist
📍 Description
From #4211
In a word,there is a wrong check.
Problem tracing
Slimefun4/src/main/java/io/github/thebusybiscuit/slimefun4/utils/SlimefunUtils.java
Lines 461 to 493 in 4bcce20
This code checks Lore & Name,The problem arises
Slimefun4/src/main/java/io/github/thebusybiscuit/slimefun4/utils/SlimefunUtils.java
Lines 383 to 414 in 4bcce20
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 383 to 397 in 4bcce20
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:
📑 Reproduction Steps
After the method is called, an error result is returned.
There is a wrong checking.
💡 Expected Behavior
The method should run correctly.
📷 Screenshots / Videos
No response
📜 Server Log
No response
📂
/error-reports/
folderNo response
💻 Server Software
Purpur
🎮 Minecraft Version
1.20.x
⭐ Slimefun version
latest
🧭 Other plugins
No response
The text was updated successfully, but these errors were encountered: