v1_18_1/src/main/java/com/darksoldier1404/dppc/utils/NBT.java
public static boolean hasTagKey(ItemStack objitem, String key) {
        net.minecraft.world.item.ItemStack item = CraftItemStack.asNMSCopy(objitem);
        NBTTagCompound ntc = item.r() ? item.t() : new NBTTagCompound();
        return ntc.e(key);
    }
/**
     * @param objitem ItemStack
     * @param key     String
     * @return boolean
     */
@param objitem ItemStack
@param key     String
@return boolean
@param objitem ItemStack @param key String @return boolean
public static boolean hasTagKey(ItemStack objitem, String key) {
        net.minecraft.world.item.ItemStack item = CraftItemStack.asNMSCopy(objitem);
        NBTTagCompound ntc = item.r() ? item.t() : new NBTTagCompound();
        return ntc.e(key);
    }
public static boolean hasTagKey ( ItemStack objitem , String key ) { net . minecraft . world . item . ItemStack item = CraftItemStack . asNMSCopy ( objitem ) ; NBTTagCompound ntc = item . r ( ) ? item . t ( ) : new NBTTagCompound ( ) ; return ntc . e ( key ) ; }
@param objitem ItemStack
 @param key     String
 @return boolean
@param objitem ItemStack @param key String @return boolean