This commit is contained in:
Auxilor
2022-03-05 12:56:32 +00:00
parent c3e9bbbc50
commit 827e9fd98a
3 changed files with 2 additions and 14 deletions

View File

@@ -116,13 +116,6 @@ public interface FastItemStack {
*/
boolean hasItemFlag(@NotNull ItemFlag flag);
/**
* Get if the item has any nbt data.
*
* @return If any nbt data is present on the item.
*/
boolean hasAnyNBT();
/**
* Get the Bukkit ItemStack again.
*

View File

@@ -2,7 +2,6 @@ package com.willfp.eco.core.items;
import com.github.benmanes.caffeine.cache.Caffeine;
import com.github.benmanes.caffeine.cache.LoadingCache;
import com.willfp.eco.core.fast.FastItemStack;
import com.willfp.eco.core.items.args.LookupArgParser;
import com.willfp.eco.core.items.provider.ItemProvider;
import com.willfp.eco.core.recipe.parts.EmptyTestableItem;
@@ -43,10 +42,10 @@ public final class Items {
* Cached custom item lookups, using {@link HashedItem}.
*/
private static final LoadingCache<HashedItem, Optional<TestableItem>> CACHE = Caffeine.newBuilder()
.expireAfterAccess(5, TimeUnit.MINUTES)
.expireAfterAccess(10, TimeUnit.MINUTES)
.build(
key -> {
if (!FastItemStack.wrap(key.getItem()).hasAnyNBT()) {
if (!key.getItem().hasItemMeta()) {
return Optional.empty();
}

View File

@@ -170,10 +170,6 @@ class EcoFastItemStack(
handle.setRepairCost(cost)
}
override fun hasAnyNBT(): Boolean {
return handle.hasTag()
}
override fun equals(other: Any?): Boolean {
if (other !is EcoFastItemStack) {
return false