first exact search underlying list in oredicted list
This commit is contained in:
@@ -76,6 +76,9 @@ public class ItemStackListOredicted implements IItemStackList {
|
||||
@Nullable
|
||||
@Override
|
||||
public ItemStack get(@Nonnull ItemStack stack, int flags) {
|
||||
// Check the underlying list but don't do oredict things for exact match
|
||||
ItemStack exact = underlyingList.get(stack, flags & ~IComparer.COMPARE_OREDICT);
|
||||
if (exact == null) {
|
||||
if ((flags & IComparer.COMPARE_OREDICT) == IComparer.COMPARE_OREDICT) {
|
||||
int[] ids = OreDictionary.getOreIDs(stack);
|
||||
for (int id : ids) {
|
||||
@@ -92,8 +95,8 @@ public class ItemStackListOredicted implements IItemStackList {
|
||||
}
|
||||
}
|
||||
}
|
||||
// Check the underlying list but don't do oredict things, as that has been tried before
|
||||
return underlyingList.get(stack, flags & ~IComparer.COMPARE_OREDICT);
|
||||
}
|
||||
return exact;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
|
||||
Reference in New Issue
Block a user