We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
getTag() only exists on 1.17 version.
getTag()
public static Optional<Integer> getInt(ItemStack item, String key) { Optional<net.minecraft.world.item.ItemStack> item1; try { item1 = getItem(item); } catch (NoSuchFieldException | IllegalAccessException e) { return Optional.empty(); } if (item1.isEmpty()) return Optional.empty(); NBTTagCompound tag = item1.get().getTag(); // exception if (tag == null) return Optional.empty(); return !tag.contains(key) ? Optional.empty() : Optional.of(tag.getInt(key)); }
from https://github.com/NyaaCat/NyaaCore/blob/1.18/src/main/java/cat/nyaa/nyaacore/utils/ItemTagUtils.java
The text was updated successfully, but these errors were encountered:
I don't have this problem here
Sorry, something went wrong.
No branches or pull requests
getTag()
only exists on 1.17 version.from https://github.com/NyaaCat/NyaaCore/blob/1.18/src/main/java/cat/nyaa/nyaacore/utils/ItemTagUtils.java
The text was updated successfully, but these errors were encountered: