A more efficient way of doing the same check in the last commit

(cherry picked from commit f119a3a907070793be1e7b142be76706c32aa847)
This commit is contained in:
Pahimar 2016-06-01 15:11:40 -04:00 committed by bombcar
parent e056caee88
commit 2aa81c0457
1 changed files with 2 additions and 4 deletions

View File

@ -91,8 +91,7 @@ public class BlacklistRegistry {
else if (object instanceof ItemStack){
Collection<String> oreNames = OreDictionaryHelper.getOreNames((ItemStack) object);
for (String oreName : oreNames) {
boolean isNotLearnable = !isLearnable(new OreStack(oreName));
if (isNotLearnable) {
if (knowledgeBlacklist.contains(WrappedStack.wrap(new OreStack(oreName)))) {
return false;
}
}
@ -123,8 +122,7 @@ public class BlacklistRegistry {
else if (object instanceof ItemStack){
Collection<String> oreNames = OreDictionaryHelper.getOreNames((ItemStack) object);
for (String oreName : oreNames) {
boolean isNotLearnable = !isLearnable(new OreStack(oreName));
if (isNotLearnable) {
if (exchangeBlacklist.contains(WrappedStack.wrap(new OreStack(oreName)))) {
return false;
}
}