Revert "Janky fix for third party plugin"
This reverts commit 8ce07d772e.
This commit is contained in:
@@ -2,8 +2,6 @@ package com.willfp.eco.core.items;
|
|||||||
|
|
||||||
import com.github.benmanes.caffeine.cache.Caffeine;
|
import com.github.benmanes.caffeine.cache.Caffeine;
|
||||||
import com.github.benmanes.caffeine.cache.LoadingCache;
|
import com.github.benmanes.caffeine.cache.LoadingCache;
|
||||||
import com.google.common.collect.ImmutableCollection;
|
|
||||||
import com.google.common.collect.ImmutableList;
|
|
||||||
import com.willfp.eco.core.Eco;
|
import com.willfp.eco.core.Eco;
|
||||||
import com.willfp.eco.core.fast.FastItemStack;
|
import com.willfp.eco.core.fast.FastItemStack;
|
||||||
import com.willfp.eco.core.items.args.LookupArgParser;
|
import com.willfp.eco.core.items.args.LookupArgParser;
|
||||||
@@ -29,9 +27,7 @@ import java.util.ArrayList;
|
|||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Iterator;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.ListIterator;
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
@@ -60,14 +56,8 @@ public final class Items {
|
|||||||
return Optional.empty();
|
return Optional.empty();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Reverse the list in order to prioritize items that have been added later,
|
|
||||||
// this is a horribly janky fix to a problem that only exists in one third party
|
|
||||||
// plugin that does things the wrong way around.
|
|
||||||
|
|
||||||
List<TestableItem> reversed = ImmutableList.copyOf(REGISTRY.values()).reversed();
|
|
||||||
|
|
||||||
TestableItem match = null;
|
TestableItem match = null;
|
||||||
for (TestableItem item : reversed) {
|
for (TestableItem item : REGISTRY.values()) {
|
||||||
if (item.matches(key.getItem())) {
|
if (item.matches(key.getItem())) {
|
||||||
match = item;
|
match = item;
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user