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

Vanilla Crash & Furnace Speedup #37

Merged
merged 4 commits into from
Dec 11, 2021
Merged

Vanilla Crash & Furnace Speedup #37

merged 4 commits into from
Dec 11, 2021

Conversation

mitchej123
Copy link
Contributor

  1. Backports a fix for URL parsing from [1.7.10] internal server error on chat message MinecraftForge/MinecraftForge#1712
  2. Makes FurnaceRecipe significantly faster by using a HashMap w/ ItemStackHashingStrategy

1) Backports a fix for URL parsing from MinecraftForge/MinecraftForge#1712
2) Makes FurnaceRecipe significantly faster by using a HashMap w/ ItemStackHashingStrategy
@mitchej123 mitchej123 requested a review from a team December 11, 2021 00:13

@Override
public int computeHashCode(ItemStack stack) {
return stack.getItem().hashCode() ^ stack.getItemDamage() ^ (stack.hasTagCompound() ? stack.stackTagCompound.hashCode() : 0);
Copy link
Contributor

Choose a reason for hiding this comment

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

Wouldn't it give better distribution if you e.g. multiply item damage by some large enough prime here? It's not that expensive

Copy link
Contributor

@Glease Glease left a comment

Choose a reason for hiding this comment

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

Beyond these, change the hashing function and we should be good to merge

 * Going with the assumption GT registers things later and we want those.  At first glance, most of the conflicts were dust -> ic2Ingot
Update hashing strategy slightly
@Dream-Master Dream-Master merged commit 43e67ca into master Dec 11, 2021
@Dream-Master Dream-Master deleted the fix_and_speedup branch December 11, 2021 18:13
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.

4 participants