-
-
Notifications
You must be signed in to change notification settings - Fork 382
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
Fix 'any sword' represents multiple types error #6263
Conversation
I believe the assertion should still remain. Also a test should be added so that assertion can be caught. |
Assert shouldn't be needed as it should never be met, itemtype should be NonNull. Added a test however |
Swapping over to a draft pr for a bit, issue is caused by a custom build for an addon causing itemstack parser to be called needlessly in cases like the issues above. This is also why pickle was not able to replicate. Internally this change is needed, however I want to first find how and why this error happened since the only left overs in my build are classes not finished but also no Skript.register methods being called. There's no startup issues either so it's a far fetch issue. I work in under 3 hours, so this might not be marked as ready until tomorrow. |
Closing in favor of #6266 |
Description
This PR aims to fix the
if player's tool is any sword
comparison no longer working as intended due to a change somewhere in #5815. I am targeting dev/feature if this is incorrect please tell me I'll spend the 10 hours to fix it.From what I've been able to tell this should of been caused by ItemStack parser not properly checking for
ItemType#isAll
I've now add a check for it as well removed some finals within the method.While Pickle wasn't able to replicate it my guess is a change that was needed happened and brought to light this comparison issue.
Screenshot of it working in action, ignore the broadcast, this was a build with my debug messages
Target Minecraft Versions: any
Requirements: none
Related Issues: #6251