Skip to content
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

More fixing to the attribute and durability #8

Merged
merged 8 commits into from
Aug 29, 2021

Conversation

00Creamy
Copy link
Contributor

No description provided.


//Due to the set random seed above, the UUIDs bellow should always be the same.
ATTRIBUTE_MAP.put(Attribute.GENERIC_ATTACK_DAMAGE, new UUID(random.nextLong(), random.nextLong()));
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think there is any point caching it anymore. Instead, we can just create a new random when we need to make the UUID again

Since we aren't caching them, each random will need to be different depending on the attribute name. Maybe make the seed itemId.hashCode() >> 16 + (attributeName.hashCode() * operationEnumOrdinal)

@StrangeOne101 StrangeOne101 merged commit 30c355f into StrangeOne101:master Aug 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants