-
Notifications
You must be signed in to change notification settings - Fork 65
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
Conversation
mitchej123
commented
Dec 11, 2021
- Backports a fix for URL parsing from [1.7.10] internal server error on chat message MinecraftForge/MinecraftForge#1712
- 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
|
||
@Override | ||
public int computeHashCode(ItemStack stack) { | ||
return stack.getItem().hashCode() ^ stack.getItemDamage() ^ (stack.hasTagCompound() ? stack.stackTagCompound.hashCode() : 0); |
There was a problem hiding this comment.
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
There was a problem hiding this 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
src/main/java/com/mitchej123/hodgepodge/asm/ThermosFurnaceSledgeHammer.java
Outdated
Show resolved
Hide resolved
src/main/java/com/mitchej123/hodgepodge/asm/ThermosFurnaceSledgeHammer.java
Show resolved
Hide resolved
* 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