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

Optimize ExistingItemFilter #39

Merged
merged 1 commit into from
Nov 24, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ buildscript {
maven { url = "https://jitpack.io" }
maven { url = "https://gregtech.overminddl1.com/" }
}
dependencies { classpath 'com.github.GTNH2:ForgeGradle:FG_1.2-SNAPSHOT' }
dependencies { classpath 'com.github.GTNewHorizons:ForgeGradle:stable-2021-11-20' }
}
plugins {
id 'idea'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ boolean stackEqual(ItemStack toInsert, ItemStack existing) {
matched = existingId != -1 && existingId == OreDictionary.getOreID(toInsert);
}
if(!matched) {
matched = Item.getIdFromItem(toInsert.getItem()) == Item.getIdFromItem(existing.getItem());

Choose a reason for hiding this comment

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

I wonder what couldbe the reason for that

Copy link
Author

Choose a reason for hiding this comment

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

Fluids can be compared by their IDs only. I guess EnderIO author thought the item would be the same.

matched = toInsert.getItem() == existing.getItem();
if(matched && matchMeta) {
matched = toInsert.getItemDamage() == existing.getItemDamage();
}
Expand Down