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

Rework fuzzy comparison for 99 percent threshold #3367

Merged
merged 4 commits into from Feb 5, 2018

Conversation

Projects
None yet
2 participants
@yueh
Member

yueh commented Jan 30, 2018

The current implementation is quite convoluted and can handle 99%
incorrectly when items exceed a certain damage range.

Rework fuzzy comparison for 99 percent threshold
The current implementation is quite convoluted and can handle 99%
incorrectly when items exceed a certain damage range.

@yueh yueh force-pushed the rework-fuzzy-comparison branch from 27bfce1 to 46dd2b4 Jan 30, 2018

yueh added some commits Jan 31, 2018

Use metadata explicitly for comparison
Some item could use metadata to pack damageable and undamageable items
into the same id. Thus could lead to get ItemStack#getItemDamage() to
return bogus values for undamageable items.
@orod-org

This comment has been minimized.

orod-org commented Jan 31, 2018

SonarQube analysis reported 2 issues

Note: The following issues were found on lines that were not modified in the pull request. Because these issues can't be reported as line comments, they are summarized here:

  1. MAJOR ItemComparisonHelper.java#L153: Remove this expression which always evaluates to "true" rule
  2. MAJOR AEItemStack.java#L103: A "NullPointerException" could be thrown; "item" is nullable here. rule

@yueh yueh merged commit 36d6681 into rv5-1.12 Feb 5, 2018

4 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
jenkins Success
Details
sonarqube SonarQube reported 2 issues, no criticals or blockers

@yueh yueh deleted the rework-fuzzy-comparison branch Feb 5, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment